forked from Bram-Hub/LEGUP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
111 lines (97 loc) · 3.4 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
plugins {
id 'java'
id 'edu.sc.seis.launch4j' version '2.5.3'
id 'kr.motd.sphinx' version '2.10.0'
}
version '2.0.0'
apply plugin: 'java'
apply plugin: 'application'
apply plugin: 'checkstyle'
mainClassName = 'edu.rpi.legup.Legup'
sourceCompatibility = 11
dependencies {
implementation 'org.jetbrains:annotations:20.1.0'
implementation 'org.jetbrains:annotations:20.1.0'
implementation 'com.formdev:flatlaf:3.+'
implementation 'com.google.firebase:firebase-admin:6.3.0'
implementation 'org.apache.httpcomponents:httpclient:4.5.1'
implementation group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
implementation group: 'org.slf4j', name: 'slf4j-simple', version: '1.7.25'
// implementation 'com.google.code.gson:gson:2.8.2'
// implementation 'commons-cli:commons-cli:1.4'
// implementation 'commons-io:commons-io:2.6'
implementation 'org.apache.commons:commons-lang3:3.12.0'
implementation 'org.apache.logging.log4j:log4j-api:2.17.2'
implementation 'org.apache.logging.log4j:log4j-core:2.17.2'
testImplementation group: 'junit', name: 'junit', version: '4.12'
testImplementation 'junit:junit:4.+'
}
task customFatJar(type: Jar) {
manifest {
attributes('Implementation-Title': 'Legup',
'Implementation-Version': archiveVersion,
'Main-Class': 'edu.rpi.legup.Legup',
'SplashScreen-Image': 'edu/rpi/legup/images/Legup/LegupSplash.png')
}
archiveFileName = 'Legup.jar'
archiveBaseName = 'Legup.jar'
from {
configurations.compile.collect {
it.isDirectory() ? it : zipTree(it)
}
}
with jar
}
jar {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from {
configurations.compileClasspath.collect {
it.isDirectory() ? it : zipTree(it)
}
configurations.runtimeClasspath.collect {
it.isDirectory() ? it : zipTree(it)
}
}
manifest {
attributes('Implementation-Title': 'Legup',
'Implementation-Version': archiveVersion,
'Main-Class': 'edu.rpi.legup.Legup',
'SplashScreen-Image': 'edu/rpi/legup/images/Legup/LegupSplash.png')
}
archiveFileName = 'Legup.jar'
}
/*
* CREATES NATIVE WINDOWS EXECUTABLE
* Launches launch4j to create an executable (.exe) file wrapping the jar
* THIS IS NOT THE INSTALLER
* Add "icon = 'path/to/icon.ico'" to set an icon for the executable
*/
createExe() {
mainClassName = 'edu.rpi.legup.Legup'
outputDir = '../native/windows'
outfile = 'bin/Legup.exe'
bundledJrePath = 'jre'
bundledJre64Bit = true
jdkPreference = 'preferJre'
jreMinVersion = '11'
jreRuntimeBits = '64/32'
}
/*
* CREATES NATIVE WINDOWS INSTALLER -- ONLY RUNS ON WINDOWS
* Runs the shipped version of Inno Setup (6.2) to compile the installer
* Modify the setup settings in native/windows/legup_inno_setup.iss
*
* Modifications are likely required to run the setup script on your computer:
* Edit the "CHANGE ME" line in native/windows/legup_inno_setup.iss to reflect
* the path to the Java installation you want to ship inside the executable.
*/
task buildNativeWindows(type: Exec, dependsOn: 'createExe') {
jar
createExe
workingDir = "${buildDir}/../native/windows"
commandLine 'cmd', '/c', 'make_windows_installer.bat'
}
repositories {
mavenCentral()
}
targetCompatibility = JavaVersion.VERSION_11