mirror of
https://github.com/architectury/architectury-api.git
synced 2026-03-28 03:56:59 -05:00
100 lines
2.6 KiB
Groovy
100 lines
2.6 KiB
Groovy
plugins {
|
|
id "com.github.johnrengelman.shadow" version "5.0.0"
|
|
id "com.matthewprenger.cursegradle"
|
|
}
|
|
|
|
loom {
|
|
mixinConfig = "architectury.mixins.json"
|
|
}
|
|
|
|
configurations {
|
|
shadow
|
|
dev
|
|
}
|
|
|
|
artifacts {
|
|
dev(jar)
|
|
}
|
|
|
|
architectury {
|
|
platformSetupLoomIde()
|
|
}
|
|
|
|
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"
|
|
shadow "net.jodah:typetools:0.6.2"
|
|
|
|
compileOnly(project(path: ":common")) {
|
|
transitive = false
|
|
}
|
|
runtimeOnly(project(path: ":common", configuration: "transformDevelopmentForge")) {
|
|
transitive = false
|
|
}
|
|
shadow(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.shadow]
|
|
classifier "shadow"
|
|
}
|
|
|
|
remapJar {
|
|
dependsOn(shadowJar)
|
|
input.set(shadowJar.archivePath)
|
|
archiveClassifier = "forge"
|
|
}
|
|
|
|
publishing {
|
|
publications {
|
|
mavenForge(MavenPublication) {
|
|
artifact(remapJar.archivePath) {
|
|
builtBy build
|
|
classifier "forge"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
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") |