-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
82 lines (73 loc) · 2.14 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
plugins {
id 'java'
id 'application'
id 'com.github.johnrengelman.shadow' version '6.0.0'
id 'org.openjfx.javafxplugin' version '0.0.9'
}
group 'app.nush'
version '1.3.B-beta'
applicationName = 'Exam Clock'
mainClassName = 'app.nush.examclock.Main'
repositories {
jcenter()
mavenCentral()
// maven { url 'https://jitpack.io' }
// flatDir {
// dirs 'libs'
// }
}
double jdkVersion = 1.14
println "JDK version = ${jdkVersion}"
sourceCompatibility = 1.8
targetCompatibility = jdkVersion
String preferenceFx = jdkVersion == 1.8d ? '8.6.0' : '11.6.0'
println "PreferenceFX version = ${preferenceFx}"
dependencies {
implementation "org.openjfx:javafx-graphics:11:win"
implementation "org.openjfx:javafx-graphics:11:mac"
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'no.tornado:tornadofx-controls:1.0.6'
implementation 'io.socket:socket.io-client:1.0.0'
implementation group: 'com.dlsc.preferencesfx', name: 'preferencesfx-core', version: preferenceFx
}
javafx {
modules = ['javafx.controls', 'javafx.fxml']
}
task generateTestSources {
inputs.property "version", project.version
outputs.dir "$buildDir/generated"
doFirst {
def versionFile = file("$buildDir/generated/app/nush/examclock/Version.java")
versionFile.parentFile.mkdirs()
versionFile.text = """package app.nush.examclock;public class Version {public static String getVersion() {return "$project.version";}}"""
}
}
compileJava {
options.compilerArgs = [
"--release", "8"
]
}
compileJava.dependsOn generateTestSources
sourceSets.main.java {
srcDir "$buildDir/generated"
}
shadowJar {
baseName = 'exam-clock'
classifier = targetCompatibility
archiveVersion = version
}
shadowJar.doLast {
println "Deploying..."
exec {
commandLine 'sh', './build.sh'
}
}
jar {
manifest {
attributes('Main-Class': "$mainClassName",
'Name': 'app/nush/examclock/',
'Specification-Title': "Exam Clock",
'Specification-Version': "$version",
'Specification-Vendor': "Appventure@NUSHIGH")
}
}