Skip to content

Commit 09d5ed6

Browse files
committed
Update gradle to v9.2.1 with Java 25 support.
1 parent 4fa0ee2 commit 09d5ed6

8 files changed

Lines changed: 44 additions & 27 deletions

File tree

adventure-editor/build.gradle

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,27 @@ plugins {
1515
}
1616

1717
group = 'com.bladecoder.engineeditor'
18-
mainClassName = 'com.bladecoder.engineeditor.Main'
18+
19+
application {
20+
mainClass = 'com.bladecoder.engineeditor.Main'
21+
applicationDefaultJvmArgs = ['-Djava.awt.headless=true']
22+
}
1923

2024
// java
21-
sourceCompatibility = 1.8
22-
targetCompatibility = 1.8
25+
java {
26+
sourceCompatibility = JavaVersion.VERSION_1_8
27+
targetCompatibility = JavaVersion.VERSION_1_8
28+
}
2329
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
2430

25-
applicationDefaultJvmArgs = ['-Djava.awt.headless=true']
26-
2731
jar {
2832
manifest.attributes += [
2933
'github' : 'https://github.com/bladecoder/bladecoder-adventure-engine/',
3034
'license' : 'Apache-2.0',
3135
'group' : project.group,
3236
'version' : project.version,
3337
'libgdx' : libgdxVersion,
34-
'java' : targetCompatibility,
38+
'java' : java.targetCompatibility,
3539
'timestamp': System.currentTimeMillis()
3640
]
3741
}
@@ -86,8 +90,8 @@ task setVersion(type: WriteProperties) {
8690
props."androidGradlePluginVersion" = androidGradlePluginVersion
8791
props."bladeInkVersion" = bladeInkVersion
8892

89-
setProperties(props);
90-
setOutputFile(propFile);
93+
properties = props
94+
destinationFile = propFile
9195

9296
doLast {
9397
println "Set version info in versions.properties"

adventure-editor/src/main/resources/projectTmpl/core/build.gradle

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
apply plugin: 'java'
22
apply plugin: 'java-library'
33

4-
sourceCompatibility = 1.8
5-
targetCompatibility = 1.8
4+
java {
5+
sourceCompatibility = JavaVersion.VERSION_1_8
6+
targetCompatibility = JavaVersion.VERSION_1_8
7+
}
68

79
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
810

@@ -32,8 +34,8 @@ task setVersion(type: WriteProperties) {
3234
props."gdxVersion" = gdxVersion
3335
props."roboVMVersion" = roboVMVersion
3436

35-
setProperties(props);
36-
setOutputFile(propFile);
37+
properties = props
38+
destinationFile = propFile
3739

3840
doLast {
3941
println "Set version info in versions.properties"

adventure-editor/src/main/resources/projectTmpl/desktop/build.gradle

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
apply plugin: 'java-library'
22
apply plugin: 'application'
33

4-
sourceCompatibility = 1.8
5-
targetCompatibility = 1.8
4+
java {
5+
sourceCompatibility = JavaVersion.VERSION_1_8
6+
targetCompatibility = JavaVersion.VERSION_1_8
7+
}
68

79
sourceSets.main.resources.srcDirs += [rootProject.file('assets').absolutePath]
8-
mainClassName = "com.bladecoder.engine.DesktopLauncher"
10+
11+
application {
12+
mainClass = "com.bladecoder.engine.DesktopLauncher"
13+
}
914
//applicationDefaultJvmArgs = ["-XstartOnFirstThread"]
1015

1116
dependencies {
@@ -36,7 +41,7 @@ run {
3641
task dist(type: Jar) {
3742
duplicatesStrategy(DuplicatesStrategy.EXCLUDE)
3843
manifest {
39-
attributes 'Main-Class': project.mainClassName
44+
attributes 'Main-Class': application.mainClass.get()
4045
}
4146
dependsOn configurations.runtimeClasspath
4247
from {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

adventure-editor/src/main/resources/projectTmpl/ios/build.gradle

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@ apply plugin: 'java-library'
1111
apply plugin: 'robovm'
1212

1313
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
14-
sourceCompatibility = 1.8
15-
targetCompatibility = 1.8
14+
java {
15+
sourceCompatibility = JavaVersion.VERSION_1_8
16+
targetCompatibility = JavaVersion.VERSION_1_8
17+
}
1618

1719
ext {
1820
mainClassName = "com.bladecoder.engine.IOSLauncher"

blade-engine-spine-plugin/build.gradle

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ plugins {
77

88
group = 'com.bladecoder.engine'
99

10-
sourceCompatibility = 1.8
11-
targetCompatibility=1.8
10+
java {
11+
sourceCompatibility = JavaVersion.VERSION_1_8
12+
targetCompatibility = JavaVersion.VERSION_1_8
13+
}
1214
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
1315

1416
jar {
@@ -18,7 +20,7 @@ jar {
1820
'group': project.group,
1921
'version': project.version,
2022
'libgdx': libgdxVersion,
21-
'java': targetCompatibility,
23+
'java': java.targetCompatibility,
2224
'timestamp': System.currentTimeMillis()
2325
]
2426
}

blade-engine/build.gradle

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ plugins {
77

88
group = 'com.bladecoder.engine'
99

10-
sourceCompatibility=1.8
11-
targetCompatibility=1.8
10+
java {
11+
sourceCompatibility = JavaVersion.VERSION_1_8
12+
targetCompatibility = JavaVersion.VERSION_1_8
13+
}
1214

1315
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
1416

@@ -27,7 +29,7 @@ jar {
2729
'group': project.group,
2830
'version': project.version,
2931
'libgdx': libgdxVersion,
30-
'java': targetCompatibility,
32+
'java': java.targetCompatibility,
3133
'timestamp': System.currentTimeMillis()
3234
]
3335
}
@@ -119,4 +121,4 @@ javadoc {
119121
if(JavaVersion.current().isJava9Compatible()) {
120122
options.addBooleanOption('html5', true)
121123
}
122-
}
124+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)