72 lines
1.7 KiB
Groovy
72 lines
1.7 KiB
Groovy
plugins {
|
|
id 'com.gradleup.shadow'
|
|
}
|
|
|
|
architectury {
|
|
platformSetupLoomIde()
|
|
neoForge()
|
|
}
|
|
|
|
configurations {
|
|
common {
|
|
canBeResolved = true
|
|
canBeConsumed = false
|
|
}
|
|
compileClasspath.extendsFrom common
|
|
runtimeClasspath.extendsFrom common
|
|
developmentNeoForge.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.
|
|
shadowCommon {
|
|
canBeResolved = true
|
|
canBeConsumed = false
|
|
}
|
|
|
|
apiElements {
|
|
outgoing.artifacts.clear()
|
|
outgoing.artifact(shadowJar)
|
|
}
|
|
runtimeElements {
|
|
outgoing.artifacts.clear()
|
|
outgoing.artifact(shadowJar)
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
maven {
|
|
name = 'NeoForged'
|
|
url = 'https://maven.neoforged.net/releases'
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
neoForge "net.neoforged:neoforge:$rootProject.neoforge_version"
|
|
|
|
// Architectury API. This is optional, and you can comment it out if you don't need it.
|
|
api "dev.architectury:architectury-neoforge:$rootProject.architectury_api_version"
|
|
|
|
common(project(path: ':common')) { transitive = false }
|
|
shadowCommon project(path: ':common', configuration: 'transformProductionNeoForge')
|
|
}
|
|
|
|
processResources {
|
|
inputs.property 'version', project.version
|
|
|
|
filesMatching('META-INF/neoforge.mods.toml') {
|
|
expand version: inputs.properties.version
|
|
}
|
|
}
|
|
|
|
jar {
|
|
archiveClassifier = "raw"
|
|
}
|
|
|
|
shadowJar {
|
|
dependsOn(jar)
|
|
from(zipTree(jar.archiveFile))
|
|
configurations = [project.configurations.shadowCommon]
|
|
archiveClassifier = null
|
|
from rootProject.file("LICENSE.md")
|
|
}
|