mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2024-12-13 11:40:29 +00:00
Fix building from a fresh setup
We were attempting to resolve the Forge jars before they had been generated, which meant the build failed.
This commit is contained in:
parent
63f6735bb8
commit
18d468e887
21
build.gradle
21
build.gradle
@ -106,10 +106,19 @@ import proguard.gradle.ProGuardTask
|
|||||||
|
|
||||||
task proguard(type: ProGuardTask, dependsOn: jar) {
|
task proguard(type: ProGuardTask, dependsOn: jar) {
|
||||||
description "Removes unused shadowed classes from the jar"
|
description "Removes unused shadowed classes from the jar"
|
||||||
|
group "compact"
|
||||||
|
|
||||||
injars jar.archivePath
|
injars jar.archivePath
|
||||||
outjars "${jar.archivePath.absolutePath.replace(".jar", "")}-min.jar"
|
outjars "${jar.archivePath.absolutePath.replace(".jar", "")}-min.jar"
|
||||||
|
|
||||||
|
// Add the main runtime jar and all non-shadowed dependencies
|
||||||
|
libraryjars "${System.getProperty('java.home')}/lib/rt.jar"
|
||||||
|
doFirst {
|
||||||
|
sourceSets.main.compileClasspath
|
||||||
|
.filter { !it.name.contains("Cobalt") }
|
||||||
|
.each { libraryjars it }
|
||||||
|
}
|
||||||
|
|
||||||
// We want to avoid as much obfuscation as possible. We're only doing this to shrink code size.
|
// We want to avoid as much obfuscation as possible. We're only doing this to shrink code size.
|
||||||
dontobfuscate; dontoptimize; keepattributes; keepparameternames
|
dontobfuscate; dontoptimize; keepattributes; keepparameternames
|
||||||
|
|
||||||
@ -123,18 +132,6 @@ task proguard(type: ProGuardTask, dependsOn: jar) {
|
|||||||
keepclassmembers 'class org.squiddev.cobalt.lib.** { <init>(...); }'
|
keepclassmembers 'class org.squiddev.cobalt.lib.** { <init>(...); }'
|
||||||
}
|
}
|
||||||
|
|
||||||
gradle.projectsEvaluated {
|
|
||||||
tasks.withType(ProGuardTask) {
|
|
||||||
group "compact"
|
|
||||||
|
|
||||||
// Add the main runtime jar and all non-shadowed dependencies
|
|
||||||
libraryjars "${System.getProperty('java.home')}/lib/rt.jar"
|
|
||||||
sourceSets.main.compileClasspath
|
|
||||||
.filter { !it.name.contains("Cobalt") }
|
|
||||||
.each { libraryjars it }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
task proguardMove(dependsOn: proguard) {
|
task proguardMove(dependsOn: proguard) {
|
||||||
description "Replace the original jar with the minified version"
|
description "Replace the original jar with the minified version"
|
||||||
group "compact"
|
group "compact"
|
||||||
|
Loading…
Reference in New Issue
Block a user