This repository has been archived by the owner on Nov 23, 2020. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
95 lines (80 loc) · 2.38 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
buildscript {
ext.kotlin_version = "1.3.61"
ext.tornadofx_version = "1.7.17"
ext.junit_version = "5.1.0"
repositories {
mavenLocal()
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.junit.platform:junit-platform-gradle-plugin:1.1.0"
classpath "edu.sc.seis.launch4j:launch4j:2.4.6"
}
}
apply plugin: "kotlin"
apply plugin: "application"
apply plugin: "org.junit.platform.gradle.plugin"
apply plugin: "edu.sc.seis.launch4j"
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
repositories {
mavenLocal()
mavenCentral()
maven {
url "https://oss.sonatype.org/content/repositories/snapshots/"
}
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
compile "no.tornado:tornadofx:$tornadofx_version"
compile 'org.jsoup:jsoup:1.12.1'
compile 'org.yaml:snakeyaml:1.25'
testCompile "org.junit.jupiter:junit-jupiter-api:$junit_version"
testRuntime "org.junit.jupiter:junit-jupiter-engine:$junit_version"
}
mainClassName = "me.syari.mmtool.view.Launch"
jar {
manifest {
attributes(
"Class-Path": configurations.compile.collect { it.getName() }.join(" "),
"Main-Class": mainClassName
)
}
from(configurations.compile.collect { entry -> zipTree(entry) }) {
exclude "META-INF/MANIFEST.MF"
exclude "META-INF/*.SF"
exclude "META-INF/*.DSA"
exclude "META-INF/*.RSA"
}
}
ext {
archiveTmpDir = "${buildDir}/${project.name}_tmp"
}
task prePack(dependsOn: createExe) doLast {
copy {
from "${buildDir}/${createExe.outputDir}/${project.name}.exe"
into archiveTmpDir
}
copy {
from 'C:\\Program Files\\Java\\jre1.8.0_211'
into "${archiveTmpDir}/${createExe.bundledJrePath}"
}
}
task pack(type: Zip, dependsOn: prePack) {
from archiveTmpDir
archiveName "mmTool.zip"
}
createExe {
headerType = 'gui'
copyConfigurable = project.tasks.jar.outputs.files
bundledJre64Bit = true
bundledJrePath = "lib/jre"
jar = "lib/MythicMobsTool.jar"
mainClassName = mainClassName
outputDir = "output"
}