1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- plugins {
- id "com.github.johnrengelman.shadow" version "5.0.0"
- id "com.matthewprenger.cursegradle"
- }
- loom {
- silentMojangMappingsLicense()
- mixinConfig = "architectury.mixins.json"
- }
- configurations {
- shadow
- }
- architectury {
- platformSetupLoomIde()
- }
- dependencies {
- minecraft("com.mojang:minecraft:${rootProject.architect.minecraft}")
- mappings(minecraft.officialMojangMappings())
- forge("net.minecraftforge:forge:${rootProject.architect.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: "transformForgeFakeMod")) {
- transitive = false
- }
- shadow(project(path: ":common", configuration: "transformForge")) {
- 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 "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")
|