mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-08-03 11:26:38 -04:00
Bump Gradle to 9.0.0 (#4168)
This commit is contained in:
parent
3eddfa23b7
commit
7d6f21dc3a
4
.github/workflows/check-codes.yml
vendored
4
.github/workflows/check-codes.yml
vendored
@ -15,11 +15,11 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Set up JDK 11
|
- name: Set up JDK 17
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: 'zulu'
|
distribution: 'zulu'
|
||||||
java-version: '11'
|
java-version: '17'
|
||||||
java-package: 'jdk+fx'
|
java-package: 'jdk+fx'
|
||||||
- name: Check Codes
|
- name: Check Codes
|
||||||
run: ./gradlew checkstyle checkTranslations --no-daemon --parallel
|
run: ./gradlew checkstyle checkTranslations --no-daemon --parallel
|
||||||
|
4
.github/workflows/gradle.yml
vendored
4
.github/workflows/gradle.yml
vendored
@ -13,11 +13,11 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Set up JDK 11
|
- name: Set up JDK 17
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: 'zulu'
|
distribution: 'zulu'
|
||||||
java-version: '11'
|
java-version: '17'
|
||||||
java-package: 'jdk+fx'
|
java-package: 'jdk+fx'
|
||||||
- name: Build with Gradle
|
- name: Build with Gradle
|
||||||
run: ./gradlew build --no-daemon
|
run: ./gradlew build --no-daemon
|
||||||
|
@ -53,7 +53,8 @@ public class Library implements Comparable<Library>, Validation {
|
|||||||
"",
|
"",
|
||||||
Architecture.SYSTEM_ARCH.name().toLowerCase(Locale.ROOT),
|
Architecture.SYSTEM_ARCH.name().toLowerCase(Locale.ROOT),
|
||||||
Architecture.SYSTEM_ARCH.getBits().getBit()
|
Architecture.SYSTEM_ARCH.getBits().getBit()
|
||||||
}, variants = {"", "native", "natives"};
|
};
|
||||||
|
String[] variants = {"", "native", "natives"};
|
||||||
|
|
||||||
POSSIBLE_NATIVE_DESCRIPTORS = new String[keys.length * variants.length];
|
POSSIBLE_NATIVE_DESCRIPTORS = new String[keys.length * variants.length];
|
||||||
StringBuilder builder = new StringBuilder();
|
StringBuilder builder = new StringBuilder();
|
||||||
|
@ -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:
|
If you want to submit a pull request, here are some requirements:
|
||||||
|
|
||||||
* IDE: IntelliJ IDEA
|
* IDE: IntelliJ IDEA
|
||||||
* Compiler: Java 11+
|
* Compiler: Java 17+
|
||||||
* Do NOT modify `gradle` files
|
* Do NOT modify `gradle` files
|
||||||
|
|
||||||
### Compilation
|
### Compilation
|
||||||
|
@ -41,7 +41,7 @@ HMCL 有着强大的跨平台能力。它不仅支持 Windows、Linux、macOS
|
|||||||
如果你想提交一个 Pull Request,必须遵守如下要求:
|
如果你想提交一个 Pull Request,必须遵守如下要求:
|
||||||
|
|
||||||
* IDE:IntelliJ IDEA
|
* IDE:IntelliJ IDEA
|
||||||
* 编译器:Java 11+
|
* 编译器:Java 17+
|
||||||
* **不要**修改 `gradle` 相关文件
|
* **不要**修改 `gradle` 相关文件
|
||||||
|
|
||||||
### 编译
|
### 编译
|
||||||
|
@ -41,7 +41,7 @@ HMCL 有著強大的跨平臺能力。它不僅支援 Windows、Linux、macOS
|
|||||||
如果你想提交一個 Pull Request,必須遵守如下要求:
|
如果你想提交一個 Pull Request,必須遵守如下要求:
|
||||||
|
|
||||||
* IDE:IntelliJ IDEA
|
* IDE:IntelliJ IDEA
|
||||||
* 編譯器:Java 11+
|
* 編譯器:Java 17+
|
||||||
* **不要**修改 `gradle` 相關文件
|
* **不要**修改 `gradle` 相關文件
|
||||||
|
|
||||||
### 編譯
|
### 編譯
|
||||||
|
@ -32,7 +32,8 @@ subprojects {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
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> {
|
tasks.withType<Test> {
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
</module>
|
</module>
|
||||||
|
|
||||||
<!-- Classes -->
|
<!-- 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="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="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 -->
|
<module name="OneTopLevelClass"/> <!-- only one root class per file http://checkstyle.sourceforge.net/config_design.html#OneTopLevelClass -->
|
||||||
|
@ -17,6 +17,9 @@ jna = "5.17.0"
|
|||||||
pci-ids = "0.4.0"
|
pci-ids = "0.4.0"
|
||||||
java-info = "1.0"
|
java-info = "1.0"
|
||||||
|
|
||||||
|
# testing
|
||||||
|
junit = "5.13.4"
|
||||||
|
|
||||||
# plugins
|
# plugins
|
||||||
shadow = "8.3.6"
|
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" }
|
pci-ids = { module = "org.glavo:pci-ids", version.ref = "pci-ids" }
|
||||||
java-info = { module = "org.glavo:java-info", version.ref = "java-info" }
|
java-info = { module = "org.glavo:java-info", version.ref = "java-info" }
|
||||||
|
|
||||||
|
# testing
|
||||||
|
junit-jupiter = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junit" }
|
||||||
|
|
||||||
[plugins]
|
[plugins]
|
||||||
shadow = { id = "com.gradleup.shadow", version.ref = "shadow" }
|
shadow = { id = "com.gradleup.shadow", version.ref = "shadow" }
|
||||||
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,6 +1,6 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
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
|
networkTimeout=120000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
9
gradlew
vendored
9
gradlew
vendored
@ -86,8 +86,7 @@ done
|
|||||||
# shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
APP_BASE_NAME=${0##*/}
|
APP_BASE_NAME=${0##*/}
|
||||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
# 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
|
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
|
||||||
' "$PWD" ) || exit
|
|
||||||
|
|
||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
MAX_FD=maximum
|
MAX_FD=maximum
|
||||||
@ -115,7 +114,7 @@ case "$( uname )" in #(
|
|||||||
NONSTOP* ) nonstop=true ;;
|
NONSTOP* ) nonstop=true ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
CLASSPATH="\\\"\\\""
|
||||||
|
|
||||||
|
|
||||||
# Determine the Java command to use to start the JVM.
|
# Determine the Java command to use to start the JVM.
|
||||||
@ -206,7 +205,7 @@ fi
|
|||||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
|
|
||||||
# Collect all arguments for the java command:
|
# 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.
|
# 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
|
# * 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.
|
# treated as '${Hostname}' itself on the command line.
|
||||||
@ -214,7 +213,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
|||||||
set -- \
|
set -- \
|
||||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||||
-classpath "$CLASSPATH" \
|
-classpath "$CLASSPATH" \
|
||||||
org.gradle.wrapper.GradleWrapperMain \
|
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
||||||
"$@"
|
"$@"
|
||||||
|
|
||||||
# Stop when "xargs" is not available.
|
# Stop when "xargs" is not available.
|
||||||
|
4
gradlew.bat
vendored
4
gradlew.bat
vendored
@ -70,11 +70,11 @@ goto fail
|
|||||||
:execute
|
:execute
|
||||||
@rem Setup the command line
|
@rem Setup the command line
|
||||||
|
|
||||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
set CLASSPATH=
|
||||||
|
|
||||||
|
|
||||||
@rem Execute Gradle
|
@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
|
:end
|
||||||
@rem End local scope for the variables with windows NT shell
|
@rem End local scope for the variables with windows NT shell
|
||||||
|
Loading…
x
Reference in New Issue
Block a user