diff --git a/build.gradle b/build.gradle index b59595b5b1..c6af6ff9e5 100644 --- a/build.gradle +++ b/build.gradle @@ -7,9 +7,9 @@ import java.time.Duration plugins { id 'jacoco' - id 'com.gradleup.shadow' version '8.3.0' + id 'com.gradleup.shadow' version '8.3.8' id 'org.jetbrains.kotlin.jvm' version '2.0.0' - id("io.github.gradle-nexus.publish-plugin") version '2.0.0' + id 'io.github.gradle-nexus.publish-plugin' version '2.0.0' } apply plugin: 'jacoco' @@ -208,13 +208,8 @@ testFixturesJar { destinationDirectory = file("$rootDir/build/extralibs") } -task sourceJar(type:Jar) { - archiveClassifier = "sources" - from sourceSets.main.allSource -} - -tasks.withType(Javadoc) { - failOnError false +tasks.withType(Javadoc).configureEach { + failOnError = false include 'org/jetbrains/java/decompiler/api/**' include 'org/jetbrains/java/decompiler/main/extern/**' options.addStringOption('Xdoclint:none', '-quiet') @@ -227,7 +222,7 @@ java { withJavadocJar() } -tasks.withType(Jar) { +tasks.withType(Jar).configureEach { reproducibleFileOrder = true preserveFileTimestamps = false } @@ -314,8 +309,8 @@ nexusPublishing { username = ENV.SONATYPE_USER password = ENV.SONATYPE_PASS - nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/")) - snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")) + nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/")) + snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/")) } } diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index 2563db1e8c..4d20e94620 100644 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -8,5 +8,6 @@ repositories { } dependencies { + implementation gradleApi() implementation 'org.openjdk.asmtools:asmtools-core:7.0.b10-ea' } \ No newline at end of file diff --git a/buildSrc/src/main/java/org/vineflower/build/JasmCompile.java b/buildSrc/src/main/java/org/vineflower/build/JasmCompile.java index ed37840b66..6583e1fcd0 100644 --- a/buildSrc/src/main/java/org/vineflower/build/JasmCompile.java +++ b/buildSrc/src/main/java/org/vineflower/build/JasmCompile.java @@ -14,7 +14,7 @@ import java.util.ArrayList; import java.util.List; -public class JasmCompile extends SourceTask { +public abstract class JasmCompile extends SourceTask { private final DirectoryProperty destinationDirectory = this.getProject().getObjects().directoryProperty(); private final JasmCompileOptions compileOptions = this.getProject().getObjects().newInstance(JasmCompileOptions.class); diff --git a/buildSrc/src/main/java/org/vineflower/build/JasmCompileOptions.java b/buildSrc/src/main/java/org/vineflower/build/JasmCompileOptions.java index f15bfea83e..6948dda3e9 100644 --- a/buildSrc/src/main/java/org/vineflower/build/JasmCompileOptions.java +++ b/buildSrc/src/main/java/org/vineflower/build/JasmCompileOptions.java @@ -1,12 +1,12 @@ package org.vineflower.build; +import java.io.Serializable; import org.gradle.api.tasks.Input; -import org.gradle.api.tasks.compile.AbstractOptions; import java.util.ArrayList; import java.util.List; -public class JasmCompileOptions extends AbstractOptions { +public class JasmCompileOptions implements Serializable { private List compilerArgs = new ArrayList<>(); @Input diff --git a/gradle.properties b/gradle.properties index c7e5b6bd4d..7c61704231 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,6 +2,6 @@ kotlin.stdlib.default.dependency = false # Dependencies for Gradle groovy=3.0.9 -hamcrest=2.2 -junit_bom=5.9.2 +hamcrest=3.0 +junit_bom=5.13.4 scala_library=3.2.2 diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index a4b76b9530..8bdaf60c75 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 9355b41557..2a84e188b8 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/gradlew b/gradlew index f5feea6d6b..ef07e0162b 100755 --- a/gradlew +++ b/gradlew @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright © 2015-2021 the original authors. +# Copyright © 2015 the original authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -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 @@ -115,7 +114,7 @@ case "$( uname )" in #( NONSTOP* ) nonstop=true ;; esac -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar +CLASSPATH="\\\"\\\"" # Determine the Java command to use to start the JVM. @@ -206,7 +205,7 @@ fi DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Collect all arguments for the java command: -# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, # and any embedded shellness will be escaped. # * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be # treated as '${Hostname}' itself on the command line. @@ -214,7 +213,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ + -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ "$@" # Stop when "xargs" is not available. diff --git a/gradlew.bat b/gradlew.bat index 9d21a21834..db3a6ac207 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -70,11 +70,11 @@ goto fail :execute @rem Setup the command line -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar +set CLASSPATH= @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* +"%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" %* :end @rem End local scope for the variables with windows NT shell diff --git a/settings.gradle b/settings.gradle index 1ec4b18cad..84a5283baf 100644 --- a/settings.gradle +++ b/settings.gradle @@ -6,7 +6,7 @@ pluginManagement { } plugins { - id 'org.gradle.toolchains.foojay-resolver-convention' version '0.8.0' + id 'org.gradle.toolchains.foojay-resolver-convention' version '1.0.0' } rootProject.name = 'vineflower'