Update playground to accept JDK 17
Change-Id: I30a7571e889dbe3f04b26f8355c2368d9df7a5a1
Test: None
diff --git a/playground-common/playground-plugin/src/main/kotlin/androidx/playground/PlaygroundPlugin.kt b/playground-common/playground-plugin/src/main/kotlin/androidx/playground/PlaygroundPlugin.kt
index ff190ae..2f21f7a 100644
--- a/playground-common/playground-plugin/src/main/kotlin/androidx/playground/PlaygroundPlugin.kt
+++ b/playground-common/playground-plugin/src/main/kotlin/androidx/playground/PlaygroundPlugin.kt
@@ -28,23 +28,24 @@
private fun validateJvm(settings: Settings) {
// validate JVM version to print an understandable error if it is not set to the
- // required value (11)
+ // required value (17)
val jvmVersion = System.getProperty("java.vm.specification.version")
- check(jvmVersion == "11") {
+ check(jvmVersion == "17") {
"""
- AndroidX build must be invoked with JDK 11.
+ AndroidX build must be invoked with JDK 17.
${
if (settings.gradle.startParameter.projectProperties.containsKey(
"android.injected.invoked.from.ide"
)
) {
"""
- Make sure to set the Gradle JDK to JDK 11 in the project settings.
- File -> Settings -> Build, Execution, Deployment -> Build Tools ->
+ Make sure to set the Gradle JDK to JDK 17 in the project settings.
+ File -> Settings (on Mac Android Studio -> Preferences) ->
+ Build, Execution, Deployment -> Build Tools ->
Gradle -> Gradle JDK"
"""
} else {
- "Make sure your JAVA_HOME environment variable points to Java 11 JDK."
+ "Make sure your JAVA_HOME environment variable points to Java 17 JDK."
}
}
Current version: $jvmVersion