forked from mattmess1221/TabbyChat-2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
99 lines (90 loc) · 2.34 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
98
99
buildscript {
repositories {
jcenter()
maven {
name 'forge'
url 'http://files.minecraftforge.net/maven'
}
maven {
name = 'sponge'
url = 'http://repo.spongepowered.org/maven'
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
classpath 'org.spongepowered:mixingradle:0.6-SNAPSHOT'
}
}
plugins {
id 'org.ajoberstar.grgit' version '1.7.2'
}
apply plugin: 'net.minecraftforge.gradle.liteloader'
apply plugin: 'org.spongepowered.mixin'
apply plugin: 'org.ajoberstar.grgit'
ext.revision = grgit.log().size()
ext.hash = grgit.head().abbreviatedId
if (release != 'RELEASE')
version += "-$release-$ext.revision"
minecraft {
version = minecraft_version
mappings = minecraft_mappings
runDir = 'run'
// Replace the version string
replace(
"@VERSION@": project.version,
"@REVISION@": project.revision,
"@MCVERSION@": project.minecraft.version
)
}
sourceSets {
main {
ext.refMap = 'mixin.tabbychat.refmap.json'
}
}
configurations {
// shadow plugin doesn't play well with liteloader
shadow
compile.extendsFrom shadow
}
dependencies {
shadow 'net.sf.jazzy:jazzy:0.5.2-rtext-1.4.1-2'
testCompile 'junit:junit:4.12'
}
afterEvaluate {
println '==========================================='
println " TabbyChat $version ($ext.hash)"
println '==========================================='
file('build.number').delete()
}
litemod.json {
name = 'tabbychat'
author = 'killjoy1221'
revision = ext.revision
mcversion = '1.12.r2'
displayName = 'TabbyChat 2'
description = 'Chat overhaul.'
mixinConfigs = ['mixin.tabbychat.json']
}
manifest {
attributes 'Implementation-Version': "$version (git ${project.hash})"
}
jar {
from litemod
from configurations.shadow.collect { it.isDirectory() ? it : zipTree(it) }
}
task srgJar(type: Jar) {
classifier 'srg'
from sourceSets.main.output
from configurations.shadow.collect { it.isDirectory() ? it : zipTree(it) }
}
// XXX Do a PR to fg about removing these dumb defaults.
tasks.withType(Jar)*.baseName = archivesBaseName
artifacts.archives srgJar
reobf {
srgJar {
mappingType = 'SEARGE'
}
}
mixin {
defaultObfuscationEnv notch
}