mirror of
https://github.com/architectury/architectury-api.git
synced 2026-03-28 03:56:59 -05:00
118 lines
3.2 KiB
Groovy
118 lines
3.2 KiB
Groovy
plugins {
|
|
id "com.github.johnrengelman.shadow" version "5.0.0"
|
|
id "com.matthewprenger.cursegradle"
|
|
}
|
|
|
|
loom {
|
|
accessWidener = file("src/main/resources/architectury.accessWidener")
|
|
}
|
|
|
|
configurations {
|
|
shadowCommon
|
|
dev
|
|
}
|
|
|
|
artifacts {
|
|
dev(jar)
|
|
}
|
|
|
|
architectury {
|
|
platformSetupLoomIde()
|
|
fabric()
|
|
}
|
|
|
|
dependencies {
|
|
minecraft "com.mojang:minecraft:${rootProject.architectury.minecraft}"
|
|
mappings minecraft.officialMojangMappings()
|
|
modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}"
|
|
modImplementation "net.fabricmc.fabric-api:fabric-api:${rootProject.fabric_api_version}"
|
|
modCompileOnly "io.github.prospector:modmenu:${rootProject.mod_menu_version}"
|
|
implementation "net.jodah:typetools:0.6.2"
|
|
shadowCommon "net.jodah:typetools:0.6.2"
|
|
|
|
implementation(project(path: ":common")) {
|
|
transitive = false
|
|
}
|
|
developmentFabric(project(path: ":common")) {
|
|
transitive = false
|
|
}
|
|
shadowCommon(project(path: ":common", configuration: "transformProductionFabric")) {
|
|
transitive = false
|
|
}
|
|
}
|
|
|
|
processResources {
|
|
filesMatching("fabric.mod.json") {
|
|
expand "version": project.version
|
|
}
|
|
inputs.property "version", project.version
|
|
}
|
|
|
|
shadowJar {
|
|
relocate "net.jodah.typetools", "me.shedaniel.architectury.shadowed.impl.net.jodah.typetools"
|
|
configurations = [project.configurations.shadowCommon]
|
|
classifier "shadow"
|
|
}
|
|
|
|
remapJar {
|
|
dependsOn(shadowJar)
|
|
input.set(shadowJar.archiveFile)
|
|
archiveClassifier = "fabric"
|
|
}
|
|
|
|
publishing {
|
|
publications {
|
|
mavenFabric(MavenPublication) {
|
|
artifactId = rootProject.archivesBaseName + "-fabric"
|
|
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 = "419697"
|
|
releaseType = "release"
|
|
changelogType = "html"
|
|
changelog = releaseChangelog()
|
|
addGameVersion "1.16-Snapshot"
|
|
addGameVersion "1.16.4"
|
|
addGameVersion "1.16.5"
|
|
addGameVersion "Java 8"
|
|
addGameVersion "Fabric"
|
|
relations {
|
|
requiredDependency "fabric-api"
|
|
}
|
|
mainArtifact(remapJar.archivePath) {
|
|
displayName = "[Fabric $rootProject.supported_version] v$project.version"
|
|
}
|
|
afterEvaluate {
|
|
uploadTask.dependsOn("build")
|
|
}
|
|
}
|
|
}
|
|
options {
|
|
forgeGradleIntegration = false
|
|
javaVersionAutoDetect = false
|
|
}
|
|
}
|
|
|
|
rootProject.tasks.getByName("curseforgePublish").dependsOn tasks.getByName("curseforge")
|