Skip to content

Commit 455f39f

Browse files
riccardoblCopilot
andauthored
build only on java 25 and download it if needed (#2735)
Co-authored-by: Copilot <copilot@github.com>
1 parent 918b984 commit 455f39f

4 files changed

Lines changed: 14 additions & 15 deletions

File tree

.github/workflows/main.yml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,8 @@ jobs:
240240
strategy:
241241
fail-fast: false
242242
matrix:
243-
os: [ubuntu-latest,windows-latest,macOS-latest]
244-
jdk: [17, 21, 25]
243+
os: [ubuntu-latest, windows-latest, macOS-latest]
244+
jdk: [25]
245245
include:
246246
- os: ubuntu-latest
247247
osName: linux
@@ -252,23 +252,13 @@ jobs:
252252
- os: macOS-latest
253253
osName: mac
254254
deploy: false
255-
- jdk: 17
256-
deploy: false
257-
- jdk: 21
258-
deploy: false
259255

260256
steps:
261257
- name: Clone the repo
262258
uses: actions/checkout@v6.0.2
263259
with:
264260
fetch-depth: 1
265261

266-
- name: Setup the java environment
267-
uses: actions/setup-java@v5.2.0
268-
with:
269-
distribution: 'temurin'
270-
java-version: ${{ matrix.jdk }}
271-
272262
- name: Download natives for android
273263
uses: actions/download-artifact@v8.0.1
274264
with:

common.gradle

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,17 @@ version = jmeFullVersion
1818
java {
1919
sourceCompatibility = JavaVersion.VERSION_1_8
2020
targetCompatibility = JavaVersion.VERSION_1_8
21+
toolchain {
22+
languageVersion = JavaLanguageVersion.of(25)
23+
vendor = JvmVendorSpec.ADOPTIUM
24+
}
2125
}
2226

2327
tasks.withType(JavaCompile) { // compile-time options:
2428
//options.compilerArgs << '-Xlint:deprecation' // to show deprecation warnings
2529
options.compilerArgs << '-Xlint:unchecked'
2630
options.encoding = 'UTF-8'
27-
if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_1_10)) {
28-
options.release = 8
29-
}
31+
options.release = 8
3032
}
3133

3234
repositories {

gradle.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ includeBranchInVersion = false
1515
# specify if JavaDoc should be built
1616
buildJavaDoc = true
1717

18+
# Let Gradle fetch missing JDKs for toolchains automatically.
19+
org.gradle.java.installations.auto-download=true
20+
1821
# specify if SDK and Native libraries get built
1922
buildNativeProjects = false
2023
buildAndroidExamples = false

settings.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
/**
22
* This is the global settings file used by all subprojects.
33
**/
4+
plugins {
5+
id 'org.gradle.toolchains.foojay-resolver-convention' version '1.0.0'
6+
}
7+
48
rootProject.name = 'jmonkeyengine'
59

610
// Core classes, should work on all java platforms

0 commit comments

Comments
 (0)