Bump Gradle to 9.0.0 (#4168)

This commit is contained in:
Glavo 2025-08-01 19:26:11 +08:00 committed by GitHub
parent 3eddfa23b7
commit 7d6f21dc3a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
13 changed files with 25 additions and 18 deletions

View File

@ -15,11 +15,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '11'
java-version: '17'
java-package: 'jdk+fx'
- name: Check Codes
run: ./gradlew checkstyle checkTranslations --no-daemon --parallel

View File

@ -13,11 +13,11 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '11'
java-version: '17'
java-package: 'jdk+fx'
- name: Build with Gradle
run: ./gradlew build --no-daemon

View File

@ -53,7 +53,8 @@ public class Library implements Comparable<Library>, Validation {
"",
Architecture.SYSTEM_ARCH.name().toLowerCase(Locale.ROOT),
Architecture.SYSTEM_ARCH.getBits().getBit()
}, variants = {"", "native", "natives"};
};
String[] variants = {"", "native", "natives"};
POSSIBLE_NATIVE_DESCRIPTORS = new String[keys.length * variants.length];
StringBuilder builder = new StringBuilder();

View File

@ -41,7 +41,7 @@ The software is distributed under [GPLv3](https://www.gnu.org/licenses/gpl-3.0.h
If you want to submit a pull request, here are some requirements:
* IDE: IntelliJ IDEA
* Compiler: Java 11+
* Compiler: Java 17+
* Do NOT modify `gradle` files
### Compilation

View File

@ -41,7 +41,7 @@ HMCL 有着强大的跨平台能力。它不仅支持 Windows、Linux、macOS
如果你想提交一个 Pull Request必须遵守如下要求
* IDEIntelliJ IDEA
* 编译器Java 11+
* 编译器Java 17+
* **不要**修改 `gradle` 相关文件
### 编译

View File

@ -41,7 +41,7 @@ HMCL 有著強大的跨平臺能力。它不僅支援 Windows、Linux、macOS
如果你想提交一個 Pull Request必須遵守如下要求
* IDEIntelliJ IDEA
* 編譯器Java 11+
* 編譯器Java 17+
* **不要**修改 `gradle` 相關文件
### 編譯

View File

@ -32,7 +32,8 @@ subprojects {
}
dependencies {
"testImplementation"("org.junit.jupiter:junit-jupiter:5.10.2")
"testImplementation"(rootProject.libs.junit.jupiter)
"testRuntimeOnly"("org.junit.platform:junit-platform-launcher")
}
tasks.withType<Test> {

View File

@ -47,7 +47,7 @@
</module>
<!-- Classes -->
<module name="FinalClass"/> <!-- class with only private constructor must be final: http://checkstyle.sourceforge.net/config_design.html#FinalClass -->
<!-- <module name="FinalClass"/> --> <!-- class with only private constructor must be final: http://checkstyle.sourceforge.net/config_design.html#FinalClass -->
<module name="SimplifyBooleanReturn"/> <!-- directly return boolean does not check and return http://checkstyle.sourceforge.net/config_design.html#SimplifyBooleanReturn -->
<module name="StringLiteralEquality"/> <!-- you can't write myString == "this" http://checkstyle.sourceforge.net/config_design.html#StringLiteralEquality -->
<module name="OneTopLevelClass"/> <!-- only one root class per file http://checkstyle.sourceforge.net/config_design.html#OneTopLevelClass -->

View File

@ -17,6 +17,9 @@ jna = "5.17.0"
pci-ids = "0.4.0"
java-info = "1.0"
# testing
junit = "5.13.4"
# plugins
shadow = "8.3.6"
@ -41,5 +44,8 @@ jna-platform = { module = "net.java.dev.jna:jna-platform", version.ref = "jna" }
pci-ids = { module = "org.glavo:pci-ids", version.ref = "pci-ids" }
java-info = { module = "org.glavo:java-info", version.ref = "java-info" }
# testing
junit-jupiter = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junit" }
[plugins]
shadow = { id = "com.gradleup.shadow", version.ref = "shadow" }

Binary file not shown.

View File

@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip
networkTimeout=120000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME

9
gradlew vendored
View File

@ -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.

4
gradlew.bat vendored
View File

@ -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