mirror of
https://github.com/barkeser2002/Not-Enough-Crashes.git
synced 2026-09-25 04:40:02 +03:00
137 lines
3.5 KiB
Groovy
137 lines
3.5 KiB
Groovy
import com.modrinth.minotaur.TaskModrinthUpload
|
|
import org.gradle.api.tasks.Copy
|
|
|
|
plugins {
|
|
alias libs.plugins.shadow
|
|
}
|
|
|
|
configurations {
|
|
common
|
|
shadowCommon // Don't use shadow from the shadow plugin since it *excludes* files.
|
|
compileClasspath.extendsFrom common
|
|
runtimeClasspath.extendsFrom common
|
|
developmentFabric.extendsFrom common
|
|
}
|
|
|
|
architectury {
|
|
platformSetupLoomIde()
|
|
fabric()
|
|
}
|
|
|
|
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
|
|
|
|
// For config modmenu integration.
|
|
modCompileOnly("com.terraformersmc:modmenu:6.2.2")
|
|
modCompileOnly "maven.modrinth:iris:1.6.1+1.19.2"
|
|
modRuntimeOnly("com.terraformersmc:modmenu:7.1.0")
|
|
|
|
// Uncomment to add the test mod at runtime
|
|
// runtimeOnly project(path: ":TestFabricMod", configuration: "namedElements")
|
|
|
|
common(project(path: ":common", configuration: "namedElements")) { transitive false }
|
|
shadowCommon(project(path: ":common", configuration: "transformProductionFabric")) { transitive false }
|
|
}
|
|
|
|
|
|
processResources {
|
|
inputs.property "version", project.version
|
|
|
|
filesMatching("fabric.mod.json") {
|
|
expand "version": project.version
|
|
}
|
|
|
|
filesMatching("quilt.mod.json") {
|
|
expand "version": project.version
|
|
}
|
|
}
|
|
|
|
shadowJar {
|
|
exclude "architectury.common.json"
|
|
configurations = [project.configurations.shadowCommon]
|
|
archiveClassifier.set "dev-shadow"
|
|
}
|
|
|
|
remapJar {
|
|
// injectAccessWidener = true
|
|
input.set shadowJar.archiveFile
|
|
dependsOn shadowJar
|
|
archiveClassifier.set "fabric"
|
|
}
|
|
jar {
|
|
archiveClassifier.set "dev"
|
|
}
|
|
|
|
components.java {
|
|
withVariantsFromConfiguration(project.configurations.shadowRuntimeElements) {
|
|
skip()
|
|
}
|
|
}
|
|
|
|
// Asset files will otherwise be missing when debugging
|
|
//task copyAssetFilesForDebugging(type: Copy) {
|
|
// def inAssets = rootProject.file("common/src/main/resources/assets/notenoughcrashes")
|
|
// def outAssets = new File("${project.buildDir}/resources/main/assets/notenoughcrashes")
|
|
// from inAssets
|
|
// into outAssets
|
|
// dependsOn rootProject.processResources
|
|
//}
|
|
//
|
|
//classes.dependsOn(copyAssetFilesForDebugging)
|
|
|
|
|
|
curseforge {
|
|
apiKey = project.hasProperty("curseforge_api_key") ? project.curseforge_api_key : ""
|
|
project {
|
|
id = curseforge_id
|
|
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)
|
|
}
|
|
}
|
|
|