-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
79 lines (67 loc) · 1.93 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
plugins {
id 'java'
id 'application'
id 'org.openjfx.javafxplugin' version '0.0.8'
id 'org.beryx.jlink' version '2.17.2'
}
group 'org.yayarh'
version '1.2'
sourceCompatibility = '11'
targetCompatibility = '11'
mainClassName = "$moduleName/org.yayarh.Launcher"
repositories {
mavenCentral()
jcenter()
google()
}
dependencies {
testImplementation group: 'junit', name: 'junit', version: '4.12'
implementation "com.google.zxing:core:3.3.0"
implementation group: 'org.controlsfx', name: 'controlsfx', version: '11.0.0'
}
application {
mainClassName
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
jlink {
launcher {
name = 'TextToQR'
jvmArgs = applicationDefaultJvmArgs as List<String>
}
jpackage {
installerOptions = [
'--description', 'QRCode generator ._.',
'--copyright', 'All copyrights go to the association of Secret Batata Ninjas',
'--vendor', 'The Potato Ninja',
]
installerType = project.findProperty('installerType')
// we will pass this from the command line (example: -PinstallerType=msi)
if (installerType == 'msi') {
imageOptions += ['--icon', 'src/main/resources/org.yayarh/logoIcon.ico']
installerOptions += [
'--win-per-user-install', '--win-dir-chooser',
'--win-menu', '--win-shortcut'
]
}
if (installerType == 'pkg') {
imageOptions += ['--icon', 'src/main/resources/pdfdecorator/gui/icon.icns']
}
}
}
jpackage {
doFirst {
project.getProperty('installerType') // throws exception if its missing
}
}
jar {
manifest {
attributes "Main-Class": mainClassName
}
// from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
}
javafx {
version = '11.0.1'
modules = ['javafx.controls', 'javafx.fxml']
}