forked from JonathanGiles/scenic-view
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
72 lines (59 loc) · 1.7 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
plugins {
id 'application'
id 'org.openjfx.javafxplugin' version '0.0.7'
id 'org.beryx.jlink' version '2.6.5'
}
mainClassName = "org.scenicview.scenicview/org.scenicview.ScenicView"
group = 'org.scenic-view'
version = '11.0.2'
defaultTasks 'install'
sourceCompatibility = '1.9'
targetCompatibility = '1.9'
repositories {
mavenCentral()
}
configurations {
jdk
binTray
}
sourceSets {
main {
compileClasspath += configurations.jdk
}
}
javafx {
modules = ['javafx.web', 'javafx.fxml', 'javafx.swing']
}
jar {
manifest {
attributes(
'Main-Class': 'org.scenicview.ScenicView', /* Used for standalone Scenic View */
'Agent-Class': 'org.fxconnector.remote.RuntimeAttach',/* But the standalone Scenic View starts up this agent when in runtime attach mode */
'Premain-Class': 'org.scenicview.ScenicView', /* Alternatively, this will be called if Scenic View is started as an agent */
'Automatic-Module-Name': 'org.scenicview.scenicview'
)
}
archiveName = 'scenicview.jar'
}
run {
dependsOn jar
}
artifacts {
archives(jar)
}
ext.platform = osdetector.os == 'osx' ? 'mac' : osdetector.os == 'windows' ? 'win' : osdetector.os
jlink {
options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
launcher {
name = 'scenicView'
}
imageDir = file("${buildDir}/scenicview")
imageZip = file("${buildDir}/dist/scenicview-${platform}.zip")
}
tasks.jlink.doLast {
// Copy scenicView.jar to lib, it is required as loading Agent
copy {
from "${buildDir}/libs/scenicview.jar"
into "${buildDir}/scenicview/lib"
}
}