This repository has been archived by the owner on Apr 20, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
72 lines (64 loc) · 2.37 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 'org.openjfx.javafxplugin' version '0.0.9'
id 'org.beryx.jlink' version '2.23.1'
}
application {
mainModule.set('formatfx')
mainClass.set('org.lucasstarsz.fxpad.RTFXMain')
}
repositories {
mavenCentral()
}
dependencies {
// https://mvnrepository.com/artifact/org.fxmisc.richtext/richtextfx
implementation 'org.fxmisc.richtext:richtextfx:0.10.5'
}
javafx {
version = '14'
modules = ['javafx.controls', 'javafx.fxml']
}
project.ext.buildDate = new Date()
project.version = '0.2.0'
project.description = "A simple, clean text editor. SNAPSHOT BUILD - Now runs using RichTextFX"
def usingSnapshot = true
def snapshotVersion = "SNAPSHOT.4"
jlink {
addExtraDependencies("javafx")
options.addAll('--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages')
launcher {
name = "FXPad-$project.version" + (usingSnapshot ? "-$snapshotVersion" : "")
noConsole = true
}
jpackage {
jvmArgs += ['-XX:+CreateCoredumpOnCrash']
installerOptions += [
'--description', project.description,
'--vendor', 'Andrew Dey',
'--copyright', 'Copyright© 2020 Andrew Dey',
'--license-file', 'src/main/resources/LICENSE',
'--file-associations', 'src/main/resources/extensions/extension_txt.properties',
'--file-associations', 'src/main/resources/extensions/extension_text.properties',
'--app-version', project.version
]
def currentOs = org.gradle.internal.os.OperatingSystem.current()
def imgType = currentOs.windows ? 'ico' : currentOs.macOsX ? 'icns' : 'png'
icon = "src/main/resources/icons/fxpad_$imgType.$imgType"
if (currentOs.windows) {
installerType = "msi"
installerOptions += [
'--win-per-user-install',
'--install-dir', "FXPad $snapshotVersion",
'--win-dir-chooser',
'--win-shortcut',
'--win-menu', '--win-menu-group', 'Productivity'
]
} else if (currentOs.linux) {
installerType = "deb"
installerOptions += [
'--linux-menu-group', 'Office',
'--linux-shortcut',
'--linux-deb-maintainer', 'andrewrcdey@gmail.com'
]
}
}
}