forked from DragonSurvivalTeam/DragonSurvival
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
175 lines (145 loc) · 5.35 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
buildscript {
repositories {
maven {
name = 'forge'
url = 'https://files.minecraftforge.net/maven'
}
maven {
name = "SpongePowered"
url = 'https://repo.spongepowered.org/repository/maven-public/'
}
mavenCentral()
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
classpath group: 'org.spongepowered', name: 'mixingradle', version: '0.7.+'
classpath group: 'org.parchmentmc', name: 'librarian', version: '1.+'
}
}
apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'org.parchmentmc.librarian.forgegradle'
apply plugin: 'org.spongepowered.mixin'
apply plugin: 'maven-publish'
version = property("mc_version")+"-"+new Date().format("dd.MM.yyyy")
group = property("mod_group")
archivesBaseName = property("mod_name")
java.toolchain.languageVersion = JavaLanguageVersion.of(property("java_version") as String)
minecraft {
mappings (channel: property("mapping_channel"), version: (property("mappings_version") + "-" + property("mc_version")))
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
runs {
client {
workingDirectory file('run/client')
property 'forge.enabledGameTestNamespaces', 'dragonsurvival'
mods {
dragonsurvival {
source sourceSets.main
}
}
// curios stuff
property 'mixin.env.remapRefMap', 'true'
property 'mixin.env.refMapRemappingFile', "${buildDir}/createSrgToMcp/output.srg"
}
clientRandom {
parent runs.client
// #### will be replaced with a random number | UUID is a randomly generated one
args '--username', 'Dev####', '--uuid', 'fdb0e318-1ac3-4049-b6f8-d024c0b87a56'
}
server {
workingDirectory file('run/server')
property 'forge.enabledGameTestNamespaces', 'dragonsurvival'
mods {
dragonsurvival {
source sourceSets.main
}
}
// curios stuff
property 'mixin.env.remapRefMap', 'true'
property 'mixin.env.refMapRemappingFile', "${buildDir}/createSrgToMcp/output.srg"
}
gameTestServer {
workingDirectory file('run/server')
property 'forge.logging.markers', 'REGISTRIES'
property 'forge.logging.console.level', 'debug'
property 'forge.enabledGameTestNamespaces', 'dragonsurvival'
mods {
dragonsurvival {
source sourceSets.main
}
}
}
data {
args '--mod', 'dragonsurvival', '--all', '--existing', '"' + file('src/main/resources/') + '"', '--output'
mods {
dragonsurvival {
source sourceSets.main
}
}
}
}
}
processResources {
from sourceSets.main.resources
inputs.property "version", project.version
filesMatching("mods.toml") {
expand "version": project.version
}
// Exclude datagenerator .cache directory
exclude '.cache'
duplicatesStrategy = 'include'
}
mixin {
add sourceSets.main, "dragonsurvival.refmap.json"
config 'dragonsurvival.mixins.json'
debug.verbose = true
debug.export = true
}
repositories {
maven {
name = "Gecholib maven"
url 'https://dl.cloudsmith.io/public/geckolib3/geckolib/maven/'
}
// JEI
maven {
name 'Blamejared Maven'
url 'https://maven.blamejared.com'
}
maven { url = "https://maven.theillusivec4.top/" }
// AppleSkin
maven { url "https://maven.ryanliptak.com/" }
// Curseforge
maven { url "https://cursemaven.com" }
}
dependencies {
minecraft "net.minecraftforge:forge:$mc_version-$forge_version"
implementation fg.deobf("software.bernie.geckolib:geckolib-forge-${property('geckolib_mc_version')}:${property('geckolib_version')}")
compileOnly fg.deobf("mezz.jei:jei-${property('mc_version')}-common-api:${property('jei_version')}")
runtimeOnly fg.deobf("mezz.jei:jei-${property('mc_version')}-forge:${property('jei_version')}")
compileOnly fg.deobf("top.theillusivec4.curios:curios-forge:${property('mc_version')}-${curios_version}:api")
runtimeOnly fg.deobf("top.theillusivec4.curios:curios-forge:${property('mc_version')}-${curios_version}")
compileOnly fg.deobf("squeek.appleskin:appleskin-forge:${appleskin_version}:api")
// Mixin
annotationProcessor 'org.spongepowered:mixin:0.8.5:processor'
}
jar {
manifest {
attributes([
"Specification-Title": mod_id,
"Specification-Vendor": "Dragon Survival Team",
"Specification-Version": "1", // We are version 1 of ourselves
"Implementation-Title": project.name,
"Implementation-Version": "${version}",
"Implementation-Vendor" :"Dragon Survival Team",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
"MixinConfigs": mod_id + ".mixins.json"
])
}
}
jar.finalizedBy('reobfJar')
publishing {
publications {
gpr(MavenPublication) {
from(components.java)
}
}
}