Skip to content

Commit

Permalink
Update dependency gradle to v8.12.1 (#1113)
Browse files Browse the repository at this point in the history
* Update dependency gradle to v8.12

* Space-assignment syntax in Groovy DSL has been deprecated. This is scheduled to be removed in Gradle 10.0.

Consult the upgrading guide for further information: https://docs.gradle.org/8.12/userguide/upgrading_version_8.html#groovy_space_assignment_syntax

* Update dependency gradle to v8.12.1

* Fix `auto relocate plugin dependencies`

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Goooler <[email protected]>

(cherry picked from commit 4ffb34f)
(cherry picked from commit 7c76ebc)
  • Loading branch information
renovate[bot] authored and Goooler committed Feb 2, 2025
1 parent 12328c9 commit 611253d
Show file tree
Hide file tree
Showing 9 changed files with 65 additions and 66 deletions.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
3 changes: 1 addition & 2 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class ConfigurationCacheSpec extends PluginSpecification {
""".stripIndent()
file('client/build.gradle') << """
apply plugin: 'java'
repositories { maven { url "${repo.uri}" } }
repositories { maven { url = "${repo.uri}" } }
dependencies { implementation 'junit:junit:3.8.2' }
""".stripIndent()

Expand All @@ -112,7 +112,7 @@ class ConfigurationCacheSpec extends PluginSpecification {
}
}
repositories { maven { url "${repo.uri}" } }
repositories { maven { url = "${repo.uri}" } }
dependencies { implementation project(':client') }
""".stripIndent()

Expand Down Expand Up @@ -151,7 +151,7 @@ class ConfigurationCacheSpec extends PluginSpecification {
apply plugin: 'java'
apply plugin: 'com.gradleup.shadow'
repositories { maven { url "${repo.uri}" } }
repositories { maven { url = "${repo.uri}" } }
dependencies {
implementation "junit:junit:3.8.2"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class ConfigureShadowRelocationSpec extends PluginSpecification {
given:
buildFile << """
tasks.named('shadowJar', com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar) {
enableRelocation true
enableRelocation = true
}
dependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ class PublishingSpec extends PluginSpecification {
implementation 'shadow:a:1.0'
shadow 'shadow:b:1.0'
}
tasks.named('shadowJar', com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar) {
archiveClassifier = ''
archiveBaseName = 'maven-all'
}
publishing {
publications {
shadow(MavenPublication) {
Expand All @@ -50,7 +50,7 @@ class PublishingSpec extends PluginSpecification {
}
repositories {
maven {
url "${publishingRepo.uri}"
url = "${publishingRepo.uri}"
}
}
}
Expand Down Expand Up @@ -102,7 +102,7 @@ class PublishingSpec extends PluginSpecification {
implementation 'shadow:a:1.0'
shadow 'shadow:b:1.0'
}
publishing {
publications {
shadow(MavenPublication) { publication ->
Expand All @@ -112,11 +112,11 @@ class PublishingSpec extends PluginSpecification {
}
repositories {
maven {
url "${publishingRepo.uri}"
url = "${publishingRepo.uri}"
}
}
}
tasks.named('shadowJar', com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar) {
archiveClassifier = 'my-classifier'
archiveExtension = 'my-ext'
Expand Down Expand Up @@ -149,12 +149,12 @@ class PublishingSpec extends PluginSpecification {
version = "1.0"
group = 'shadow'
repositories { maven { url "${repo.uri}" } }
repositories { maven { url = "${repo.uri}" } }
publishing {
repositories {
maven {
url "${publishingRepo.uri}"
url = "${publishingRepo.uri}"
}
}
}
Expand Down Expand Up @@ -184,7 +184,7 @@ class PublishingSpec extends PluginSpecification {
plugins {
id 'com.gradleup.shadow'
}
dependencies {
implementation project(':a')
shadow project(':b')
Expand All @@ -194,7 +194,7 @@ class PublishingSpec extends PluginSpecification {
archiveClassifier = ''
archiveBaseName = 'maven-all'
}
publishing {
publications {
shadow(MavenPublication) {
Expand Down Expand Up @@ -263,7 +263,7 @@ class PublishingSpec extends PluginSpecification {
}
repositories {
maven {
url "${publishingRepo.uri}"
url = "${publishingRepo.uri}"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class RelocationSpec extends PluginSpecification {
dependencies {
implementation 'junit:junit:3.8.2'
}
tasks.named('shadowJar', com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar) {
relocate 'junit.textui', 'a'
relocate 'junit.framework', 'b'
Expand Down Expand Up @@ -81,7 +81,7 @@ class RelocationSpec extends PluginSpecification {
dependencies {
implementation 'junit:junit:3.8.2'
}
// tag::relocateFilter[]
tasks.named('shadowJar', com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar) {
relocate('junit.textui', 'a') {
Expand Down Expand Up @@ -138,7 +138,7 @@ class RelocationSpec extends PluginSpecification {
dependencies {
implementation 'junit:junit:3.8.2'
}
// tag::relocate[]
tasks.named('shadowJar', com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar) {
relocate 'junit.framework', 'shadow.junit'
Expand All @@ -148,7 +148,7 @@ class RelocationSpec extends PluginSpecification {

file('src/main/java/shadow/ShadowTest.java') << '''
package shadow;
import junit.framework.Test;
import junit.framework.TestResult;
public class ShadowTest implements Test {
Expand Down Expand Up @@ -185,29 +185,29 @@ class RelocationSpec extends PluginSpecification {
given: 'Core project with dependency and resource'
file('core/build.gradle') << """
apply plugin: 'java-library'
repositories { maven { url "${repo.uri}" } }
repositories { maven { url = "${repo.uri}" } }
dependencies { api 'junit:junit:3.8.2' }
""".stripIndent()

file('core/src/main/resources/TEST') << 'TEST RESOURCE'
file('core/src/main/resources/test.properties') << 'name=test'
file('core/src/main/java/core/Core.java') << '''
package core;
import junit.framework.Test;
public class Core {}
'''.stripIndent()

and: 'App project with shadow, relocation, and project dependency'
file('app/build.gradle') << """
apply plugin: 'java'
apply plugin: 'com.gradleup.shadow'
repositories { maven { url "${repo.uri}" } }
repositories { maven { url = "${repo.uri}" } }
dependencies { implementation project(':core') }
tasks.named('shadowJar', com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar) {
relocate 'core', 'app.core'
relocate 'junit.framework', 'app.junit.framework'
Expand All @@ -217,10 +217,10 @@ class RelocationSpec extends PluginSpecification {
file('app/src/main/resources/APP-TEST') << 'APP TEST RESOURCE'
file('app/src/main/java/app/App.java') << '''
package app;
import core.Core;
import junit.framework.Test;
public class App {}
'''.stripIndent()

Expand Down Expand Up @@ -255,7 +255,7 @@ class RelocationSpec extends PluginSpecification {
.publish()
file('src/main/java/foo/Foo.java') << '''
package foo;
class Foo {}
'''.stripIndent()
file('src/main/resources/foo/foo.properties') << 'name=foo'
Expand All @@ -264,7 +264,7 @@ class RelocationSpec extends PluginSpecification {
dependencies {
implementation 'shadow:dep:1.0'
}
tasks.named('shadowJar', com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar) {
relocate 'foo', 'bar'
}
Expand Down Expand Up @@ -296,7 +296,7 @@ class RelocationSpec extends PluginSpecification {
repositories {
mavenCentral()
maven {
url 'https://repository.mapr.com/nexus/content/groups/mapr-public/releases'
url = 'https://repository.mapr.com/nexus/content/groups/mapr-public/releases'
}
}
Expand Down
Loading

0 comments on commit 611253d

Please sign in to comment.