-
Notifications
You must be signed in to change notification settings - Fork 68
/
build.gradle
78 lines (65 loc) · 1.83 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
plugins {
id 'application'
id 'org.openjfx.javafxplugin' version '0.1.0'
id 'org.beryx.jlink' version '3.0.1'
}
application {
mainModule = "org.scenicview.scenicview"
mainClass = "org.scenicview.ScenicView"
}
group = 'org.scenic-view'
version = '21.0.1'
defaultTasks 'install'
java {
sourceCompatibility = '11'
targetCompatibility = '11'
}
repositories {
mavenCentral()
}
configurations {
jdk
binTray
}
sourceSets {
main {
compileClasspath += configurations.jdk
}
}
javafx {
version = '21.0.1'
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'
)
}
archiveFileName = 'scenicview.jar'
}
run {
dependsOn jar
}
artifacts {
archives(jar)
}
ext.platform = osdetector.os == 'osx' ? 'mac' : osdetector.os == 'windows' ? 'win' : osdetector.os
jlink {
options = ['--strip-debug', '--no-header-files', '--no-man-pages']
launcher {
name = 'scenicView'
}
imageDir = layout.buildDirectory.dir("scenicview")
imageZip = layout.buildDirectory.file("dist/scenicview-${JavaVersion.current()}-${platform}.zip")
}
tasks.jlink.doLast {
// Copy scenicView.jar to lib, it is required as loading Agent
copy {
from layout.buildDirectory.file("libs/scenicview.jar")
into layout.buildDirectory.dir("scenicview/lib")
}
}