Skip to content

Commit 8ce52f9

Browse files
committed
set java language version
1 parent 6604f2c commit 8ce52f9

File tree

4 files changed

+33
-12
lines changed

4 files changed

+33
-12
lines changed

build-gui/build.gradle

+13-5
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ plugins {
99
group = ss_group
1010
version = '4.3.1'
1111

12-
application {
13-
mainClass = ss_main_class
14-
}
15-
1612
repositories {
1713
mavenCentral()
1814
}
@@ -31,12 +27,24 @@ dependencies {
3127
implementation "org.openjfx:javafx-controls:$javafx.version:mac"
3228
}
3329

30+
java {
31+
toolchain {
32+
languageVersion = JavaLanguageVersion.of(java_language_version)
33+
}
34+
}
35+
36+
application {
37+
mainClass = ss_main_class
38+
}
39+
3440
javafx {
3541
version = "17.0.13"
3642
modules = ['javafx.controls']
3743
}
3844

39-
jar.enabled = false
45+
jar {
46+
enabled = false
47+
}
4048

4149
// Configure the shadowJar task (with JavaFX)
4250
shadowJar {

build-server/build.gradle

+12-5
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@ plugins {
88
group = ss_group
99
version = '4.3.1'
1010

11-
application {
12-
mainClass = ss_main_class
13-
}
14-
1511
repositories {
1612
mavenCentral()
1713
}
@@ -24,8 +20,19 @@ dependencies {
2420
implementation fileTree(dir: 'libs', include: '*.jar')
2521
}
2622

23+
java {
24+
toolchain {
25+
languageVersion = JavaLanguageVersion.of(java_language_version)
26+
}
27+
}
2728

28-
jar.enabled = false
29+
jar {
30+
enabled = false
31+
}
32+
33+
application {
34+
mainClass = ss_main_class
35+
}
2936

3037
// Configure the shadowJar task (with JavaFX)
3138
shadowJar {

build-shared/build.gradle

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
plugins {
22
id 'edu.sc.seis.launch4j' version '2.5.4'
3-
id 'java'
4-
3+
id 'java-library'
54
}
65

76
repositories {
@@ -21,6 +20,12 @@ dependencies {
2120
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.2', 'com.eclipsesource.minimal-json:minimal-json:0.9.5'
2221
}
2322

23+
java {
24+
toolchain {
25+
languageVersion = JavaLanguageVersion.of(java_language_version)
26+
}
27+
}
28+
2429
test {
2530
useJUnitPlatform()
2631
afterTest { desc, result ->

gradle.properties

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
ss_main_class = com.superzanti.serversync.ServerSync
22
ss_group = com.superzanti.serversync
3+
java_language_version = 17
34
org.gradle.warning.mode=all

0 commit comments

Comments
 (0)