plugins { id "com.github.johnrengelman.shadow" version "7.1.2" } architectury { platformSetupLoomIde() forge() } repositories{ maven { url "https://maven.shedaniel.me/" } } 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 developmentForge.extendsFrom common*/ common { canBeResolved = true canBeConsumed = false } compileClasspath.extendsFrom common runtimeClasspath.extendsFrom common developmentForge.extendsFrom common // Files in this configuration will be bundled into your mod using the Shadow plugin. // Don't use the `shadow` configuration from the plugin itself as it's meant for excluding files. shadowBundle { canBeResolved = true canBeConsumed = false } } dependencies { forge "net.minecraftforge:forge:${minecraft_version}-${forge_version}" // Remove the next line if you don't want to depend on the API modApi "dev.architectury:architectury-forge:${architectury_version}" modApi "me.shedaniel.cloth:cloth-config-forge:${cloth_config_version}" common(project(path: ':common', configuration: 'namedElements')) { transitive false } shadowBundle project(path: ':common', configuration: 'transformProductionNeoForge') //implementation 'org.json:json:20230227' //include 'org.json:json:20230227' //forgeRuntimeLibrary 'org.json:json:20230227' } processResources { inputs.property "version", project.version filesMatching("META-INF/mods.toml") { expand "version": project.version } } shadowJar { exclude "fabric.mod.json" configurations = [project.configurations.shadowBundle] archiveClassifier = 'dev-shadow' } remapJar { input.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. } }