JsonEM/forge/build.gradle
2025-05-27 16:14:14 +08:00

55 lines
1.2 KiB
Groovy

plugins {
id 'com.github.johnrengelman.shadow'
}
architectury {
platformSetupLoomIde()
forge()
}
loom {
forge {
mixinConfig "${mod_id}.mixins.json"
}
}
configurations {
common {
canBeResolved = true
canBeConsumed = false
}
shadowCommon
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:$rootProject.forge_version"
modImplementation "dev.architectury:architectury-forge:$rootProject.architectury_api_version"
common(project(path: ':common', configuration: 'namedElements')) { transitive false }
shadowBundle project(path: ':common', configuration: 'transformProductionNeoForge')
}
shadowJar {
configurations = [project.configurations.shadowBundle]
archiveClassifier = 'dev-shadow'
}
remapJar {
input.set shadowJar.archiveFile
dependsOn shadowJar
archiveClassifier = null
}