diff --git a/gradle.properties b/gradle.properties index 5aaf3ff3..6e2f97e4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,4 +6,4 @@ org.gradle.kotlin.dsl.allWarningsAsErrors=true systemProp.pts.enabled=true -org.gradle.android.latestKnownAgpVersion=8.13.0-alpha02 +org.gradle.android.latestKnownAgpVersion=8.13.0-rc01 diff --git a/src/test/groovy/org/gradle/android/PluginApplicationTest.groovy b/src/test/groovy/org/gradle/android/PluginApplicationTest.groovy index e682fc78..5c387b30 100644 --- a/src/test/groovy/org/gradle/android/PluginApplicationTest.groovy +++ b/src/test/groovy/org/gradle/android/PluginApplicationTest.groovy @@ -11,7 +11,7 @@ class PluginApplicationTest extends AbstractTest { def projectDir = temporaryFolder.newFolder() SimpleAndroidApp.builder(projectDir, cacheDir) .withAndroidVersion(androidVersion) - .withKotlinVersion(VersionNumber.parse(TestVersions.kotlinVersionCompatibleWithOlderAgp)) + .withKotlinVersion(VersionNumber.parse(TestVersions.kotlinVersion19)) .build() .writeProject() diff --git a/src/test/groovy/org/gradle/android/TestVersions.groovy b/src/test/groovy/org/gradle/android/TestVersions.groovy index 05d4d99e..ca0ce8ef 100644 --- a/src/test/groovy/org/gradle/android/TestVersions.groovy +++ b/src/test/groovy/org/gradle/android/TestVersions.groovy @@ -60,16 +60,22 @@ class TestVersions { return minorVersions.collect { getLatestVersionForAndroid(it) } } - static String kotlinVersion = "2.0.21" - // AGP versions <= 7.0 can't use the kotlin-android plugin version 2.0 - static String kotlinVersionCompatibleWithOlderAgp = "1.9.0" + + static String kotlinVersion22 = "2.2.0" + static String kotlinVersion20 = "2.0.0" + static String kotlinVersion19 = "1.9.0" static VersionNumber latestSupportedKotlinVersion() { - // version 7.1.3 or higher should be used with kotlin-android plugin 2 - if(latestAndroidVersionForCurrentJDK() <= VersionNumber.parse("7.0.4")) { - return VersionNumber.parse(kotlinVersionCompatibleWithOlderAgp) + def agp = latestAndroidVersionForCurrentJDK() + if (agp.compareTo(VersionNumber.parse("7.0.4")) <= 0) { + // AGP ≤ 7.0.4 → Kotlin 1.9.0 + return VersionNumber.parse(kotlinVersion19); + } else if (agp.compareTo(VersionNumber.parse("8.0.2")) < 0) { + // 7.0.4 < AGP < 8.0.2 → Kotlin 2.0 + return VersionNumber.parse(kotlinVersion20); } else { - return VersionNumber.parse(kotlinVersion) + // AGP ≥ 8.0.2 → Kotlin 2.2.0 + return VersionNumber.parse(kotlinVersion22); } } diff --git a/src/test/resources/expectedOutcomes/8.13_outcomes.json b/src/test/resources/expectedOutcomes/8.13_outcomes.json index 329be6cd..21308aa4 100644 --- a/src/test/resources/expectedOutcomes/8.13_outcomes.json +++ b/src/test/resources/expectedOutcomes/8.13_outcomes.json @@ -190,5 +190,11 @@ ":app:checkKotlinGradlePluginConfigurationErrors" : "SKIPPED", ":library:checkKotlinGradlePluginConfigurationErrors": "SKIPPED", ":library:checkReleaseAarMetadata" : "SUCCESS", - ":library:checkDebugAarMetadata" : "SUCCESS" + ":library:checkDebugAarMetadata" : "SUCCESS", + ":library:processDebugNavigationResources" : "FROM_CACHE", + ":app:processDebugNavigationResources" : "FROM_CACHE", + ":app:compileDebugNavigationResources" : "FROM_CACHE", + ":library:processReleaseNavigationResources" : "FROM_CACHE", + ":app:processReleaseNavigationResources" : "FROM_CACHE", + ":app:compileReleaseNavigationResources" : "FROM_CACHE" } diff --git a/src/test/resources/versions.json b/src/test/resources/versions.json index 62c6ac40..3d8846bc 100644 --- a/src/test/resources/versions.json +++ b/src/test/resources/versions.json @@ -1,9 +1,9 @@ { "testedVersions": { - "8.13.0-alpha02": [ + "8.13.0-rc01": [ "8.14" ], - "8.12.0-rc01": [ + "8.12.0": [ "8.14" ], "8.11.1": [