// Root build for the Architectury multiloader (Fabric / Forge). // Target MC version is driven by gradle.properties (minecraft_version + the // *_version props). This branch targets Minecraft 1.20.1 / Java 17. plugins { id "base" id "architectury-plugin" version "3.4.164" id "dev.architectury.loom" version "1.7.435" apply false id "com.gradleup.shadow" version "8.3.5" apply false } architectury { minecraft = rootProject.minecraft_version } allprojects { group = rootProject.mod_group_id version = rootProject.mod_version } subprojects { apply plugin: "dev.architectury.loom" apply plugin: "architectury-plugin" apply plugin: "maven-publish" def isLegacy = rootProject.minecraft_version == "1.20.1" def javaVer = isLegacy ? 17 : 21 base { // built jars: skinsg-fabric-.jar, skinsg-forge-.jar, ... archivesName = "${rootProject.mod_id}-${project.name}" } repositories { maven { url "https://maven.architectury.dev/" } maven { url "https://maven.neoforged.net/releases/" } maven { url "https://maven.minecraftforge.net/" } maven { url "https://maven.parchmentmc.org" } } dependencies { minecraft "com.mojang:minecraft:${rootProject.minecraft_version}" mappings loom.layered { officialMojangMappings() parchment("org.parchmentmc.data:parchment-${rootProject.parchment_minecraft}:${rootProject.parchment_version}@zip") } } java { withSourcesJar() sourceCompatibility = JavaVersion.toVersion(javaVer) targetCompatibility = JavaVersion.toVersion(javaVer) toolchain.languageVersion = JavaLanguageVersion.of(javaVer) } tasks.withType(JavaCompile).configureEach { options.encoding = "UTF-8" options.release = javaVer } } def runtimePlatforms = rootProject.enabled_platforms.split(",").collect { it.trim() }.findAll { !it.isEmpty() } tasks.register("collectRuntimeJars", Copy) { into layout.buildDirectory.dir("libs") doFirst { delete(layout.buildDirectory.dir("libs")) } runtimePlatforms.each { platform -> def remap = project(":${platform}").tasks.named("remapJar") dependsOn remap from(remap.flatMap { it.archiveFile }) } } tasks.named("build") { dependsOn tasks.named("collectRuntimeJars") }