Skip to content

Commit 3424d2c

Browse files
committed
use shared properties
1 parent 18a458b commit 3424d2c

File tree

4 files changed

+18
-20
lines changed

4 files changed

+18
-20
lines changed

build-gui/build.gradle

+8-5
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ plugins {
66
id 'com.github.johnrengelman.shadow' version '7.1.2'
77
}
88

9-
group = 'com.superzanti.serversync'
9+
group = ss_group
1010
version = '4.3.0'
1111

1212
application {
13-
mainClass = 'com.superzanti.serversync.ServerSync'
13+
mainClass = ss_main_class
1414
}
1515

1616
repositories {
@@ -50,10 +50,14 @@ shadowJar {
5050
exclude "css/application.css"
5151
}
5252

53+
manifest {
54+
attributes 'Main-Class': ss_main_class
55+
attributes 'Implementation-Version': project.version
56+
}
57+
5358
dependencies {
5459
exclude 'forge*.jar'
5560
//exclude '**/*javafx*/**' //Comment to build GUI
56-
5761
}
5862
}
5963

@@ -66,13 +70,12 @@ createExe {
6670
supportUrl = "https://github.com/superzanti/ServerSync"
6771
productName = "ServerSync - Client"
6872
fileDescription = "The client side for users."
69-
version = ss_version
73+
version = project.version
7074
}
7175

7276
startScripts {
7377
dependsOn shadowJar
7478
classpath = files(classpath = files("${buildDir}/libs/${project.name}-${project.version}.jar"))
75-
7679
}
7780

7881

build-server/build.gradle

+7-7
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ plugins {
55
id 'com.github.johnrengelman.shadow' version '7.1.2'
66
}
77

8-
group = 'com.superzanti.serversync'
8+
group = ss_group
99
version = '4.3.0'
1010

1111
application {
12-
mainClass = 'com.superzanti.serversync.ServerSync'
12+
mainClass = ss_main_class
1313
}
1414

1515
repositories {
@@ -34,8 +34,8 @@ shadowJar {
3434
}
3535

3636
manifest {
37-
attributes 'Main-Class': 'com.superzanti.serversync.ServerSync'
38-
attributes 'Implementation-Version': '4.3.0'
37+
attributes 'Main-Class': ss_main_class
38+
attributes 'Implementation-Version': project.version
3939
}
4040

4141
archiveClassifier.set('')
@@ -50,15 +50,15 @@ shadowJar {
5050

5151
createExe {
5252
jarTask = shadowJar
53-
mainClassName = ss_main_class_server
53+
mainClassName = ss_main_class
5454
outfile = 'ServerSyncServer.exe'
5555
headerType = 'console'
56-
icon = "${rootDir}/build-shared/src/main/resources/ServersyncLogo.ico"
56+
icon = "${rootDir}/build-shared/src/main/resources/ServersyncLogoServer.ico"
5757
copyConfigurable = shadowJar.outputs.files
5858
supportUrl = "https://github.com/superzanti/ServerSync"
5959
productName = "ServerSync - Server"
6060
fileDescription = "The server side for admins."
61-
version = ss_version
61+
version = project.version
6262
}
6363

6464
startScripts {

build-shared/build.gradle

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import edu.sc.seis.launch4j.tasks.Launch4jLibraryTask
2-
31
plugins {
42
id 'edu.sc.seis.launch4j' version '2.5.4'
53
id 'java'
@@ -10,19 +8,17 @@ repositories {
108
mavenCentral()
119
}
1210

13-
group = "com.superzanti.serversync"
14-
version = ss_version
11+
group = ss_group
12+
version = "4.3.0"
1513

1614
dependencies {
17-
1815
implementation 'com.eclipsesource.minimal-json:minimal-json:0.9.5'
1916
implementation fileTree(dir: 'libs', include: '*.jar')
2017

2118
// Use JUnit Jupiter API for testing.
2219
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2', 'org.junit.jupiter:junit-jupiter-params:5.8.2'
2320
// Use JUnit Jupiter Engine for testing.
2421
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.2', 'com.eclipsesource.minimal-json:minimal-json:0.9.5'
25-
2622
}
2723

2824
test {

gradle.properties

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
ss_version = 4.3.0
21
ss_main_class = com.superzanti.serversync.ServerSync
3-
ss_main_class_server = com.superzanti.serversync.ServerSyncServer
2+
ss_group = com.superzanti.serversync
43
org.gradle.warning.mode=all

0 commit comments

Comments
 (0)