Step 1 of #8. 1.21.11's version-specific code moves from versions/1.21.11/src to the top-level src/, built by Stonecutter as the project :1.21.11. The other versions still build from their own copies as :mc-<v> until they're folded in. - settings.gradle: applies Stonecutter (Groovy controller) with stonecutterVersions = ["1.21.11"] and skips those folders when including the old mc-<v> projects. - The old root build.gradle becomes stonecutter.gradle (the root project's script, with the shared repositories, common wiring and buildAll), and 1.21.11's build.gradle becomes the root build.gradle that Stonecutter runs for each version. versions/1.21.11 keeps its gradle.properties and run/. - The jar has the same 415 entries, fabric.mod.json and mixin configs as before; the only class differences also appear when rebuilding an untouched version today. - scripts/port.sh treats src/ as the active Stonecutter version, so changes port between it and the old copies both ways. - README and VERSION_GUIDE describe the layout, version comments and how to add a version. Co-Authored-By: Claude Opus 5.5 <[email protected]>
74 lines
2.1 KiB
Groovy
74 lines
2.1 KiB
Groovy
plugins {
|
|
id "dev.kikugie.stonecutter"
|
|
}
|
|
|
|
// The version whose code is uncommented in src/. Switch with "Set active project to <v>", and run
|
|
// "Reset active project" before committing.
|
|
stonecutter.active "1.21.11"
|
|
|
|
subprojects {
|
|
apply plugin: "java"
|
|
|
|
repositories {
|
|
maven { url "https://maven.fabricmc.net/" }
|
|
maven { url "https://git.selimaj.dev/api/packages/selimaj-dev/maven" }
|
|
maven { url "https://git.selimaj.dev/api/packages/saturnclientmc/maven" }
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
implementation "de.javagl:obj:0.4.0"
|
|
implementation "com.formdev:svgSalamander:1.1.4"
|
|
implementation 'com.fasterxml.jackson.core:jackson-databind:2.17.0'
|
|
implementation 'com.fasterxml.jackson.core:jackson-annotations:2.17.0'
|
|
implementation 'com.fasterxml.jackson.core:jackson-core:2.17.0'
|
|
}
|
|
}
|
|
|
|
configure(subprojects.findAll { it.name != "common" }) {
|
|
dependencies {
|
|
implementation project(":common")
|
|
}
|
|
|
|
sourceSets {
|
|
main {
|
|
resources {
|
|
srcDir project(":common").file("src/main/resources")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
tasks.register("buildAll") {
|
|
group = "build"
|
|
description = "Builds all subprojects and collects their remapped jars"
|
|
|
|
// Only build remapped jars (not full build)
|
|
dependsOn subprojects.collect { proj ->
|
|
proj.tasks.matching { it.name == "remapJar" }
|
|
}
|
|
|
|
doLast {
|
|
def outputDir = file("$buildDir/allJars")
|
|
outputDir.mkdirs()
|
|
|
|
subprojects.each { proj ->
|
|
def remapTask = proj.tasks.findByName("remapJar")
|
|
|
|
if (remapTask != null) {
|
|
def jarFile = remapTask.archiveFile.get().asFile
|
|
|
|
if (jarFile.exists() && !jarFile.name.contains("sources")) {
|
|
copy {
|
|
from jarFile
|
|
into outputDir
|
|
rename { "${jarFile.name}" }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
println "All remapped jars collected in: $outputDir"
|
|
}
|
|
}
|