-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
67 lines (57 loc) · 1.74 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
plugins {
id 'java'
id 'edu.sc.seis.launch4j' version '2.4.4'
}
jar {
manifest {
attributes 'Main-Class': 'org.fox.Miota'
}
}
ConfigObject conf = new ConfigSlurper().parse( file("${projectDir}/src/main/resources/version.properties").toURI().toURL());
repositories {
mavenCentral()
}
group 'org.fox'
sourceCompatibility = 1.8
version conf.miota.version
dependencies {
compile('org.jgrapht:jgrapht-core:1.3.0') {
exclude group: 'org.jheaps', module: 'jheaps'
}
compile group: 'org.springframework', name: 'spring-web', version: '5.1.3.RELEASE'
compile group: 'org.jetbrains', name: 'annotations', version: '15.0'
compile group: 'org.springframework', name: 'spring-context', version: '5.1.3.RELEASE'
}
task uberJar(type: Jar) {
manifest {
attributes 'Main-Class': 'org.fox.Miota'
}
entryCompression = ZipEntryCompression.DEFLATED
appendix = 'fat'
from sourceSets.main.output
dependsOn configurations.runtimeClasspath
from {
configurations.runtimeClasspath.findAll { it.name.endsWith('jar') }.collect { zipTree(it) }
}
}
launch4j {
outfile = 'miota.exe'
mainClassName = 'org.fox.Miota'
copyConfigurable = uberJar.outputs.files
icon = "${projectDir}/icon/mi.ico"
productName = 'MiOTA'
bundledJrePath = "jre"
jreMinVersion = "1.8.0"
jdkPreference = "preferJre"
bundledJreAsFallback = "true"
jar = "${buildDir}/libs/miota-fat-${project.version}.jar"
headerType = "console"
initialHeapSize = 16
maxHeapSize = 512
}
task copyProperties(type: Copy) {
from file("${projectDir}/src/main/resources/miota.properties")
into file("${buildDir}/launch4j/")
}
createExe.dependsOn uberJar
createExe.dependsOn copyProperties