-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
executable file
·77 lines (70 loc) · 2.26 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
plugins {
id 'java'
}
group 'com.aaroncohen'
version '1.0.1'
repositories {
mavenCentral()
}
dependencies {
implementation 'com.google.code.gson:gson:2.8.9'
implementation 'com.formdev:flatlaf:2.0.1'
implementation 'com.intellij:forms_rt:7.0.3'
implementation "net.coobird:thumbnailator:[0.4, 0.5)"
}
jar {
manifest {
attributes(
'Main-Class': 'com.aaroncohen.WhispR.WhispR',
)
}
}
task fatJar(type: Jar) {
manifest.from jar.manifest
duplicatesStrategy = 'include'
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
} {
exclude "META-INF/*.SF"
exclude "META-INF/*.DSA"
exclude "META-INF/*.RSA"
}
with jar
}
task jpackageMac {
doLast {
exec {
workingDir '.'
commandLine 'sh', '-c', '$(/usr/libexec/java_home)/bin/jpackage --input build/libs/ \
--app-version 1.0.1 \
--main-jar WhispR-1.0.1.jar \
--icon "src/main/resources/appicon/WhispR.icns" \
--name WhispR \
--dest build/dist/ \
--vendor "Aaron Cohen" \
--copyright "Made By Aaron Cohen" \
--description "A lightweight Java chat app I made for fun because I got really bored one day" \
--main-class com.aaroncohen.WhispR.WhispR'
}
}
}
task jpackageWindows {
doLast {
exec {
workingDir '.'
commandLine 'Powershell', 'jpackage --input build/libs/ \
--app-version 1.0.1 \
--main-jar WhispR-1.0.1.jar \
--icon "src/main/resources/appicon/WhispR.ico" \
--name WhispR \
--dest build/dist/ \
--vendor \'Aaron Cohen\' \
--copyright \'Made By Aaron Cohen\' \
--description \'A lightweight Java chat app I made for fun because I got really bored one day\' \
--main-class com.aaroncohen.WhispR.WhispR \
--win-dir-chooser \
--win-menu \
--win-shortcut'
}
}
}