Skip to content

Commit a4c14ba

Browse files
authored
Gradle 9.1.0-rc-1 (#1653)
* https://docs.gradle.org/9.1.0-rc-1/release-notes.html * Update `doNotErrorOnRelocatingJava9Classes` * Disable `--warning-mode=fail` for KMP https://youtrack.jetbrains.com/issue/KT-78620 * Remove AGP and `AndroidPluginTest`
1 parent d336a97 commit a4c14ba

File tree

10 files changed

+30
-52
lines changed

10 files changed

+30
-52
lines changed

.github/renovate.json5

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,5 @@
1515
"org.ow2.asm:asm-commons"
1616
],
1717
},
18-
{
19-
// AGP version should match the min Gradle version used in tests.
20-
"enabled": false,
21-
"matchPackageNames": [
22-
'com.android.tools.build:gradle',
23-
],
24-
},
2518
]
2619
}

build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ dependencies {
115115
implementation(libs.plexus.utils)
116116
implementation(libs.plexus.xml)
117117

118-
testPluginClasspath(libs.agp)
119118
testPluginClasspath(libs.foojayResolver)
120119
testPluginClasspath(libs.develocity)
121120
testPluginClasspath(libs.kotlin.kmp)

gradle/libs.versions.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ foojayResolver = "org.gradle.toolchains.foojay-resolver-convention:org.gradle.to
2222
develocity = "com.gradle:develocity-gradle-plugin:4.1"
2323
kotlin-kmp = { module = "org.jetbrains.kotlin.multiplatform:org.jetbrains.kotlin.multiplatform.gradle.plugin", version.ref = "kotlin" }
2424
pluginPublish = { module = "com.gradle.publish:plugin-publish-plugin", version.ref = "pluginPublish" }
25-
# AGP version should match the min Gradle version used in tests.
26-
# https://developer.android.com/build/releases/gradle-plugin#updating-gradle
27-
agp = "com.android.tools.build:gradle:8.8.0"
2825

2926
androidx-gradlePluginLints = "androidx.lint:lint-gradle:1.0.0-alpha05"
3027
# Dummy to get renovate updates, the version is used in rootProject build.gradle with spotless.

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-9.0.0-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-rc-1-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ case "$( uname )" in #(
114114
NONSTOP* ) nonstop=true ;;
115115
esac
116116

117-
CLASSPATH="\\\"\\\""
118117

119118

120119
# Determine the Java command to use to start the JVM.
@@ -172,7 +171,6 @@ fi
172171
# For Cygwin or MSYS, switch paths to Windows format before running java
173172
if "$cygwin" || "$msys" ; then
174173
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
175-
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
176174

177175
JAVACMD=$( cygpath --unix "$JAVACMD" )
178176

@@ -212,7 +210,6 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
212210

213211
set -- \
214212
"-Dorg.gradle.appname=$APP_BASE_NAME" \
215-
-classpath "$CLASSPATH" \
216213
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
217214
"$@"
218215

gradlew.bat

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,10 @@ goto fail
7070
:execute
7171
@rem Setup the command line
7272

73-
set CLASSPATH=
7473

7574

7675
@rem Execute Gradle
77-
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
76+
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
7877

7978
:end
8079
@rem End local scope for the variables with windows NT shell

src/documentTest/kotlin/com/github/jengelman/gradle/plugins/shadow/snippet/SnippetExecutable.kt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,22 @@ sealed class SnippetExecutable : Executable {
8282
JarOutputStream(it.outputStream()).use {}
8383
}
8484

85+
val warningMode = if (mainScript.contains("org.jetbrains.kotlin.multiplatform")) {
86+
"none" // TODO: https://youtrack.jetbrains.com/issue/KT-78620
87+
} else {
88+
"fail"
89+
}
90+
8591
try {
8692
GradleRunner.create()
8793
.withGradleVersion(testGradleVersion)
8894
.withProjectDir(projectRoot.toFile())
8995
.withPluginClasspath()
9096
.forwardOutput()
91-
.withArguments("--warning-mode=fail", "build")
97+
.withArguments(
98+
"--warning-mode=$warningMode",
99+
"build",
100+
)
92101
.build()
93102
} catch (t: Throwable) {
94103
throw RuntimeException("Failed to execute snippet:\n\n$mainScript", t)

src/functionalTest/kotlin/com/github/jengelman/gradle/plugins/shadow/AndroidPluginTest.kt

Lines changed: 0 additions & 29 deletions
This file was deleted.

src/functionalTest/kotlin/com/github/jengelman/gradle/plugins/shadow/BasePluginTest.kt

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,21 @@ abstract class BasePluginTest {
400400
.forwardOutput()
401401
.withPluginClasspath()
402402
.withTestKitDir(testKitDir.toFile())
403-
.withArguments(commonArguments + arguments)
403+
.withArguments(
404+
buildList {
405+
val warningsAsErrors = try {
406+
// TODO: https://youtrack.jetbrains.com/issue/KT-78620
407+
!projectScript.readText().contains("org.jetbrains.kotlin.multiplatform")
408+
} catch (_: UninitializedPropertyAccessException) {
409+
true // Default warning mode if projectScript is not initialized yet.
410+
}
411+
if (warningsAsErrors) {
412+
add("--warning-mode=fail")
413+
}
414+
addAll(commonArguments)
415+
addAll(arguments)
416+
},
417+
)
404418
.apply {
405419
if (projectDir != null) {
406420
withProjectDir(projectDir.toFile())
@@ -448,7 +462,6 @@ abstract class BasePluginTest {
448462
const val jarTask = "tasks.named('jar', Jar)"
449463

450464
val commonArguments = listOf(
451-
"--warning-mode=fail",
452465
"--configuration-cache",
453466
"--build-cache",
454467
"--parallel",

src/functionalTest/kotlin/com/github/jengelman/gradle/plugins/shadow/RelocationTest.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -323,9 +323,9 @@ class RelocationTest : BasePluginTest() {
323323
"""
324324
dependencies {
325325
implementation 'org.slf4j:slf4j-api:1.7.21'
326-
implementation group: 'io.netty', name: 'netty-all', version: '4.0.23.Final'
327-
implementation group: 'com.google.protobuf', name: 'protobuf-java', version: '2.5.0'
328-
implementation group: 'org.apache.zookeeper', name: 'zookeeper', version: '3.4.6'
326+
implementation 'io.netty:netty-all:4.0.23.Final'
327+
implementation 'com.google.protobuf:protobuf-java:2.5.0'
328+
implementation 'org.apache.zookeeper:zookeeper:3.4.6'
329329
}
330330
$shadowJarTask {
331331
zip64 = true

0 commit comments

Comments
 (0)