Switch from FG to archloom + essential-gradle-toolkit

- Upgrade Gradle to 8.7
- Increase build daemon max memory to 8GB because archloom can compile a lot
  more projects at the same time.
- Disable Minecraft 1.8 (not 1.8.9) because archloom fails to set up for that
This commit is contained in:
Jonas Herzig
2022-05-29 18:08:42 +02:00
parent 706d46f6a9
commit ad49a69f37
19 changed files with 390 additions and 767 deletions

View File

@@ -2,9 +2,9 @@ import groovy.json.JsonOutput
import java.io.ByteArrayOutputStream
plugins {
id("fabric-loom") version "0.11-SNAPSHOT" apply false
id("com.replaymod.preprocess") version "48e02ad"
id("gg.essential.multi-version.root")
id("com.github.hierynomus.license") version "0.15.0"
kotlin("jvm") version "1.9.24" apply false // workaround for EGT crashing without
}
val latestVersion = file("version.txt").readLines().first()
@@ -36,6 +36,13 @@ subprojects {
}
}
if (name == "jGui") {
return@subprojects
}
val (_, minor) = name.split("-")[0].split(".")
val fabric = minor.toInt() >= 14 && !name.endsWith("-forge")
extra.set("loom.platform", if (fabric) "fabric" else "forge")
afterEvaluate {
val projectBundleJar = project.tasks.findByName("bundleJar")
if (projectBundleJar != null && projectBundleJar.hasProperty("archivePath") && project.name != "core") {
@@ -91,8 +98,11 @@ fun generateVersionsJson(): Map<String, Any> {
.filter { it != "core" }
// Internal project used to automatically remap from Forge 1.12.2 to Fabric 1.14.4
.filter { it != "1.14.4-forge" }
// We dropped 1.8 with the switch to archloom but still kept its source in case someone
// volunteers to make it build again
.filterNot { it == "1.8" && versionComparator.compare(version, "2.6.16") >= 0 }
// We dropped 1.7.10 with the Gradle 7 update but still kept its source in case someone
// volunteers to update FG 1.2 to Gradle 7.
// volunteers to ~~update FG 1.2 to Gradle 7~~ make it work with archloom.
.filterNot { it == "1.7.10" && versionComparator.compare(version, "2.6.0") >= 0 }
val versions = mcVersions.map { "$it-$version" }.toMutableList()
when (version) {