diff --git a/gradle/dependencies.gradle b/gradle/dependencies.gradle index 48746f644..381819b01 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.vafer:jdependency:2.7.0') { + 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.8.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.9.0' + testRuntimeOnly 'org.junit.vintage:junit-vintage-engine:5.9.0' } 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) { diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index f371643ee..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.0-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists 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/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) + } + } } }