From 781144601cbf6eeadbb1298d96d5542506cdf97a Mon Sep 17 00:00:00 2001 From: Tim Froehlich Date: Mon, 27 Feb 2023 18:13:13 -0700 Subject: [PATCH 1/2] Update versions of Gradle to 7.6 and Kotlin to 1.8.10, to support development on systems with later versions of Java installed --- build.gradle | 2 +- gradle/wrapper/gradle-wrapper.properties | 2 +- plugin/build.gradle | 5 +++++ plugin/src/main/kotlin/com/nishtahir/CargoBuildTask.kt | 3 +++ 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 3882b4d..d572709 100644 --- a/build.gradle +++ b/build.gradle @@ -2,7 +2,7 @@ buildscript { Properties versionProperties = new Properties() versionProperties.load(new FileInputStream("$project.rootDir/version.properties")) - ext.kotlin_version = '1.3.50' + ext.kotlin_version = '1.8.10' ext.agp_version = '4.0.1' ext.plugin_version = versionProperties.getProperty("version") diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 05679dc..f42e62f 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/plugin/build.gradle b/plugin/build.gradle index 2251d37..81d3866 100644 --- a/plugin/build.gradle +++ b/plugin/build.gradle @@ -61,6 +61,11 @@ dependencies { testImplementation "org.junit.jupiter:junit-jupiter-api" } +java { + toolchain { + languageVersion.set(JavaLanguageVersion.of(8)) + } +} compileKotlin { kotlinOptions.jvmTarget = "1.8" } diff --git a/plugin/src/main/kotlin/com/nishtahir/CargoBuildTask.kt b/plugin/src/main/kotlin/com/nishtahir/CargoBuildTask.kt index 2c1966f..bc9d38a 100644 --- a/plugin/src/main/kotlin/com/nishtahir/CargoBuildTask.kt +++ b/plugin/src/main/kotlin/com/nishtahir/CargoBuildTask.kt @@ -133,6 +133,9 @@ open class CargoBuildTask : DefaultTask() { theCommandLine.add(features.featureSet.joinToString(" ")) } } + else -> { + // when() must be exhaustive + } } if (cargoExtension.profile != "debug") { From 1e70cdc2e954eeb7ef065bd05f882e510ea8846f Mon Sep 17 00:00:00 2001 From: Tim Froehlich Date: Mon, 27 Feb 2023 18:19:08 -0700 Subject: [PATCH 2/2] Add Android Gradle Plugin 7.4.2 to test matrix --- plugin/build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/plugin/build.gradle b/plugin/build.gradle index 81d3866..91e6d58 100644 --- a/plugin/build.gradle +++ b/plugin/build.gradle @@ -29,6 +29,7 @@ def isCI = (System.getenv('CI') ?: 'false').toBoolean() // Maps supported Android plugin versions to the versions of Gradle that support it def supportedVersions = [ + "7.4.2": ["7.5.1", "7.6"], "7.0.0": ["7.1.1"], "4.2.2": ["6.8.3", "7.1.1"], "4.1.3": ["6.5.1", "6.8.3"],