-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
117 lines (101 loc) · 2.82 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
def package_name = "com.github.m5rian"
def client_name = "shilu"
def client_name_upper_case = "Shilu"
buildscript {
repositories {
mavenCentral()
jcenter()
// Mixin requires ForgeGradle
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
// Actual MixingGradle
maven {
name = "sponge"
url = "https://repo.spongepowered.org/maven"
}
}
dependencies {
classpath "net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT"
classpath "org.spongepowered:mixingradle:0.6-SNAPSHOT"
}
}
apply plugin: "java"
apply plugin: "net.minecraftforge.gradle.tweaker-client"
apply plugin: "org.spongepowered.mixin"
version = "1.0"
group = "${package_name}" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "${client_name_upper_case}"
sourceCompatibility = targetCompatibility = 1.8
compileJava.options.encoding = "UTF-8"
minecraft {
version = "1.8.9"
tweakClass = "${package_name}.${client_name}.mixins.${client_name_upper_case}Tweaker"
runDir = "run"
mappings = "stable_20"
clientJvmArgs = ["-XX:-DisableExplicitGC"]
makeObfSourceJar = false
}
repositories {
maven {
name "jitpack"
url "https://jitpack.io"
}
maven {
name "spongepowered"
url "https://repo.spongepowered.org/maven/"
}
jcenter()
mavenCentral()
}
configurations {
embed
compile.extendsFrom(embed)
}
dependencies {
embed("org.spongepowered:mixin:0.7.11-SNAPSHOT") {
exclude module: "launchwrapper"
exclude module: "guava"
exclude module: "gson"
exclude module: "commons-io"
}
embed "org.slick2d:slick2d-core:1.0.2"
embed "com.google.code.gson:gson:2.8.5"
embed "com.github.Vatuu:discord-rpc:1.6.2"
compile group: "org.reflections", name: "reflections", version: "0.9.10"
}
mixin {
defaultObfuscationEnv = "notch"
add sourceSets.main, "mixins.${client_name}.refmap.json"
}
processResources {
inputs.files "src/main/resources"
outputs.dir "build/classes/main"
copy {
from("src/main/resources")
into("build/classes/main")
}
}
jar {
dependsOn configurations.compile
from {
configurations.embed.collect {
it.isDirectory() ? it : zipTree(it)
}
}
exclude "META-INF/*.RSA", "META-INF/*.SF", "META-INF/*.DSA"
}
jar {
manifest.attributes(
"MixinConfigs": "mixins.${client_name}.json",
"TweakClass": "${package_name}.${client_name}.mixins.${client_name_upper_case}Tweaker",
"TweakOrder": 0,
"Manifest-Version": 1.0
)
configurations.embed.each { dep ->
from(project.zipTree(dep)) {
exclude "META-INF", "META-INF/**"
}
}
}