This repository has been archived by the owner on Oct 27, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 93
/
build.gradle
158 lines (133 loc) · 4.09 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
/*
* Copyright (C) 2018-present Hyperium <https://hyperium.cc/>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
buildscript {
ext.kotlin_version = '1.3.72'
repositories {
mavenCentral()
jcenter()
maven {
name = "forge"
url = "https://files.minecraftforge.net/maven"
}
maven {
name = 'sponge'
url = 'https://repo.spongepowered.org/maven'
}
maven {
url "https://plugins.gradle.org/m2/"
}
maven {
url 'https://jitpack.io'
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT'
classpath 'org.spongepowered:mixingradle:0.6-SNAPSHOT'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
configurations {
embed
compile.extendsFrom(embed)
}
apply plugin: 'net.minecraftforge.gradle.tweaker-client'
apply plugin: 'org.spongepowered.mixin'
apply plugin: 'kotlin'
apply plugin: 'java'
sourceCompatibility = targetCompatibility = 1.8
compileJava.options.encoding = 'UTF-8'
version = "1.2.3"
group = "cc.hyperium"
archivesBaseName = "Hyperium"
minecraft {
version = "1.8.9"
tweakClass = "cc.hyperium.launch.HyperiumTweaker"
mappings = "stable_22"
runDir = 'run'
clientJvmArgs = ["-XX:-DisableExplicitGC"] // fast world loading
makeObfSourceJar = false
}
dependencies {
embed('org.spongepowered:mixin:0.7.11-SNAPSHOT') {
exclude module: 'launchwrapper'
exclude module: 'guava'
exclude module: 'gson'
exclude module: 'commons-io'
}
embed "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
embed "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
embed 'com.github.jagrosh:DiscordIPC:e29d6d8'
embed 'com.github.FalseHonesty:reflections:855f40b80b'
embed 'com.github.ben-manes.caffeine:caffeine:2.8.0'
embed ('org.slick2d:slick2d-core:1.0.2') {
exclude module: 'lwjgl'
}
embed ("com.github.KevinPriv:MojangAPI:1.0") {
exclude module: "gson"
}
embed 'com.github.Cubxity:DeobfStack:1.2'
embed 'org.ow2.asm:asm:5.0.3'
embed fileTree(dir: 'libs', include: '*.jar')
}
mixin {
// Specify "notch" or "searge" here
defaultObfuscationEnv notch
add sourceSets.main, "mixin.hyperium.refmap.json"
}
repositories {
maven { url "https://jitpack.io" }
maven {
name = 'sponge'
url = 'https://repo.spongepowered.org/maven/'
}
mavenCentral()
jcenter()
}
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.hyperium.json',
"TweakClass": 'cc.hyperium.launch.HyperiumTweaker',
"TweakOrder": 0,
"Manifest-Version": 1.0
)
configurations.embed.each { dep ->
from(project.zipTree(dep)) {
exclude 'META-INF', 'META-INF/**'
exclude 'org/jetbrains/annotations', 'org/jetbrains/annotations/**'
}
}
}
task wrapper(type: Wrapper) {
gradleVersion = '4.10.3'
}