-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle
More file actions
91 lines (67 loc) · 2.19 KB
/
build.gradle
File metadata and controls
91 lines (67 loc) · 2.19 KB
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
plugins {
id 'java'
id 'application'
id 'edu.sc.seis.launch4j' version '2.5.3'
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
// For 'application' plugin:
application {
applicationName = 'TracInstant'
mainClass = "com.github.tracinstant.TracInstantApp"
version = '0.2.1'
applicationDefaultJvmArgs = [
"-Xms8M",
"-Xmx400M",
"-Dsun.java2d.d3d=false",
"-XX:StringTableSize=240007"
]
}
repositories {
mavenCentral()
}
// For runnable .jar:
task fatJar(type: Jar) {
dependsOn test
// Simple "fatJar" configuration...
archiveBaseName = project.name + '-all'
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
manifest {
attributes 'Main-Class': application.mainClass
// Alternatively: configure class-path if not building a "fatJar".
// attributes 'Class-Path': configurations.compile.collect {
// 'libs/' + it.getName()
// }.join(' ')
}
}
createExe.dependsOn fatJar
launch4j {
mainClassName = mainClassName
jar = '../libs/' + file(fatJar.archiveFileName).name
outfile = project.name + "-" + project.version + ".exe"
icon = '../../icons/TracSlurp.ico'
jreRuntimeBits = "64/32"
jvmOptions = application.applicationDefaultJvmArgs
jdkPreference = "preferJre"
}
// HACK: until I solve screwy fonts on Java >= 9, also create an alternate exe
task createJava8Exe(type: edu.sc.seis.launch4j.tasks.Launch4jLibraryTask) {
dependsOn fatJar
group = "launch4j"
description = "Creates an additional EXE that only runs on JRE/JDK 8 (to avoid font issues)"
jreMaxVersion = "1.8.0_999"
outfile = project.name + "-" + project.version + "-Java8only.exe"
icon = '../../icons/TracSlurp.ico'
jreRuntimeBits = "32/64"
jvmOptions = application.applicationDefaultJvmArgs
jdkPreference = "preferJre"
}
dependencies {
implementation 'au.com.bytecode:opencsv:2.4'
// TODO: Would surely help code quality. Find out how to compact with proguard or something.
// compile 'com.google.guava', version: '21.0'
testImplementation 'junit:junit:4.12+'
}