diff --git a/gradle/dependencies.gradle b/gradle/dependencies.gradle index a6de08d85..be08708bd 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.4' implementation 'org.ow2.asm:asm-commons:9.4' 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/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 9bf6891f3..b12a79a46 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 @@ -65,8 +65,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 } @@ -74,7 +73,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) + } + } } }