Skip to content

Commit

Permalink
Bump minimum Android API level to 21 (#2173)
Browse files Browse the repository at this point in the history
* Bump minimum Android API level to 21

* Split sniffer executions for Java 8 and Android 21

Ensures both signatures are tested.

---------

Co-authored-by: Jonathan Hedley <[email protected]>
  • Loading branch information
Isira-Seneviratne and jhy authored Dec 13, 2024
1 parent 133b0e0 commit 3c8421c
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 9 deletions.
8 changes: 7 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@

## 1.19.1 (PENDING)

### Bug Fixex
### Changes

* Updated the minimum Android API Level validation from 10 to **21**. As with previous jsoup versions, Android
developers need to enable core library desugaring. The minimum Java version remains Java
8. [2173](https://github.com/jhy/jsoup/pull/2173)

### Bug Fixes

* For backwards compatibility, reverted the internal attribute key for doctype names to
"name". [2241](https://github.com/jhy/jsoup/issues/2241)
Expand Down
28 changes: 20 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
<version>1.24</version>
<executions>
<execution>
<id>animal-sniffer</id>
<id>api-java8</id>
<phase>compile</phase>
<goals>
<goal>check</goal>
Expand All @@ -82,18 +82,32 @@
<artifactId>java18</artifactId>
<version>1.0</version>
</signature>
<ignores>
<ignore>java.nio.ByteBuffer</ignore> <!-- .flip(); added in API1; possibly due to .flip previously returning Buffer, later ByteBuffer; return unused -->
<ignore>java.net.HttpURLConnection</ignore><!-- .setAuthenticator(java.net.Authenticator) in Java 9; only used in multirelease 9+ version -->
</ignores>
</configuration>
</execution>
<execution>
<id>api-android21</id>
<phase>compile</phase>
<goals>
<goal>check</goal>
</goals>
<configuration>
<signature>
<groupId>net.sf.androidscents.signature</groupId>
<artifactId>android-api-level-10</artifactId>
<version>2.3.3_r2</version>
<groupId>com.toasttab.android</groupId>
<artifactId>gummy-bears-api-21</artifactId>
<version>0.10.0</version>
<!-- <classifier>coreLib2</classifier> -->
<!-- ^^ https://github.com/open-toast/gummy-bears says coreLib2 classifier for desugar should work, but I can't seem to wrangle Animal Sniffer to support that, so reverting to ignores for desugar -->
</signature>
<ignores>
<ignore>java.io.File</ignore> <!-- File#toPath() -->
<ignore>java.nio.file.*</ignore>
<ignore>java.nio.channels.SeekableByteChannel</ignore>
<ignore>java.util.function.*</ignore>
<ignore>java.util.stream.*</ignore>
<ignore>java.lang.Throwable</ignore> <!-- Throwable#addSuppressed(Throwable) -->
<ignore>java.lang.ThreadLocal</ignore>
<ignore>java.io.UncheckedIOException</ignore>
<ignore>java.util.Comparator</ignore> <!-- Comparator.comparingInt() -->
Expand All @@ -107,11 +121,9 @@
<ignore>java.util.Spliterator</ignore>
<ignore>java.util.Spliterators</ignore>
<ignore>java.nio.ByteBuffer</ignore> <!-- .flip(); added in API1; possibly due to .flip previously returning Buffer, later ByteBuffer; return unused -->

<ignore>java.net.HttpURLConnection</ignore><!-- .setAuthenticator(java.net.Authenticator) in Java 9; only used in multirelease 9+ version -->
</ignores>
<!-- ^ Provided by https://developer.android.com/studio/write/java8-support#library-desugaring
Possibly OK to remove androidscents; keep for now to validate other additions are supported. -->
<!-- ^ Provided by https://developer.android.com/studio/write/java8-support#library-desugaring -->
</configuration>
</execution>
</executions>
Expand Down

0 comments on commit 3c8421c

Please sign in to comment.