-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
74 lines (62 loc) · 1.86 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
plugins {
id 'application'
id 'org.openjfx.javafxplugin' version '0.0.9'
id 'org.beryx.runtime' version '1.12.1'
id 'org.sonarqube' version '3.0'
}
repositories {
jcenter()
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
implementation 'com.google.guava:guava:29.0-jre'
}
application {
mainClass = 'ch.weylandinator.Launcher'
applicationName = 'Weylandinator'
}
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
tasks.named('test') {
useJUnitPlatform()
}
javafx {
version = "15.0.1"
modules = [ 'javafx.controls', 'javafx.fxml' ]
}
suggestModules {
'javafx.controls'
'javafx.fxml'
'java.naming'
'java.xml'
}
runtime {
modules = ['java.naming', 'java.xml']
additive = true
launcher {
noConsole = true
}
jpackage {
def currentOs = org.gradle.internal.os.OperatingSystem.current()
def imgType = currentOs.windows ? 'ico' : currentOs.macOsX ? 'icns' : 'png'
imageOptions += ['--icon', "src/main/resources/logo.$imgType"]
installerOptions += ['--resource-dir', "src/main/resources"]
installerOptions += ['--vendor', 'Lerngruppe']
if(currentOs.windows) {
installerOptions += ['--win-per-user-install', '--win-dir-chooser', '--win-menu', '--win-shortcut']
}
else if (currentOs.linux) {
installerOptions += ['--linux-package-name', 'Weylandinator','--linux-shortcut']
}
else if (currentOs.macOsX) {
installerOptions += ['--mac-package-name', 'Weylandinator']
}
}
}
sonarqube {
properties {
property "sonar.projectKey", "MrF3lix_weylandinator"
property "sonar.organization", "felixsaaro"
property "sonar.host.url", "https://sonarcloud.io"
}
}