EiyuuZack commented on code in PR #1678:
URL: https://github.com/apache/cordova-android/pull/1678#discussion_r1406580359


##########
framework/build.gradle:
##########
@@ -50,8 +50,8 @@ android {
     buildToolsVersion cordovaConfig.BUILD_TOOLS_VERSION
 
     compileOptions {
-        sourceCompatibility JavaVersion.VERSION_1_8
-        targetCompatibility JavaVersion.VERSION_1_8
+        sourceCompatibility JavaVersion.VERSION_17

Review Comment:
   > JDK 17 compatibility was [added in AGP 
8.1](https://developer.android.com/build/releases/gradle-plugin#8-1-0)
   
   That is a requirement to run AGP itself and does not seem to have anything 
to do with how the project is setup with regards to JVM targeting.
   
   > Resources:
   https://developer.android.com/build/jdks#compileSdk
   https://developer.android.com/about/versions/14/features#core-libraries
   
   From my understanding, the documentation refers to applications built with 
JDK 17 as a target + running on Android 14.
   
   For 13 and below it would require desugaring of JDK 17 APIs via the 
`com.android.tools:desugar_jdk_libs:2.0.3` dependency as per 
https://developer.android.com/studio/write/java8-support#library-desugaring.
   
   It is hard to tell because that documentation seems stopped in time (unlike 
the dependency itself which was updated [earlier this 
month](https://mvnrepository.com/artifact/com.android.tools/desugar_jdk_libs/2.0.4)),
 with no mention to AGP 8 or JDK 17 for that matter. The 
[changelog](https://github.com/google/desugar_jdk_libs/blob/master/CHANGELOG.md)
 of the dependency does not mention JDK 17 either.
   
   The way I see it if you want to perform this change you would need to add 
the dependency and set the `isCoreLibraryDesugaringEnabled` property to `true`, 
assuming that it is indeed capable to desugar JDK 17 APIs.
   
   What are your thoughts on this?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org

Reply via email to