plugins { id "com.github.johnrengelman.shadow" version "8.1.1" } architectury { platformSetupLoomIde() neoForge() } repositories{ maven { name = 'NeoForged' url = 'https://maven.neoforged.net/releases' } maven { url "https://maven.shedaniel.me/" } maven { name "CreeperHost" url "https://maven.creeperhost.net" } } configurations { common shadowCommon // Don't use shadow from the shadow plugin because we don't want IDEA to index this. compileClasspath.extendsFrom common runtimeClasspath.extendsFrom common developmentNeoForge.extendsFrom common } dependencies { neoForge "net.neoforged:neoforge:$rootProject.neoforge_version" // Remove the next line if you don't want to depend on the API modImplementation "dev.architectury:architectury-neoforge:$rootProject.architectury_version" modImplementation "me.shedaniel.cloth:cloth-config-neoforge:$rootProject.cloth_config_version" common(project(path: ":common", configuration: "namedElements")) { transitive false } shadowCommon(project(path: ":common", configuration: "transformProductionNeoForge")) { transitive = false } forgeRuntimeLibrary "org.json:json:${json_version}" include("org.json:json:${json_version}") shadowCommon("org.json:json:${json_version}") } processResources { inputs.property "version", project.version filesMatching("META-INF/neoforge.mods.toml") { expand "version": project.version } } shadowJar { exclude "fabric.mod.json" configurations = [project.configurations.shadowCommon] archiveClassifier.set("dev-shadow") relocate 'org.json', 'speedometer.shaded.org.json' } remapJar { inputFile.set shadowJar.archiveFile dependsOn shadowJar archiveClassifier.set(null) } jar { archiveClassifier.set("dev") } sourcesJar { def commonSources = project(":common").sourcesJar dependsOn commonSources from commonSources.archiveFile.map { zipTree(it) } } components.java { withVariantsFromConfiguration(project.configurations.shadowRuntimeElements) { skip() } } publishing { publications { mavenForge(MavenPublication) { artifactId = rootProject.archives_base_name + "-" + project.name from components.java } } // See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing. repositories { // Add repositories to publish to here. } }