mirror of
https://github.com/Suwayomi/Tachidesk.git
synced 2025-12-10 06:42:07 +01:00
Use JDK 25 to build and include in releases (#1770)
* Use JDK 25 to build and include in releases * Set Jvm Targets in BuildSrc * Put JvmTarget in libs.versions.toml * Maybe this will work for Zulu * Use LTS java version
This commit is contained in:
2
.github/workflows/build_pull_request.yml
vendored
2
.github/workflows/build_pull_request.yml
vendored
@@ -47,7 +47,7 @@ jobs:
|
|||||||
- name: Set up JDK
|
- name: Set up JDK
|
||||||
uses: actions/setup-java@v5
|
uses: actions/setup-java@v5
|
||||||
with:
|
with:
|
||||||
java-version: 21
|
java-version: 25
|
||||||
distribution: 'zulu'
|
distribution: 'zulu'
|
||||||
|
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
|
|||||||
4
.github/workflows/build_push.yml
vendored
4
.github/workflows/build_push.yml
vendored
@@ -35,7 +35,7 @@ jobs:
|
|||||||
- name: Set up JDK
|
- name: Set up JDK
|
||||||
uses: actions/setup-java@v5
|
uses: actions/setup-java@v5
|
||||||
with:
|
with:
|
||||||
java-version: 21
|
java-version: 25
|
||||||
distribution: 'zulu'
|
distribution: 'zulu'
|
||||||
|
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
@@ -96,7 +96,7 @@ jobs:
|
|||||||
- name: Set up JDK
|
- name: Set up JDK
|
||||||
uses: actions/setup-java@v5
|
uses: actions/setup-java@v5
|
||||||
with:
|
with:
|
||||||
java-version: 21
|
java-version: 25
|
||||||
distribution: 'zulu'
|
distribution: 'zulu'
|
||||||
|
|
||||||
- name: Package JDK
|
- name: Package JDK
|
||||||
|
|||||||
4
.github/workflows/publish.yml
vendored
4
.github/workflows/publish.yml
vendored
@@ -36,7 +36,7 @@ jobs:
|
|||||||
- name: Set up JDK
|
- name: Set up JDK
|
||||||
uses: actions/setup-java@v5
|
uses: actions/setup-java@v5
|
||||||
with:
|
with:
|
||||||
java-version: 21
|
java-version: 25
|
||||||
distribution: 'zulu'
|
distribution: 'zulu'
|
||||||
|
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
@@ -98,7 +98,7 @@ jobs:
|
|||||||
- name: Set up JDK
|
- name: Set up JDK
|
||||||
uses: actions/setup-java@v5
|
uses: actions/setup-java@v5
|
||||||
with:
|
with:
|
||||||
java-version: 21
|
java-version: 25
|
||||||
distribution: 'zulu'
|
distribution: 'zulu'
|
||||||
|
|
||||||
- name: Package JDK
|
- name: Package JDK
|
||||||
|
|||||||
@@ -31,8 +31,9 @@ allprojects {
|
|||||||
subprojects {
|
subprojects {
|
||||||
plugins.withType<JavaPlugin> {
|
plugins.withType<JavaPlugin> {
|
||||||
extensions.configure<JavaPluginExtension> {
|
extensions.configure<JavaPluginExtension> {
|
||||||
sourceCompatibility = JavaVersion.VERSION_21
|
val javaVersion = JavaVersion.toVersion(libs.versions.jvmTarget.get())
|
||||||
targetCompatibility = JavaVersion.VERSION_21
|
sourceCompatibility = javaVersion
|
||||||
|
targetCompatibility = javaVersion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -51,7 +52,7 @@ subprojects {
|
|||||||
dependsOn("ktlintFormat")
|
dependsOn("ktlintFormat")
|
||||||
}
|
}
|
||||||
compilerOptions {
|
compilerOptions {
|
||||||
jvmTarget = JvmTarget.JVM_21
|
jvmTarget = JvmTarget.fromTarget(libs.versions.jvmTarget.get())
|
||||||
freeCompilerArgs.add("-Xcontext-receivers")
|
freeCompilerArgs.add("-Xcontext-receivers")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
`kotlin-dsl`
|
`kotlin-dsl`
|
||||||
}
|
}
|
||||||
@@ -9,3 +11,13 @@ repositories {
|
|||||||
dependencies {
|
dependencies {
|
||||||
implementation(libs.zip4j)
|
implementation(libs.zip4j)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
java {
|
||||||
|
val javaVersion = JavaVersion.toVersion(libs.versions.jvmTarget.get())
|
||||||
|
sourceCompatibility = javaVersion
|
||||||
|
targetCompatibility = javaVersion
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
|
||||||
|
compilerOptions.jvmTarget = JvmTarget.fromTarget(libs.versions.jvmTarget.get())
|
||||||
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
kotlin = "2.2.21"
|
kotlin = "2.2.21"
|
||||||
coroutines = "1.10.2"
|
coroutines = "1.10.2"
|
||||||
serialization = "1.9.0"
|
serialization = "1.9.0"
|
||||||
|
jvmTarget = "21"
|
||||||
okhttp = "5.3.0" # Major version is locked by Tachiyomi extensions
|
okhttp = "5.3.0" # Major version is locked by Tachiyomi extensions
|
||||||
javalin = "6.7.0"
|
javalin = "6.7.0"
|
||||||
jte = "3.2.1"
|
jte = "3.2.1"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
"/scripts/bundler.sh/"
|
"/scripts/bundler.sh/"
|
||||||
],
|
],
|
||||||
"matchStrings": [
|
"matchStrings": [
|
||||||
"JRE_RELEASE=[\"'](?<currentValue>.+?)[\"']\\s+"
|
"JRE_ZULU=[\"'](?<currentValue>.+?)[\"']"
|
||||||
],
|
],
|
||||||
"depNameTemplate": "zulu",
|
"depNameTemplate": "zulu",
|
||||||
"datasourceTemplate": "custom.zulu",
|
"datasourceTemplate": "custom.zulu",
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
],
|
],
|
||||||
"customDatasources": {
|
"customDatasources": {
|
||||||
"zulu": {
|
"zulu": {
|
||||||
"defaultRegistryUrlTemplate": "https://api.azul.com/metadata/v1/zulu/packages?availability_types=ca&release_status=both&java_package_type=jre&crac_supported=false&javafx_bundled=false&java_version=21&arch=x86&os=linux&archive_type=zip&page_size=1000&include_fields=java_package_features,release_status,support_term,os,arch,hw_bitness,abi,java_package_type,javafx_bundled,sha256_hash,cpu_gen,size,archive_type,certifications,lib_c_type,crac_supported&page=1&azul_com=true",
|
"defaultRegistryUrlTemplate": "https://api.azul.com/metadata/v1/zulu/packages?availability_types=ca&release_status=both&java_package_type=jre&crac_supported=false&javafx_bundled=false&support_term=lts&arch=x86&os=linux&archive_type=zip&page_size=1000&include_fields=java_package_features,release_status,support_term,os,arch,hw_bitness,abi,java_package_type,javafx_bundled,sha256_hash,cpu_gen,size,archive_type,certifications,lib_c_type,crac_supported&page=1&azul_com=true",
|
||||||
"transformTemplates": [
|
"transformTemplates": [
|
||||||
"{\"releases\": $$.$join([$join($map(distro_version[[0..2]], $string), \".\"), \"_\", $join($map(java_version, $string), \".\")])}"
|
"{\"releases\": $$.$join([$join($map(distro_version[[0..2]], $string), \".\"), \"_\", $join($map(java_version, $string), \".\")])}"
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -42,9 +42,9 @@ main() {
|
|||||||
gcc -fPIC -I$JAVA_HOME/include -I$JAVA_HOME/include/linux -shared scripts/resources/catch_abort.c -lpthread -o scripts/resources/catch_abort.so
|
gcc -fPIC -I$JAVA_HOME/include -I$JAVA_HOME/include/linux -shared scripts/resources/catch_abort.c -lpthread -o scripts/resources/catch_abort.so
|
||||||
fi
|
fi
|
||||||
|
|
||||||
JRE_ZULU="21.44.17_21.0.8"
|
JRE_ZULU="25.30.17_25.0.1"
|
||||||
JRE_RELEASE="jre${JRE_ZULU#*_}" # e.g. jre21.0.8
|
JRE_RELEASE="jre${JRE_ZULU#*_}" # e.g. jre25.0.1
|
||||||
ZULU_RELEASE="zulu${JRE_ZULU%_*}" # e.g. zulu21.44.17
|
ZULU_RELEASE="zulu${JRE_ZULU%_*}" # e.g. zulu25.30.17
|
||||||
|
|
||||||
case "$OS" in
|
case "$OS" in
|
||||||
debian-all)
|
debian-all)
|
||||||
|
|||||||
Reference in New Issue
Block a user