Files
2025-01-21 16:10:02 +02:00

114 lines
2.7 KiB
Groovy

plugins {
alias libs.plugins.shadow
}
architectury {
platformSetupLoomIde()
fabric()
}
configurations {
common {
canBeResolved = true
canBeConsumed = false
}
compileClasspath.extendsFrom common
runtimeClasspath.extendsFrom common
developmentFabric.extendsFrom common
// Files in this configuration will be bundled into your mod using the Shadow plugin.
// Don't use the `shadow` configuration from the plugin itself as it's meant for excluding files.
shadowBundle {
canBeResolved = true
canBeConsumed = false
}
}
repositories {
maven {
name = "Quilt"
url = "https://maven.quiltmc.org/repository/release/"
}
maven {
name = "modmenu"
url = "https://maven.terraformersmc.com"
}
maven { url = "https://api.modrinth.com/maven" }
}
dependencies {
modImplementation libs.fabric.loader
compileOnly libs.quilt.loader
modRuntimeOnly libs.fabric.api
modCompileOnly libs.modmenu
modRuntimeOnly libs.modmenu
common(project(path: ':common', configuration: 'namedElements')) { transitive false }
shadowBundle project(path: ':common', configuration: 'transformProductionFabric')
}
processResources {
inputs.property 'version', project.version
filesMatching('fabric.mod.json') {
expand version: project.version
}
filesMatching("quilt.mod.json") {
expand "version": project.version
}
}
shadowJar {
configurations = [project.configurations.shadowBundle]
archiveClassifier = 'dev-shadow'
}
remapJar {
inputFile.set shadowJar.archiveFile
}
curseforge {
apiKey = project.hasProperty("curseforge_api_key") ? project.curseforge_api_key : ""
project {
id = "353890"
releaseType = release_type
addGameVersion "Fabric"
addGameVersion curseforge_mc_version
changelogType = "markdown"
changelog = rootProject.file("changelog.md")
mainArtifact(remapJar) {
displayName = "$mod_name $total_version Fabric"
}
}
options {
forgeGradleIntegration = false
}
}
modrinth {
group = "upload"
token = project.hasProperty("modrinth_api_key") ? project.modrinth_api_key : ""
projectId = 'yM94ont6'
versionNumber = total_version + "-fabric" // Will fail if Modrinth has this version already
versionName = "$mod_name $total_version Fabric"
uploadFile = remapJar
gameVersions = [modrinth_mc_version]
loaders = ["fabric", "quilt"]
changelog = rootProject.file("changelog.md").text
versionType = release_type
}
task publishFabric {
group = "publishing"
afterEvaluate {
dependsOn(curseforge353890)
dependsOn(tasks.modrinth)
}
}