mirror of
https://github.com/barkeser2002/Not-Enough-Crashes.git
synced 2026-09-25 02:20:04 +03:00
119 lines
3.0 KiB
Groovy
119 lines
3.0 KiB
Groovy
import com.modrinth.minotaur.TaskModrinthUpload
|
|
import org.gradle.api.tasks.Copy
|
|
|
|
plugins {
|
|
id "com.github.johnrengelman.shadow" version "5.2.0"
|
|
}
|
|
|
|
configurations {
|
|
shadowCommon
|
|
}
|
|
|
|
architectury {
|
|
platformSetupLoomIde()
|
|
fabric()
|
|
}
|
|
|
|
repositories {
|
|
maven {
|
|
name = "Quilt"
|
|
url = "https://maven.quiltmc.org/repository/release/"
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
modImplementation("net.fabricmc:fabric-loader:${rootProject.loader_version}")
|
|
compileOnly("org.quiltmc:quilt-loader:0.13.2")
|
|
modRuntimeOnly "net.fabricmc.fabric-api:fabric-api:0.45.2+1.18"
|
|
|
|
// Remove the next line if you don't want to depend on the API
|
|
// modCompile("me.shedaniel:architectury:${rootProject.architectury_version}:fabric")
|
|
|
|
implementation(project(path: ":common", configuration: "dev")) {
|
|
transitive = false
|
|
}
|
|
developmentFabric(project(path: ":common", configuration: "dev")) {
|
|
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 {
|
|
configurations = [project.configurations.shadowCommon]
|
|
classifier "dev-shadow"
|
|
}
|
|
|
|
remapJar {
|
|
input.set shadowJar.archiveFile
|
|
dependsOn shadowJar
|
|
classifier "fabric"
|
|
}
|
|
|
|
// 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'
|
|
addGameVersion "Fabric"
|
|
addGameVersion curseforge_mc_version
|
|
changelogType = "markdown"
|
|
changelog = rootProject.file("changelog.md")
|
|
|
|
mainArtifact(remapJar) {
|
|
displayName = "$mod_name $total_version Fabric"
|
|
}
|
|
}
|
|
|
|
options {
|
|
forgeGradleIntegration = false
|
|
}
|
|
}
|
|
|
|
task publishModrinth (type: TaskModrinthUpload){
|
|
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
|
|
addGameVersion(curseforge_mc_version)
|
|
addLoader('fabric')
|
|
changelog = rootProject.file("changelog.md").text
|
|
versionType = "RELEASE"
|
|
|
|
}
|
|
|
|
task publishFabric {
|
|
group = "publishing"
|
|
afterEvaluate {
|
|
dependsOn(curseforge353890)
|
|
dependsOn(publishModrinth)
|
|
}
|
|
} |