plugins { id("xyz.jpenilla.quiet-architectury-loom") } /* * Gets the version name from the latest Git tag */ // https://stackoverflow.com/questions/28498688/gradle-script-to-autoversion-and-include-the-commit-hash-in-android def getGitCommit = { -> def stdout = new ByteArrayOutputStream() exec { commandLine 'git', 'rev-parse', '--short', 'HEAD' standardOutput = stdout } return stdout.toString().trim() } dependencies { modImplementation "net.fabricmc:fabric-loader:${project.loader_version}" api("ca.spottedleaf:concurrentutil:${rootProject.concurrentutil_version}") api("org.yaml:snakeyaml:${rootProject.snakeyaml_version}") modImplementation "me.shedaniel.cloth:cloth-config:${rootProject.cloth_version}" } File awFile = file("src/main/resources/moonrise.accesswidener") allprojects { group = rootProject.maven_group version = rootProject.mod_version + "+" + getGitCommit() plugins.apply("xyz.jpenilla.quiet-architectury-loom") java { withSourcesJar() toolchain { languageVersion = JavaLanguageVersion.of(21) } } repositories { mavenLocal { mavenContent { includeModule("ca.spottedleaf", "concurrentutil") } } maven { url "https://maven.shedaniel.me/" } maven { url "https://maven.terraformersmc.com/releases/" } } dependencies { minecraft "com.mojang:minecraft:${project.minecraft_version}" mappings loom.officialMojangMappings() } // make build reproducible tasks.withType(AbstractArchiveTask).configureEach { preserveFileTimestamps = false reproducibleFileOrder = true } tasks.withType(JavaCompile).configureEach { it.options.release = 21 } tasks.jar.configure { from(rootProject.file("LICENSE")) { rename { "${it}_${rootProject.base.archivesName.get()}"} } } loom { accessWidenerPath = awFile mixin { useLegacyMixinAp = false } } } subprojects { loom.mods { main { sourceSet("main") sourceSet("main", project.rootProject) } } loom.runs.all { ideConfigGenerated true } } loom.runs.all { ideConfigGenerated false }