-
Notifications
You must be signed in to change notification settings - Fork 14
/
build.gradle
70 lines (60 loc) · 1.71 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
plugins {
id 'java'
id 'eclipse'
id 'application'
id 'org.openjfx.javafxplugin' version '0.0.8'
id 'org.beryx.jlink' version '2.15.1'
id 'com.github.ben-manes.versions' version '0.23.0'
}
// Application Configuration
ext {
appName = "FXApp"
appLauncher = "fxapp"
appPackaging = "fxapp"
appModuleName = "fxapp"
appMainClass = "fxapp.App"
}
mainClassName = "${ext.appModuleName}/${ext.appMainClass}"
repositories {
mavenCentral()
}
javafx {
version = '12'
modules = [
'javafx.base',
'javafx.graphics',
'javafx.controls'
]
}
jlink {
imageZip = project.file("${buildDir}/distributions/${appPackaging}-${javafx.platform.classifier}.zip")
options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
launcher {
name = "${appLauncher}"
}
}
task dist {
dependsOn clean, jlinkZip
description "Calls clean and then jlinkZip [default]"
}
defaultTasks 'dist'
if (project.hasProperty('debugRun') && project.debugRun as boolean) {
run {
jvmArgs '-Xdebug', '-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=*:5005'
}
}
eclipse {
classpath {
containers 'org.eclipse.buildship.core.gradleclasspathcontainer'
file {
whenMerged {
entries.findAll { it.properties.kind.equals('lib') && !it.properties.path.contains("junit") }.each {
it.entryAttributes['module'] = 'true'
}
entries.findAll { it.properties.path.startsWith('org.eclipse.jdt.launching.JRE_CONTAINER') }.each {
it.entryAttributes['module'] = 'true'
}
}
}
}
}