Skip to content

Commit 18e6da6

Browse files
committed
Add: Support for Android Gradle Plugin 9.0.0 [WIP]
1 parent ac0fe76 commit 18e6da6

9 files changed

Lines changed: 21 additions & 18 deletions

File tree

gradle/libs.versions.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[versions]
22
androidMinSdk = "21"
3-
androidTargetSdk = "35"
3+
androidTargetSdk = "36"
44
androidCompileSdk = "36"
55
kotlin = "2.2.0"
66
androidGradlePlugin = "8.11.1"
@@ -19,7 +19,7 @@ espressoCore = { module = "androidx.test.espresso:espresso-core",
1919
androidJUnit = { module = "androidx.test.ext:junit", version = "1.2.1" }
2020
commonsCsv = { module = "org.apache.commons:commons-csv", version = "1.14.0" }
2121
kotlinTest = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }
22-
robolectric = { module = "org.robolectric:robolectric", version = "4.15.1" }
22+
robolectric = { module = "org.robolectric:robolectric", version = "4.16.1" }
2323
mockk = { module = "io.mockk:mockk", version = "1.14.5" }
2424
jacksonYaml = { module = "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml", version = "2.19.2"}
2525
jacksonKotlin = { module = "com.fasterxml.jackson.module:jackson-module-kotlin", version = "2.19.2"}

gradle/wrapper/gradle-wrapper.jar

181 Bytes
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew

Lines changed: 4 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gradlew.bat

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugin/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,12 @@ pluginManager.withPlugin("jacoco") {
118118
it.group = "reporting"
119119
it.description = "Generates testkit-gradle.properties file which can be read and added to a TestKit build as gradle.properties"
120120
it.dependsOn(extractJacocoRuntimeTask)
121-
it.outputFile = new File(buildDir, "testkit/${javaTestTask.name}/gradle.properties")
122-
it.property("org.gradle.jvmargs", "\"-javaagent:${buildDir}/testkit/jacocoagent.jar=destfile=${destinationFileProvider.get()}\"")
121+
it.destinationFile.set(project.layout.buildDirectory.file("testkit/${javaTestTask.name}/gradle.properties"))
122+
it.property("org.gradle.jvmargs", "\"-javaagent:${project.layout.buildDirectory.get()}/testkit/jacocoagent.jar=destfile=${destinationFileProvider.get()}\"")
123123
}
124124

125125
// Make the generated gradle.properties file available on the test classpath as resource
126-
dependencies.add(JavaPlugin.TEST_RUNTIME_ONLY_CONFIGURATION_NAME, files(new File(buildDir, "testkit/${javaTestTask.name}")))
126+
dependencies.add(JavaPlugin.TEST_RUNTIME_ONLY_CONFIGURATION_NAME, files(project.layout.buildDirectory.file("testkit/${javaTestTask.name}")))
127127

128128
// "Fixes": https://github.com/gradle/gradle/issues/16603
129129
def jacocoTestReport = tasks.named("jacocoTestReport")

plugin/src/test/kotlin/org/neotech/plugin/rootcoverage/IntegrationTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ class IntegrationTest(
232232

233233
val fixture = File("src/test/test-fixtures/multi-module")
234234

235-
val gradleVersions = arrayOf("8.13", "8.14.3")
235+
val gradleVersions = arrayOf("9.1.0", "9.2.1", "9.3.1")
236236

237237
val configurations = File(fixture, "configurations").listFiles() ?: error("Configurations folder not found in $fixture")
238238
return configurations.flatMap { configuration ->

plugin/src/test/test-fixtures/multi-module/library_java/build.gradle

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,7 @@ dependencies {
66
implementation fileTree(dir: 'libs', include: ['*.jar'])
77
}
88

9-
sourceCompatibility = JavaVersion.VERSION_21
10-
targetCompatibility = JavaVersion.VERSION_21
9+
java {
10+
sourceCompatibility = JavaVersion.VERSION_21
11+
targetCompatibility = JavaVersion.VERSION_21
12+
}

plugin/src/test/test-fixtures/multi-module/library_nested/java/build.gradle

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,7 @@ dependencies {
66
implementation fileTree(dir: 'libs', include: ['*.jar'])
77
}
88

9-
sourceCompatibility = JavaVersion.VERSION_21
10-
targetCompatibility = JavaVersion.VERSION_21
9+
java {
10+
sourceCompatibility = JavaVersion.VERSION_21
11+
targetCompatibility = JavaVersion.VERSION_21
12+
}

0 commit comments

Comments
 (0)