-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
150 lines (121 loc) · 6.14 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
plugins {
id 'application'
id 'java'
id 'org.openjfx.javafxplugin' version '0.0.12'
id 'jacoco'
// https://badass-runtime-plugin.beryx.org/releases/latest/
id 'org.beryx.runtime' version '1.12.7'
// https://github.com/johnrengelman/shadow
//id "com.github.johnrengelman.shadow" version "7.1.2"
}
processResources.duplicatesStrategy = DuplicatesStrategy.EXCLUDE
group 'com.kapflagon'
version '0.1'
repositories {
mavenCentral()
}
javafx {
version = '18'
modules = [ 'javafx.controls', 'javafx.fxml', 'javafx.swing' ]
//configuration = 'compileOnly'
}
jacoco {
toolVersion = "0.8.7"
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
// https://mvnrepository.com/artifact/org.openjfx/javafx-controls
//implementation group: 'org.openjfx', name: 'javafx-controls', version: '18'
// https://mvnrepository.com/artifact/org.openjfx/javafx-fxml
//implementation group: 'org.openjfx', name: 'javafx-fxml', version: '18'
// https://mvnrepository.com/artifact/org.openjfx/javafx-swing
//implementation group: 'org.openjfx', name: 'javafx-swing', version: '18'
// https://mvnrepository.com/artifact/org.mockito/mockito-core
testImplementation group: 'org.mockito', name: 'mockito-core', version: '4.4.0'
// https://mvnrepository.com/artifact/javax.annotation/javax.annotation-api
implementation group: 'javax.annotation', name: 'javax.annotation-api', version: '1.3.2'
// Old Afterburner.fx
// https://mvnrepository.com/artifact/com.airhacks/afterburner.fx
implementation group: 'com.airhacks', name: 'afterburner.fx', version: '1.7.0'
// New Afterburner.fx
// https://mvnrepository.com/artifact/com.dlsc.afterburner/afterburner.fx
//implementation group: 'com.dlsc.afterburner', name: 'afterburner.fx', version: '2.1.0'
// https://mvnrepository.com/artifact/com.j256.ormlite/ormlite-core
implementation group: 'com.j256.ormlite', name: 'ormlite-core', version: '5.3'
//implementation 'com.j256.ormlite:ormlite-core:5.3'
// https://mvnrepository.com/artifact/com.j256.ormlite/ormlite-jdbc
implementation group: 'com.j256.ormlite', name: 'ormlite-jdbc', version: '5.3'
//implementation 'com.j256.ormlite:ormlite-jdbc:5.3'
// https://mvnrepository.com/artifact/org.xerial/xerial-core
implementation group: 'org.xerial', name: 'xerial-core_2.12', version: '3.6.0'
//implementation 'org.xerial:xerial-core_2.12:3.6.0'
// https://mvnrepository.com/artifact/org.xerial/sqlite-jdbc
implementation group: 'org.xerial', name: 'sqlite-jdbc', version: '3.34.0'
//implementation 'org.xerial:sqlite-jdbc:3.34.0'
implementation group: 'org.apache.xmlgraphics', name: 'batik-transcoder', version: '1.13'
sourceSets.main.resources.srcDirs("src/main/java").includes.addAll(["**/*.fxml", "**/*.css", "**/*.properties"])
sourceSets.main.resources.srcDirs("src/main/resources").includes.addAll(["**/*.*"])
}
test {
useJUnitPlatform()
finalizedBy( jacocoTestReport)
}
jar {
duplicatesStrategy = 'include'
manifest {
attributes 'Main-Class': 'driver.Main'
}
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
}
application {
mainClassName = "driver.Main"
applicationName = 'KanbanBo'
}
runtime {
options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
modules = ['java.sql', 'java.desktop', 'java.naming', 'java.scripting', 'java.logging', 'jdk.unsupported.desktop', 'java.management', 'java.sql.rowset', 'jdk.jfr', 'jdk.unsupported', 'java.datatransfer', 'java.xml']
// Uncomment and adjust the code below if you want to generate images for multiple platforms.
// (You need to also uncomment the line 'targetPlatformName = ...' in the jpackage block.)
/*
targetPlatform("lin") {
//jdkHome = jdkDownload("https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.2%2B7/OpenJDK15U-jdk_x64_linux_hotspot_15.0.2_7.tar.gz")
jdkHome = jdkDownload("https://github.com/adoptium/temurin18-binaries/releases/download/jdk-18.0.1%2B10/OpenJDK18U-jdk_x64_linux_hotspot_18.0.1_10.tar.gz")
}
targetPlatform("mac") {
//jdkHome = jdkDownload("https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.2%2B7/OpenJDK15U-jdk_x64_mac_hotspot_15.0.2_7.tar.gz") {
jdkHome = jdkDownload("https://github.com/adoptium/temurin18-binaries/releases/download/jdk-18.0.1%2B10/OpenJDK18U-jdk_x64_mac_hotspot_18.0.1_10.tar.gz") {
downloadDir = "$buildDir/myMac"
archiveName = "my-mac-jdk"
archiveExtension = "tar.gz"
pathToHome = "jdk-15.0.2+7/Contents/Home"
overwrite = true
}
}
*/
targetPlatform("win") {
//jdkHome = jdkDownload("https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.2%2B7/OpenJDK15U-jdk_x64_windows_hotspot_15.0.2_7.zip")
jdkHome = jdkDownload("https://github.com/adoptium/temurin18-binaries/releases/download/jdk-18.0.1%2B10/OpenJDK18U-jdk_x64_windows_hotspot_18.0.1_10.zip")
}
jpackage {
// Uncomment and adjust the following line if your runtime task is configured to generate images for multiple platforms
//targetPlatformName = "mac"
def currentOs = org.gradle.internal.os.OperatingSystem.current()
//def imgType = currentOs.windows ? 'ico' : currentOs.macOsX ? 'icns' : 'png'
//imageOptions += ['--icon', "src/main/resources/hellofx.$imgType"]
installerOptions += ['--resource-dir', "src/main/resources"]
installerOptions += ['--vendor', 'Acme Corporation']
if(currentOs.windows) {
installerOptions += ['--win-per-user-install', '--win-dir-chooser', '--win-menu', '--win-shortcut', '--verbose']
imageOptions += ['--win-console']
}
else if (currentOs.linux) {
installerOptions += ['--linux-package-name', 'KanbanBo','--linux-shortcut']
}
else if (currentOs.macOsX) {
installerOptions += ['--mac-package-name', 'KanbanBo']
}
}
}