-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
187 lines (153 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
186
187
buildscript {
repositories {
maven { url = 'https://maven.minecraftforge.net' }
maven { url = "https://repo.spongepowered.org/maven" }
jcenter()
mavenCentral()
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
classpath group: 'org.spongepowered', name: 'mixingradle', version: '0.7-SNAPSHOT'
}
}
apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'eclipse'
apply plugin: 'org.spongepowered.mixin'
apply plugin: 'maven-publish'
def versionPropsFile = file('version.properties')
if (versionPropsFile.canRead()) {
def Properties versionProps = new Properties()
versionProps.load(new FileInputStream(versionPropsFile))
def code = versionProps['VERSION_CODE'].toInteger() + 1
versionProps['VERSION_CODE']=code.toString()
versionProps.store(versionPropsFile.newWriter(), null)
version = "1.16.5" + "-" + "1.0" + "." + code.toString()
}
else {
throw new GradleException("Could not read version.properties!")
}
group = 'com.blamejared.damnedminecrafttweaks'
archivesBaseName = 'DamnedMinecraftTweaks'
java.toolchain.languageVersion = JavaLanguageVersion.of(8)
minecraft {
//accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
mappings channel: 'official', version: '1.16.5'
runs {
client {
property 'forge.logging.console.level', 'debug'
property 'fml.earlyprogresswindow', 'false'
property 'mixin.env.remapRefMap', 'true'
property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg"
arg "-mixin.config=damnedminecrafttweaks.mixins.json"
workingDirectory project.file('run')
mods {
damnedminecrafttweaks {
source sourceSets.main
}
}
}
server {
workingDirectory project.file('run_server')
mods {
damnedminecrafttweaks {
source sourceSets.main
}
}
arg "-mixin.config=damnedminecrafttweaks.mixins.json"
// This makes dependencies with mixins work
property 'mixin.env.remapRefMap', 'true'
property 'mixin.env.refMapRemappingFile', "${buildDir}/createSrgToMcp/output.srg"
// This makes dependencies with mixins work
}
data {
workingDirectory project.file('run')
args '--mod', 'damnedminecrafttweaks', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')
mods {
damnedminecrafttweaks {
source sourceSets.main
}
}
}
}
}
mixin {
add sourceSets.main, "damnedminecrafttweaks.refmap.json"
defaultObfuscationEnv "searge"
}
sourceSets.main.resources { srcDir 'src/generated/resources' }
repositories {
maven {
url "https://cfa2.cursemaven.com"
content {
includeGroup "curse.maven"
}
}
maven {
url 'https://maven.blamejared.com'
content {
includeGroup "com.blamejared.crafttweaker"
}
}
flatDir {
dirs "libs"
}
}
dependencies {
minecraft 'net.minecraftforge:forge:1.16.5-36.2.20'
implementation fg.deobf("com.blamejared.crafttweaker:CraftTweaker-1.16.5:7.1.2.454")
implementation fg.deobf("curse.maven:torohealth-damage-indicators-245733:3144151")
implementation fg.deobf("curse.maven:attributefix-280510:3232225")
implementation fg.deobf("curse.maven:better-smithing-517972:3457290")
implementation fg.deobf("curse.maven:mobhealthbar-559894:3612931")
implementation fg.deobf("curse.maven:classicbar-317642:3240083")
implementation fg.deobf("curse.maven:geckolib-388172:3629666")
compileOnly fg.deobf("curse.maven:lycanitesmobs-224770:3516607")
//Antique Atlas
implementation fg.deobf("curse.maven:cloth-348521:3311352")
//Uses a flat dir as a fix since the refmap doesn't want to play nice
//(It's written in MCP where this mod uses MOJ maps)
//You will have to utilize the modified refmap that will be provided
//https://www.curseforge.com/minecraft/mc-mods/antique-atlas/files
//implementation fg.deobf("ignore:antiqueatlas:6.0.1-forge-mc1.16.5")
implementation fg.deobf("curse.maven:antiqueatlas-227795:3398190")
//Mine and Slash
implementation fg.deobf("curse.maven:divinemisisons-495974:3541524")
implementation fg.deobf("curse.maven:curiosapi-309927:3456953")
implementation fg.deobf("curse.maven:dungeonsexile-404445:3541529")
implementation fg.deobf("curse.maven:libraryexile-398780:3557138")
implementation fg.deobf("curse.maven:mineslash-306575:3561502")
implementation fg.deobf("curse.maven:mana-and-artifice-406360:3651870")
annotationProcessor 'org.spongepowered:mixin:0.8.4:processor'
}
jar {
manifest {
attributes([
"Specification-Title" : "damnedminecrafttweaks",
"Specification-Vendor" : "BlameJared",
"Specification-Version" : "1", // We are version 1 of ourselves
"Implementation-Title" : project.name,
"Implementation-Version" : "${version}",
"Implementation-Vendor" : "BlameJared",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
"MixinConfigs": "damnedminecrafttweaks.mixins.json"
])
}
}
jar.finalizedBy('reobfJar')
publish.dependsOn(project.tasks.getByName("assemble"))
publish.mustRunAfter(project.tasks.getByName("build"))
publishing {
publications {
mavenJava(MavenPublication) {
groupId project.group
artifactId project.archivesBaseName
version project.version
from components.java
}
}
repositories {
maven {
url "file://" + System.getenv("local_maven")
}
}
}