Files
2026-05-24 11:34:17 +03:00

116 lines
2.9 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 {
implementation libs.fabric.loader
compileOnly libs.quilt.loader
runtimeOnly libs.fabric.api
compileOnly libs.modmenu
runtimeOnly libs.modmenu
common(project(':common')) { transitive false }
shadowBundle project(path: ':common', configuration: 'runtimeElements')
}
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'
}
jar {
from(project(':common').sourceSets.main.output)
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
plugins.withId("com.matthewprenger.cursegradle") {
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(jar) {
displayName = "$mod_name $total_version Fabric"
}
}
options {
forgeGradleIntegration = false
}
}
}
plugins.withId("com.modrinth.minotaur") {
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 = jar
gameVersions = [modrinth_mc_version]
loaders = ["fabric", "quilt"]
changelog = rootProject.file("changelog.md").text
versionType = release_type
}
}
tasks.register('publishFabric') {
group = "publishing"
dependsOn("curseforge353890", "modrinth")
}