-
Notifications
You must be signed in to change notification settings - Fork 50
/
build.gradle
74 lines (60 loc) · 1.56 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
plugins {
id 'java'
id 'java-library'
id 'eclipse'
id 'idea'
id 'com.github.johnrengelman.shadow' version '7.0.0'
id 'edu.sc.seis.launch4j' version '2.5.0'
}
version = '1.0.3'
ext.mainClassName = "bspkrs.mmv.gui.MappingGui"
java {
toolchain {
languageVersion = JavaLanguageVersion.of(8)
}
}
repositories {
mavenCentral()
}
dependencies {
implementation 'com.google.code.gson:gson:2.8.6'
}
[compileJava, compileTestJava].each { cJava ->
cJava.options.compilerArgs += ['-Xlint:unchecked']
cJava.options.encoding = 'UTF-8'
cJava.options.incremental = true
cJava.options.fork = true
}
processResources {
from 'LICENSE'
}
build.dependsOn(shadowJar)
jar {
destinationDirectory = temporaryDir
}
shadowJar {
archiveClassifier.set('')
}
wrapper {
distributionType = Wrapper.DistributionType.ALL
}
jar.manifest {
attributes 'Main-Class': mainClassName
}
createExe {
dependsOn 'build'
mainClassName = mainClassName
copyConfigurable = project.tasks.shadowJar.outputs.files
jar = "lib/${project.tasks.shadowJar.archiveFileName}"
outputDir = 'libs'
outfile = tasks.shadowJar.archiveName - '.jar' + '.exe'
productName = 'MCP Mapping Viewer'
icon = "${projectDir}/MCPMappingViewer.ico"
supportUrl = 'https://www.minecraftforum.net/topic/2115030'
copyright = 'Copyright 2013-2021 bspkrs, portions Copyright 2013-2014 Alex "Immibis" Campbell'
version = "${project.version}"
}
task run(type: JavaExec) {
classpath = sourceSets.main.runtimeClasspath
main = mainClassName
}