96 lines
2.3 KiB
Groovy
96 lines
2.3 KiB
Groovy
plugins {
|
|
id "com.github.johnrengelman.shadow" version "5.0.0"
|
|
}
|
|
|
|
configurations {
|
|
shadowCommon // Don't use shadow from the shadow plugin because we don't want IDEA to index this.
|
|
}
|
|
|
|
architectury {
|
|
platformSetupLoomIde()
|
|
forge()
|
|
}
|
|
|
|
loom {
|
|
mixinConfigs = ["flan.mixins.json", "flan.forge.mixins.json"]
|
|
useFabricMixin = true
|
|
}
|
|
|
|
dependencies {
|
|
forge "net.minecraftforge:forge:${rootProject.minecraft_version}-${rootProject.forge_version}"
|
|
|
|
implementation(project(path: ":common")) {
|
|
transitive = false
|
|
}
|
|
developmentForge(project(path: ":common")) {
|
|
transitive = false
|
|
}
|
|
shadowCommon(project(path: ":common", configuration: "transformProductionForge")) {
|
|
transitive = false
|
|
}
|
|
}
|
|
|
|
processResources {
|
|
inputs.property "version", project.version
|
|
|
|
filesMatching("META-INF/mods.toml") {
|
|
expand "version": project.version
|
|
}
|
|
}
|
|
|
|
shadowJar {
|
|
exclude "fabric.mod.json"
|
|
|
|
configurations = [project.configurations.shadowCommon]
|
|
classifier "dev-shadow"
|
|
}
|
|
|
|
remapJar {
|
|
input.set shadowJar.archiveFile
|
|
dependsOn shadowJar
|
|
classifier "forge"
|
|
}
|
|
|
|
jar {
|
|
classifier "dev"
|
|
}
|
|
|
|
java {
|
|
withSourcesJar()
|
|
}
|
|
|
|
sourcesJar {
|
|
def commonSources = project(":common").sourcesJar
|
|
dependsOn commonSources
|
|
from commonSources.archiveFile.map { zipTree(it) }
|
|
classifier "forge-sources"
|
|
}
|
|
|
|
publishing {
|
|
publications {
|
|
mavenJava(MavenPublication) {
|
|
// add all the jars that should be included when publishing to maven
|
|
artifact(remapJar) {
|
|
builtBy remapJar
|
|
}
|
|
artifact(sourcesJar) {
|
|
builtBy remapSourcesJar
|
|
}
|
|
artifactId project.archives_base_name
|
|
version project.version
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
maven {
|
|
url "https://gitlab.com/api/v4/projects/21830712/packages/maven"
|
|
//url "https://maven.pkg.github.com/flemmli97/<>"
|
|
credentials {
|
|
username = project.findProperty("gpr.user") ?: System.getenv("GPR_USER")
|
|
password = project.findProperty("gpr.gitlab.token") ?: System.getenv("GPR_GITLAB_TOKEN")
|
|
//password = project.findProperty("gpr.github.token") ?: System.getenv("GPR_TOKEN")
|
|
}
|
|
}
|
|
}
|
|
}
|