-
Notifications
You must be signed in to change notification settings - Fork 135
/
Copy pathbuild.gradle
185 lines (168 loc) · 5.99 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
buildscript {
repositories {
mavenLocal()
mavenCentral()
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/repositories/snapshots/"
}
maven {
name = "forge"
url = "https://files.minecraftforge.net/maven"
}
maven {
name = 'sponge'
url = 'https://repo.spongepowered.org/maven'
}
jcenter()
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
classpath 'pokechu22.test.begradle:begradle:0.2.7:fg2'
classpath 'org.spongepowered:mixingradle:0.6-SNAPSHOT'
}
}
apply plugin: 'java'
version = "4.1.1.1-SNAPSHOT"
group = "wdl"
archivesBaseName = "LiteModWDL"
libsDirName = "../../libs/${version}"
apply plugin: 'net.minecraftforge.gradle.liteloader'
apply plugin: 'pokechu22.test.customsrg'
apply plugin: 'org.spongepowered.mixin'
apply plugin: 'pokechu22.test.langrenamer'
apply plugin: 'pokechu22.test.noinplacereobf'
repositories {
mavenLocal()
maven { name = "mojang"; url = "https://libraries.minecraft.net/" }
}
dependencies {
testCompile 'junit:junit:4.12'
testCompile 'org.hamcrest:hamcrest-library:1.3'
testCompile 'org.mockito:mockito-core:2.22.0'
testCompile('org.spongepowered:lwts:1.1.0-pokechu22') { transitive = false }
// Make sure that we have the Minecraft deps, at the correct versions
testCompile configurations.forgeGradleMcDeps
}
minecraft {
version = "1.12.2"
mappings = "snapshot_20201215"
runDir = "run"
// We don't currently want a source jar (doesn't work well for base edits, and the version info doesn't work yet)
makeObfSourceJar = false
// Copy one language to its variants
ext.langMap = [
'es_es': ['es_ar', 'es_mx', 'es_uy', 'es_ve'],
'fr_fr': ['fr_ca']
]
}
extraSrgs {
addSrg file('../srgs/AbstractHorseToEquineEntity.srg')
addSrg file('../srgs/PositionedSound.srg')
addSrg file('../srgs/1.13.srg')
addMethods file('../srgs/gamerule_methods_pre_1.14.3.csv')
addMethods file('../srgs/pre_1.14_methods.csv')
addMethods file('../srgs/pre_1.15_methods.csv')
addMethods file('../srgs/1.12_methods.csv')
addFields file('../srgs/pre_1.14_fields.csv')
addFields file('../srgs/1.12_fields.csv')
addPatch('net.minecraft.nbt.JsonToNBT.java', file('../srgs/JsonToNBT_1.12.patch'))
}
sourceSets {
main {
java {
srcDir "src/main/java"
srcDir project(':1.12.2').file("src/main/java")
srcDir project(':share').file("src/main/java")
exclude "wdl/StandardEntityManagers_1_10.java"
exclude "wdl/StandardEntityManagers_1_13.java"
exclude "wdl/StandardEntityManagers_1_13_1.java"
exclude "wdl/WDLChunkLoader_1_13.java"
exclude "wdl/handler/block/BaseLargeChestHandler_1_13.java"
exclude "wdl/handler/block/TrappedChestHandler.java"
exclude "wdl/versioned/GameRules_1_13.java"
exclude "wdl/versioned/Generator_1_13.java"
exclude "wdl/versioned/Gui_1_11.java"
exclude "wdl/versioned/Gui_1_13.java"
exclude "wdl/versioned/Handlers_1_9_2.java"
exclude "wdl/versioned/Handlers_1_10.java"
exclude "wdl/versioned/Handlers_1_13.java"
exclude "wdl/versioned/Maps_1_13.java"
exclude "wdl/versioned/Maps_1_13_1.java"
exclude "wdl/versioned/NBT_1_13.java"
exclude "wdl/versioned/Packets_1_13.java"
exclude "wdl/versioned/Registries_1_13_1.java"
exclude "wdl/versioned/Types_1_9_2.java"
exclude "wdl/versioned/Types_1_13.java"
exclude "wdl/versioned/Types_1_13_2.java"
exclude "wdl/gui/widget/ExtButton_1_11.java"
exclude "wdl/gui/widget/ExtButton_1_13.java"
exclude "wdl/gui/widget/ExtGuiList_1_11.java"
exclude "wdl/gui/widget/ExtGuiList_1_13.java"
exclude "wdl/gui/widget/ExtGuiScreen_1_9.java"
exclude "wdl/gui/widget/ExtGuiScreen_1_13.java"
exclude "wdl/gui/widget/ExtTextField_1_13.java"
}
resources {
srcDir "src/main/resources"
srcDir project(':share').file("src/main/resources")
}
// Refmap declaration must match the refmap name specified in the json config
ext.refMap = "mixins.LiteModWDL.refmap.json"
}
test {
java {
srcDir "src/test/java"
srcDir project(':share').file("src/test/java")
exclude "wdl/NoMixinTest.java"
exclude "wdl/TestBootstrap_1_9.java"
exclude "wdl/TestBootstrap_1_10.java"
exclude "wdl/TestBootstrap_1_11.java"
exclude "wdl/TestBootstrap_1_13.java"
exclude "wdl/ExtWorld_1_10.java"
exclude "wdl/ExtWorld_1_13.java"
exclude "wdl/ExtWorld_1_13_1.java"
exclude "wdl/handler/block/TrappedChestTest_1_13.java"
exclude "wdl/lwts/WDLTestTweaker_1_9.java"
}
}
api {
java {
srcDir project(':share').file("src/api/java")
}
}
}
mixin {
defaultObfuscationEnv notch
}
litemod {
json {
name = "LiteModWDL"
displayName = "World Downloader for Liteloader"
author = "uyjulian, pokechu22"
mcversion = "1.12.2"
mixinConfigs += "mixins.LiteModWDL.json"
version = project.version
}
}
// Use tabs instead of spaces
fixMcSources {
astyleConfig = "../astyle.cfg"
}
// We want Java 8 where possible
tasks.withType(JavaCompile) { javaTask ->
javaTask.sourceCompatibility = "1.8"
javaTask.targetCompatibility = "1.8"
}
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
// Ensure that the API code and litemod JSON in the jar
jar {
from sourceSets.api.output
from litemod.outputs
}
test {
systemProperty 'lwts.tweaker', 'wdl.lwts.WDLTestTweaker'
// Run tests in a temporary directory
workingDir = { test.temporaryDir }
}