This repository has been archived by the owner on May 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
executable file
·65 lines (59 loc) · 1.59 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
plugins {
id 'java'
id 'application'
id 'org.openjfx.javafxplugin' version '0.0.9'
id "org.beryx.jlink" version "2.22.3"
}
group 'me.srinjoy'
version '1.0'
//jar {
// manifest {
// attributes 'Main-class': 'me.srinjoy.Start'
// }
// from {
// configurations.runtimeClasspath.collect {
// it.isDirectory() ? it : zipTree(it)
// }
// }
//}
jlink {
launcher {
name = 'DiscordRPC'
}
jpackage {
installerType = project.findProperty('installerType')
switch (installerType) {
case 'msi':
imageOptions += ['--icon', 'src/main/resources/me/srinjoy/logo.ico']
installerOptions += [
'--win-per-user-install', '--win-dir-chooser',
'--win-menu', '--win-shortcut'
]
break
case 'pkg':
imageOptions += ['--icon', 'src/main/resources/me/srinjoy/logo.icns']
break
case 'deb': case 'rpm':
imageOptions += ['--icon', 'src/main/resources/me/srinjoy/logo.png']
installerOptions += ['--linux-shortcut']
}
}
}
jpackage {
doFirst {
project.getProperty('installerType') // throws exception if its missing
}
}
repositories {
jcenter()
mavenCentral()
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
implementation 'club.minnced:java-discord-rpc:2.0.2'
}
javafx {
version = '15.0.1'
modules = [ 'javafx.controls', 'javafx.fxml' ]
}
mainClassName = 'me.srinjoy.Main'