forked from Ogefest/Notepack
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
96 lines (82 loc) · 2.85 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
plugins {
id 'application'
id 'org.openjfx.javafxplugin' version '0.0.9'
id 'org.beryx.jlink' version '2.22.1'
// id 'org.beryx.runtime' version '1.11.3'
}
group = 'notepack'
version = '0.9'
description 'Privacy oriented, without vendor lock in note organizer desktop application.'
sourceCompatibility = 1.9
targetCompatibility = 1.9
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
repositories {
maven { url "https://repo.maven.apache.org/maven2" }
}
javafx {
modules = [ 'javafx.controls' , 'javafx.fxml', 'javafx.web']
}
dependencies {
compile group: 'org.openjfx', name: 'javafx-base', version:'14'
compile group: 'org.openjfx', name: 'javafx-controls', version:'14'
compile group: 'org.openjfx', name: 'javafx-fxml', version:'14'
compile group: 'org.openjfx', name: 'javafx-web', version:'14'
compile group: 'org.json', name: 'json', version:'20190722'
compile 'com.vladsch.flexmark:flexmark-all:0.62.2'
compile group: 'net.lingala.zip4j', name: 'zip4j', version: '2.6.4'
}
jlink {
options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages', '--ignore-signing-information']
launcher {
name = 'Notepack'
jvmArgs = ['-Xms256m', '-Xmx2g']
}
jpackage {
installerOptions += [
'--description', project.description,
'--app-version', version,
'--copyright', 'Ogefest',
'--license-file', 'LICENSE',
'--vendor', 'Ogefest'
]
installerType = project.findProperty('installerType')
if (installerType == 'msi') {
imageOptions += ['--icon', 'gfx/logo_64.ico']
installerOptions += [
'--resource-dir', "build/Notepack-package/Notepack/lib",
'--win-per-user-install', '--win-dir-chooser',
'--win-menu', '--win-shortcut'
]
}
if (installerType in ['deb', 'rpm']) {
imageOptions += ['--icon', 'gfx/logo_256.png']
installerOptions += [
'--resource-dir', "build/Notepack-package/Notepack/lib",
'--linux-menu-group', 'Office',
'--linux-shortcut'
]
}
if (installerType == 'deb') {
installerOptions += [
'--linux-deb-maintainer', '[email protected]'
]
}
if (installerType == 'rpm') {
installerOptions += [
'--linux-rpm-license-type', 'MPLv2'
]
}
outputDir = 'Notepack-package'
imageName = 'Notepack'
skipInstaller = false
installerName = 'Notepack'
}
}
jpackage {
doFirst {
project.getProperty('installerType') // throws exception if its missing
}
}
mainClassName = 'notepack.Main'