Skip to content

Commit

Permalink
removed 1.20.6
Browse files Browse the repository at this point in the history
  • Loading branch information
blackd committed Jul 12, 2024
1 parent c6a0297 commit 88b3a4d
Show file tree
Hide file tree
Showing 106 changed files with 20 additions and 8,213 deletions.
35 changes: 0 additions & 35 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,6 @@ afterEvaluate {
dependsOn(endTask)
endTask = it.tasks.named("jar")
dependsOn(endTask)
endTask = it.tasks.named("customJar")
dependsOn(endTask)
endTask = it.tasks.named("copyProGuardJar")
dependsOn(endTask)


}
val jarFile = jarTask.get()
Expand All @@ -166,39 +161,9 @@ afterEvaluate {
}

tasks.named<DefaultTask>("build") {

/*
subprojects.filter {
val isFabric = it.name.startsWith("fabric")
val isForge = it.name.startsWith("forge")
isFabric || isForge
}.forEach {
dependsOn(it.tasks["build"])
}
*/
dependsOn(tasks["copyPlatformJars"])
//finalizedBy(tasks["copyPlatformJars"])
}

afterEvaluate {
/*
tasks.named<DefaultTask>("build") {
subprojects.filter {
val isFabric = it.name.startsWith("fabric")
val isForge = it.name.startsWith("forge")
isFabric || isForge
}.forEach {
dependsOn(it.tasks["build"])
}
subprojects.forEach {
it.getTasksByName("build", false).forEach { t ->
dependsOn(t)
}
}
dependsOn(tasks["copyPlatformJars"])
}
*/
}


/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,20 +51,17 @@ fun Project.registerMinimizeJarTask(): DefaultTask {
"remapJar"
} else if (project.name.startsWith("forge")) {
isForge = true
"shadowJar"
"proguard"
} else {
"proguard"
}
val jarTask = project.tasks.named<DefaultTask>(taskName)
dependsOn(jarTask)
if (isForge) {
var endTask = project.tasks.named("proguard")
dependsOn(endTask)
}

val jarFile = jarTask.get()
val jarFileName = jarFile.outputs.files.first().name
val jarPath = project.layout.buildDirectory.file("libs/" + jarFileName)
var outputFile = project.layout.buildDirectory.dir("optimized-mod").get().asFile.toPath() / jarFileName.replace("-all-proguard","")
val outputFile = project.layout.buildDirectory.dir("optimized-mod").get().asFile.toPath() / jarFileName.replace("-all-proguard","")
doLast {
exec {
this.workingDir = project.layout.projectDirectory.asFile
Expand All @@ -81,18 +78,6 @@ fun Project.registerMinimizeJarTask(): DefaultTask {
}

fun Project.forgeCommonAfterEvaluate(mod_loader: Any, minecraft_version: Any, mod_artefact_version: Any) {
/*
tasks.named<Task>("reobfJar") {
val shadow = tasks.getByName("customJar");
dependsOn(shadow)
dependsOn(tasks["copyProGuardJar"])
//input = shadow.archiveFile.orNull?.asFile
}
tasks.named<Task>("proguard") {
val shadow = tasks.getByName<Task>("shadowJar");
dependsOn(shadow)
}
*/

val forgeRemapJar = tasks.named<org.gradle.jvm.tasks.Jar>("shadowJar").get()
registerCopyJarForPublishTask(forgeRemapJar, mod_loader, minecraft_version, mod_artefact_version).get().dependsOn("shadowJar") //.dependsOn("reobfJar")
Expand All @@ -101,15 +86,12 @@ fun Project.forgeCommonAfterEvaluate(mod_loader: Any, minecraft_version: Any, mo
?.dependsOn("build")
?.dependsOn("minimizeJar")
?.dependsOn("jar")
?.dependsOn("copyProGuardJar")
?.mustRunAfter("minimizeJar")
?.mustRunAfter("build") ?: logger.lifecycle("Can't find task 'publishMavenPublicationToIpnOfficialRepoRepository'")

tasks.named("modrinth")?.get()
?.dependsOn("build")
?.dependsOn("minimizeJar")
// ?.dependsOn("deobfJar")
?.dependsOn("copyProGuardJar")
?.mustRunAfter("minimizeJar")
?.mustRunAfter("build") ?: logger.lifecycle("Can't find task 'modrinth'")
rootAfterEvaluate()
Expand Down
Loading

0 comments on commit 88b3a4d

Please sign in to comment.