mirror of
https://github.com/architectury/architectury-api.git
synced 2026-03-28 03:56:59 -05:00
115 lines
3.0 KiB
Groovy
115 lines
3.0 KiB
Groovy
plugins {
|
|
id "com.github.johnrengelman.shadow" version "5.0.0"
|
|
id "com.matthewprenger.cursegradle"
|
|
}
|
|
|
|
loom {
|
|
mixinConfigs = ["architectury.mixins.json", "architectury-common.mixins.json"]
|
|
}
|
|
|
|
configurations {
|
|
shadowCommon
|
|
dev
|
|
}
|
|
|
|
artifacts {
|
|
dev(jar)
|
|
}
|
|
|
|
architectury {
|
|
platformSetupLoomIde()
|
|
forge()
|
|
}
|
|
|
|
dependencies {
|
|
minecraft "com.mojang:minecraft:${rootProject.architectury.minecraft}"
|
|
mappings loom.officialMojangMappings()
|
|
forge "net.minecraftforge:forge:${rootProject.architectury.minecraft}-${rootProject.forge_version}"
|
|
implementation "net.jodah:typetools:0.6.2"
|
|
shadowCommon "net.jodah:typetools:0.6.2"
|
|
|
|
implementation(project(path: ":common")) {
|
|
transitive = false
|
|
}
|
|
developmentForge(project(path: ":common")) {
|
|
transitive = false
|
|
}
|
|
shadowCommon(project(path: ":common", configuration: "transformProductionForge")) {
|
|
transitive = false
|
|
}
|
|
}
|
|
|
|
processResources {
|
|
filesMatching("META-INF/mods.toml") {
|
|
expand "version": project.version
|
|
}
|
|
inputs.property "META-INF/mods.toml", project.version
|
|
}
|
|
|
|
shadowJar {
|
|
relocate "net.jodah.typetools", "me.shedaniel.architectury.shadowed.impl.net.jodah.typetools"
|
|
exclude "fabric.mod.json"
|
|
exclude "architectury-common.accessWidener"
|
|
|
|
configurations = [project.configurations.shadowCommon]
|
|
classifier "shadow"
|
|
}
|
|
|
|
remapJar {
|
|
dependsOn(shadowJar)
|
|
input.set(shadowJar.archivePath)
|
|
archiveClassifier = "forge"
|
|
}
|
|
|
|
publishing {
|
|
publications {
|
|
mavenForge(MavenPublication) {
|
|
artifactId = rootProject.archivesBaseName + "-forge"
|
|
artifact(remapJar.archivePath) {
|
|
builtBy build
|
|
classifier null
|
|
}
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
if (System.getenv("MAVEN_PASS") != null) {
|
|
maven {
|
|
url = "https://deploy.shedaniel.me/"
|
|
credentials {
|
|
username = "shedaniel"
|
|
password = System.getenv("MAVEN_PASS")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
curseforge {
|
|
if (project.hasProperty("curse_api_key") || System.getenv("curse_api_key") != null) {
|
|
apiKey = project.hasProperty("curse_api_key") ? project.property("curse_api_key") : System.getenv("curse_api_key")
|
|
project {
|
|
id = "419699"
|
|
releaseType = "release"
|
|
changelogType = "html"
|
|
changelog = releaseChangelog()
|
|
addGameVersion "1.16.4"
|
|
addGameVersion "1.16.5"
|
|
addGameVersion "Java 8"
|
|
addGameVersion "Forge"
|
|
mainArtifact(remapJar.archivePath) {
|
|
displayName = "[Forge $rootProject.supported_version] v$project.version"
|
|
}
|
|
afterEvaluate {
|
|
uploadTask.dependsOn("build")
|
|
}
|
|
}
|
|
}
|
|
options {
|
|
forgeGradleIntegration = false
|
|
javaVersionAutoDetect = false
|
|
}
|
|
}
|
|
|
|
rootProject.tasks.getByName("curseforgePublish").dependsOn tasks.getByName("curseforge")
|