-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
117 lines (98 loc) · 2.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
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
buildscript {
def versionMajor = 1
def versionMinor = 1
def versionPatch = 2
ext {
versionName = "${versionMajor}.${versionMinor}.${versionPatch}"
appName = "TAK Tools"
}
dependencies {
classpath 'org.jetbrains.dokka:dokka-gradle-plugin:0.10.1'
}
repositories {
jcenter()
}
}
plugins {
id 'java'
id 'application'
id 'org.jetbrains.kotlin.jvm' version '1.4.20'
id 'org.openjfx.javafxplugin' version '0.0.8'
id 'org.beryx.runtime' version '1.8.1'
}
group 'net.joeaustin.taktools'
version "$versionName"
applicationName = "$appName"
javafx {
version = "15"
modules = ['javafx.graphics', 'javafx.controls', 'javafx.fxml', 'javafx.media', 'javafx.swing']
}
allprojects {
apply plugin: 'idea'
idea {
module {
outputDir = file("build/production/classes")
inheritOutputDirs = true
}
}
}
sourceSets {
main {
output.resourcesDir = "build/classes/main"
}
test {
output.resourcesDir = "build/classes/kotlin/test"
}
}
repositories {
mavenCentral()
jcenter()
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib"
implementation 'net.joeaustin.easyxml:EasyXml:1.1.2'
implementation 'io.reactivex.rxjava3:rxjava:3.0.0'
testCompile group: 'junit', name: 'junit', version: '4.12'
}
//https://github.com/FibreFoX/javafx-gradle-plugin
application {
mainClassName = "net.joeaustin.taktools.startup.App"
executableDir = "bin"
applicationName = "$appName"
}
runtime {
options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
modules = [
'java.desktop',
'java.xml',
'jdk.unsupported',
'java.scripting',
'java.sql',
'java.naming',
'java.logging',
'java.management',
'java.compiler']
jpackage {
installerType = "dmg"
skipInstaller = false
imageName = "$appName"
if(org.gradle.internal.os.OperatingSystem.current().macOsX) {
installerType = "dmg"
imageOptions += ['--icon', 'src/main/resources/gui/icon.icns']
}
if (org.gradle.internal.os.OperatingSystem.current().windows) {
installerType = 'msi'
// imageOptions = ['--win-console']
installerOptions = ['--win-per-user-install', '--win-dir-chooser', '--win-menu', '--win-shortcut']
imageOptions += ['--icon', 'src/main/resources/gui/icon.ico']
}
}
}
jar {
manifest {
attributes(
'Main-Class': "net.joeaustin.taktools.startup.App",
'Application-Name': "$appName"
)
}
}