Skip to content

Commit dbbfd87

Browse files
committed
Duplication strat, FG 5, fix proxy unlink on destabilize
1 parent c757032 commit dbbfd87

24 files changed

+342
-217
lines changed

build.gradle

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
buildscript {
22
repositories {
33
maven { url = 'https://maven.minecraftforge.net' }
4-
jcenter()
54
mavenCentral()
65
}
76

87
dependencies {
9-
classpath "net.minecraftforge.gradle:ForgeGradle:4.1.12"
8+
classpath "net.minecraftforge.gradle:ForgeGradle:5.1.+"
109
}
1110
}
1211

@@ -28,7 +27,7 @@ archivesBaseName = mod_id
2827
println("Mod ID: ${mod_id}");
2928
println("Version: ${version}");
3029

31-
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
30+
java.toolchain.languageVersion = JavaLanguageVersion.of(8)
3231

3332
sourceSets {
3433
api {
@@ -139,7 +138,8 @@ minecraft {
139138
parent runs.server
140139

141140
workingDirectory project.file('run/test')
142-
main 'com.alcatrazescapee.mcjunitlib.DedicatedTestServerLauncher' // The main class which launches a customized server which then runs JUnit tests
141+
main 'com.alcatrazescapee.mcjunitlib.DedicatedTestServerLauncher'
142+
// The main class which launches a customized server which then runs JUnit tests
143143
ideaModule "${project.name}.test"
144144
property 'forge.logging.console.level', 'unittest'
145145
environment 'MOD_MODULES', String.join(File.pathSeparator, "${mod_id}%%${project.name}.test")
@@ -161,7 +161,8 @@ minecraft {
161161
parent runs.server
162162

163163
workingDirectory project.file('run/test')
164-
main 'com.alcatrazescapee.mcjunitlib.DedicatedTestServerLauncher' // The main class which launches a customized server which then runs JUnit tests
164+
main 'com.alcatrazescapee.mcjunitlib.DedicatedTestServerLauncher'
165+
// The main class which launches a customized server which then runs JUnit tests
165166
ideaModule "${project.name}.test"
166167
property 'forge.logging.console.level', 'unittest'
167168
environment 'MOD_MODULES', String.join(File.pathSeparator, "${mod_id}%%${project.name}.test")
@@ -220,15 +221,19 @@ repositories {
220221

221222
maven {
222223
name "MCJUnitLib - CM Github"
223-
url = uri("https://maven.pkg.github.com/CompactMods/mcjunitlib")
224+
url = "https://maven.pkg.github.com/CompactMods/mcjunitlib"
225+
content {
226+
includeGroup "com.github.alcatrazEscapee"
227+
}
228+
224229
credentials {
225230
username = project.findProperty("gpr.actor") ?: System.getenv("GITHUB_ACTOR")
226231
password = project.findProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN")
227232
}
228233
}
229234
}
230235

231-
def dev_mods = fileTree(dev_mods_dir).filter { it -> it.isFile() }.files.name.collect( { format(it) } )
236+
def dev_mods = fileTree("mods").filter { it -> it.isFile() }.files.name.collect({ format(it) })
232237

233238
dependencies {
234239
// Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed
@@ -239,10 +244,7 @@ dependencies {
239244
testImplementation fg.deobf("com.github.alcatrazEscapee:mcjunitlib:${mcunittest_version}")
240245

241246
// Deobfuscate each dev mod for runtime
242-
dev_mods.each {
243-
compileOnly fg.deobf(it)
244-
runtimeOnly fg.deobf(it)
245-
}
247+
dev_mods.each { implementation fg.deobf(it) }
246248

247249
// JEI
248250
compileOnly fg.deobf("mezz.jei:jei-${minecraft_version}:${jei_version}:api")
@@ -253,6 +255,10 @@ dependencies {
253255
runtimeOnly fg.deobf("mcjty.theoneprobe:TheOneProbe-1.16:${top_version}")
254256
}
255257

258+
processResources {
259+
duplicatesStrategy = DuplicatesStrategy.WARN
260+
}
261+
256262
jar {
257263
from sourceSets.api.output
258264
from sourceSets.main.output
@@ -261,20 +267,19 @@ jar {
261267
finalizedBy('reobfJar')
262268
manifest {
263269
attributes([
264-
"Specification-Title": "compactcrafting",
265-
"Specification-Vendor": "robotgryphon",
266-
"Specification-Version": "1", // We are version 1 of ourselves
267-
"Implementation-Title": project.name,
268-
"Implementation-Version": isRelease ? archiveVersion : "nightly-${gitCommitHash}",
269-
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
270+
"Specification-Title" : "compactcrafting",
271+
"Specification-Vendor" : "robotgryphon",
272+
"Specification-Version" : "1", // We are version 1 of ourselves
273+
"Implementation-Title" : project.name,
274+
"Implementation-Version" : isRelease ? archiveVersion : "nightly-${gitCommitHash}",
275+
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
270276
])
271277
}
272278
}
273279

274280
task apiJar(type: Jar) {
275281
// Sources included because of MinecraftForge/ForgeGradle#369
276282
from sourceSets.api.output
277-
archiveClassifier = 'api'
278283
destinationDirectory = file("$rootDir/build-out")
279284
}
280285

@@ -322,6 +327,6 @@ publishing {
322327

323328
test {
324329
useJUnitPlatform() {
325-
excludeTags "minecraft"
330+
excludeTags "minecraft"
326331
}
327332
}

dev.gradle

Whitespace-only changes.

gradle/wrapper/gradle-wrapper.jar

3.28 KB
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)