forked from Wynntils/Wynntils-Legacy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
97 lines (76 loc) · 2.08 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
buildscript {
repositories {
jcenter()
maven { url "https://plugins.gradle.org/m2/" }
maven { url = "http://files.minecraftforge.net/maven" }
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
classpath 'com.github.jengelman.gradle.plugins:shadow:4.0.1'
}
}
apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'java'
def versionObj = new Version(major: 1, minor: 7, revision: 0)
version = versionObj.toString()
group = "com.wynntils"
archivesBaseName = "Wynntils"
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
compileJava.options.encoding = 'UTF-8'
minecraft {
version = "1.12.2-14.23.5.2768"
runDir = "run"
mappings = "stable_39"
makeObfSourceJar = false
}
repositories {
mavenCentral()
jcenter()
}
configurations {
embed
compile.extendsFrom(embed)
}
dependencies {
embed "javazoom:jlayer:1.0.1"
}
processResources {
inputs.property "description", "The best Wynncraft mod you'll probably find!\nBuild " + versionObj.getBuild()
inputs.property "version", versionObj.toVersion()
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
expand 'description':"The best Wynncraft mod you'll probably find!\nBuild " + versionObj.getBuild(), 'version':versionObj.toVersion()
}
}
jar {
from configurations.embed.collect { it.isDirectory() ? it : zipTree(it) }
manifest {
attributes [:]
}
}
reobfJar {
dependsOn shadowJar
}
shadowJar {
baseName = archivesBaseName + "-" + version
classifier = null
version = null
configurations = [project.configurations.compile]
}
task wrapper(type: Wrapper) {
gradleVersion = '4.4'
}
class Version {
int major, minor, revision
static String getBuild() {
System.getenv("BUILD_NUMBER") ?: System.getProperty("BUILD_NUMBER") ?: "DEV"
}
String toVersion() {
"${major}.${minor}.${revision}"
}
String toString() {
"${major}.${minor}.${revision}_$build-MC1.12.2"
}
}