From 60a8458c3689964ef2b7e133df108e84134a1b81 Mon Sep 17 00:00:00 2001 From: "J.T. McQuigg" Date: Wed, 27 Jul 2022 20:23:47 -0400 Subject: [PATCH 1/6] Update Gradle Wrapper to 7.5 --- gradle/wrapper/gradle-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index f371643ee..8049c684f 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.0-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists From bd49ddeff6f9988e4133d51de4955b12b9e7e43d Mon Sep 17 00:00:00 2001 From: "J.T. McQuigg" Date: Wed, 27 Jul 2022 20:30:00 -0400 Subject: [PATCH 2/6] Update dependencies --- gradle/dependencies.gradle | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/gradle/dependencies.gradle b/gradle/dependencies.gradle index 48746f644..9a7882cf3 100644 --- a/gradle/dependencies.gradle +++ b/gradle/dependencies.gradle @@ -4,24 +4,24 @@ dependencies { shadow gradleApi() shadow 'org.codehaus.groovy:groovy-backports-compat23:3.0.8' - implementation 'org.jdom:jdom2:2.0.6' + implementation 'org.jdom:jdom2:2.0.6.1' implementation 'org.ow2.asm:asm:9.3' implementation 'org.ow2.asm:asm-commons:9.3' implementation 'commons-io:commons-io:2.11.0' - implementation 'org.apache.ant:ant:1.10.11' - implementation 'org.codehaus.plexus:plexus-utils:3.4.1' - implementation "org.apache.logging.log4j:log4j-core:2.17.1" + implementation 'org.apache.ant:ant:1.10.12' + implementation 'org.codehaus.plexus:plexus-utils:3.4.2' + implementation "org.apache.logging.log4j:log4j-core:2.18.0" implementation('org.vafer:jdependency:2.7.0') { exclude group: 'org.ow2.asm' } - testImplementation('org.spockframework:spock-core:2.0-groovy-3.0') { + testImplementation('org.spockframework:spock-core:2.1-groovy-3.0') { exclude group: 'org.codehaus.groovy' } - testImplementation 'org.spockframework:spock-junit4:2.0-groovy-3.0' + testImplementation 'org.spockframework:spock-junit4:2.1-groovy-3.0' testImplementation 'xmlunit:xmlunit:1.6' testImplementation 'org.apache.commons:commons-lang3:3.12.0' - testImplementation 'com.google.guava:guava:31.0.1-jre' - testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1' - testRuntimeOnly 'org.junit.vintage:junit-vintage-engine:5.8.1' + testImplementation 'com.google.guava:guava:31.1-jre' + testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2' + testRuntimeOnly 'org.junit.vintage:junit-vintage-engine:5.8.2' } From c00320e76b2b2ca92d34447c2a8e3c1f64fa5857 Mon Sep 17 00:00:00 2001 From: Heizi Date: Thu, 8 Sep 2022 23:00:56 +0800 Subject: [PATCH 3/6] update gradle version to 7.5.1 and fix hash utils deprecated --- gradle/wrapper/gradle-wrapper.properties | 2 +- .../shadow/util/repo/AbstractModule.groovy | 20 ++++++++++++++----- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 8049c684f..ae04661ee 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.5-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/test/groovy/com/github/jengelman/gradle/plugins/shadow/util/repo/AbstractModule.groovy b/src/test/groovy/com/github/jengelman/gradle/plugins/shadow/util/repo/AbstractModule.groovy index 4b9be7c67..88c697c15 100644 --- a/src/test/groovy/com/github/jengelman/gradle/plugins/shadow/util/repo/AbstractModule.groovy +++ b/src/test/groovy/com/github/jengelman/gradle/plugins/shadow/util/repo/AbstractModule.groovy @@ -1,7 +1,7 @@ package com.github.jengelman.gradle.plugins.shadow.util.repo import com.github.jengelman.gradle.plugins.shadow.util.file.TestFile -import org.gradle.internal.hash.HashUtil +import org.gradle.internal.impldep.org.apache.commons.codec.digest.DigestUtils abstract class AbstractModule { @@ -66,8 +66,7 @@ abstract class AbstractModule { private TestFile hashFile(TestFile file, String algorithm, int len) { def hashFile = getHashFile(file, algorithm) - def hash = getHash(file, algorithm) - hashFile.text = String.format("%0${len}x", hash) + hashFile.text = getHash(file, algorithm) return hashFile } @@ -75,7 +74,18 @@ abstract class AbstractModule { file.parentFile.file("${file.name}.${algorithm}") } - protected BigInteger getHash(TestFile file, String algorithm) { - HashUtil.createHash(file, algorithm.toUpperCase()).asBigInteger() + protected String getHash(TestFile file, String algorithm) { + file.newInputStream().withCloseable { + switch (algorithm) { + case 'sha1': + DigestUtils.sha1Hex(it) + break + case 'md5' : + DigestUtils.md5Hex(it) + break + default: + throw new IOException("Unsupported algorithm " + algorithm) + } + } } } From 79d5d8d00aa1d5a18a4669060a743b7aac64543a Mon Sep 17 00:00:00 2001 From: Heizi Date: Thu, 8 Sep 2022 23:12:07 +0800 Subject: [PATCH 4/6] update dependents --- gradle/dependencies.gradle | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gradle/dependencies.gradle b/gradle/dependencies.gradle index 9a7882cf3..381819b01 100644 --- a/gradle/dependencies.gradle +++ b/gradle/dependencies.gradle @@ -11,7 +11,7 @@ dependencies { implementation 'org.apache.ant:ant:1.10.12' implementation 'org.codehaus.plexus:plexus-utils:3.4.2' implementation "org.apache.logging.log4j:log4j-core:2.18.0" - implementation('org.vafer:jdependency:2.7.0') { + implementation('org.vafer:jdependency:2.8.0') { exclude group: 'org.ow2.asm' } @@ -22,6 +22,6 @@ dependencies { testImplementation 'xmlunit:xmlunit:1.6' testImplementation 'org.apache.commons:commons-lang3:3.12.0' testImplementation 'com.google.guava:guava:31.1-jre' - testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2' - testRuntimeOnly 'org.junit.vintage:junit-vintage-engine:5.8.2' + testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.0' + testRuntimeOnly 'org.junit.vintage:junit-vintage-engine:5.9.0' } From ac8697f035e5fe007540beab29a2391c9fe2c410 Mon Sep 17 00:00:00 2001 From: Heizi Date: Thu, 8 Sep 2022 23:26:15 +0800 Subject: [PATCH 5/6] update gradle enterprise version --- settings.gradle | 2 +- .../jengelman/gradle/plugins/shadow/ShadowExtension.groovy | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/settings.gradle b/settings.gradle index f82018015..cd178262b 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,5 +1,5 @@ plugins { - id 'com.gradle.enterprise' version '3.1.1' + id 'com.gradle.enterprise' version '3.11.1' } rootProject.name = 'shadow' \ No newline at end of file diff --git a/src/main/groovy/com/github/jengelman/gradle/plugins/shadow/ShadowExtension.groovy b/src/main/groovy/com/github/jengelman/gradle/plugins/shadow/ShadowExtension.groovy index 22ff62f80..f69425c74 100644 --- a/src/main/groovy/com/github/jengelman/gradle/plugins/shadow/ShadowExtension.groovy +++ b/src/main/groovy/com/github/jengelman/gradle/plugins/shadow/ShadowExtension.groovy @@ -28,8 +28,7 @@ class ShadowExtension { publication.pom { MavenPom pom -> pom.withXml { xml -> - def dependenciesNode = xml.asNode().get('dependencies')?.get(0) ?: xml.asNode().appendNode('dependencies') - dependenciesNode.value = "" + def dependenciesNode = xml.asNode().appendNode('dependencies') project.configurations.shadow.allDependencies.each { if ((it instanceof ProjectDependency) || ! (it instanceof SelfResolvingDependency)) { def dependencyNode = dependenciesNode.appendNode('dependency') From fa66cd529e910dce0efcc885c59dd277451cae7c Mon Sep 17 00:00:00 2001 From: Heizi Date: Thu, 8 Sep 2022 23:42:47 +0800 Subject: [PATCH 6/6] fix java doc --- gradle/docs.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/docs.gradle b/gradle/docs.gradle index 1f8150538..47d49c055 100644 --- a/gradle/docs.gradle +++ b/gradle/docs.gradle @@ -1,4 +1,4 @@ -def javaApiUrl = 'http://docs.oracle.com/javase/1.7.0/docs/api' +def javaApiUrl = 'http://docs.oracle.com/javase/17/docs/api' def groovyApiUrl = "http://docs.groovy-lang.org/2.4.7/html/gapi/" tasks.withType(Javadoc) {