Specify minimum Android API level (+ add Animal Sniffer to verify this)
envgap__google__gson-2429
01 / FAILURE SIGNATURE
As reported upstream
No identifying execution failure has been captured.
Not a benchmark task.
- The project already builds and runs before the fix, so there is nothing to repair.
02 / ENVIRONMENT RECIPE
- Base commit
a589ef20087b4b0f1ec3048d3ceaef1eedccd09d- Manifest
pom.xml- Reproduce
Awaiting issue-specific recipe- Run under trace
Awaiting a meaningful runtime command
03 / ORIGINAL ISSUE TEXT
google/gson #2429 · read the original issue
# Problem solved by the feature
The README only specifies that Java 7 is the minimum version for the latest Gson versions. However, for Android developers this information is not that helpful because Java 7 API was added in multiple different Android API levels. For example `java.lang.ReflectiveOperationException` added in Java 7 was only added for Android API level 19 (Android 4.4), see also https://github.com/google/gson/issues/2310#issuecomment-1616848536.
# Feature description
- The README should explicitly state which Android API level is the minimum
- The build setup should verify that no newer Android APIs are used (respectively that desugaring is supported).
This can be verified using Animal Sniffer, see:
- https://github.com/google/guava/issues/4005
- Android Scents for Maven
(to be verified that these artifacts are safe; but appears they are also used by other projects, e.g. OkHttp ([code](https://github.com/square/okhttp/blob/7cd7f9720dc7ff45663c29b7a15a42d27cc845d4/gradle/libs.versions.toml#L82-L83)))
- https://sourceforge.net/projects/androidscents/
- https://search.maven.org/search?q=g:net.sf.androidscents.signature
- Animal Sniffer signatures, considering desugaring: https://github.com/open-toast/gummy-bears
In that case would have to explicitly mention desugaring (using the latest Android build tools?) in the README
# Alternatives / workarounds
_none_
04 / LABELS
Labels from the report text only; not yet run
No supported category has been assigned.
Label rules and the text that matched
[]