-
Notifications
You must be signed in to change notification settings - Fork 710
Closed
Description
Use case description
Trying to develop with a local checkout, following https://github.com/androidx/media/blob/release/README.md#locally, is problematic because of the JDK 8 target.
warning: [options] target value 8 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
warning: unknown enum constant Level.FULL
reason: class file for com.google.j2objc.annotations.ReflectionSupport$Level not found
4 warnings
Java compiler has deprecated support for compiling with source/target compatibility version 8.
Set Java Toolchain to 17
Change Java language level and jvmTarget to 11 in all modules if using a lower level.
Pick a different compatibility level...
Pick a different JDK to run Gradle...
...
Execution failed for task ':media3-lib-common-ktx:compileDebugKotlin'.
> Inconsistent JVM-target compatibility detected for tasks 'compileDebugJavaWithJavac' (1.8) and 'compileDebugKotlin' (17).
Proposed solution
Bump to JDK 17 and assume apps are using desugar to target older devices. This is already effectively required for Androidx and most popular android libs.
Alternatives considered
Pin permanently to old Gradle, AGP versions and remove support for local checkout.
NikSatyr