Publish to CF

This commit is contained in:
shedaniel
2020-11-15 20:32:36 +08:00
parent 0183b7f937
commit 6362fe40e3
7 changed files with 102 additions and 7 deletions

View File

@@ -12,6 +12,7 @@ buildscript {
plugins {
id "com.github.johnrengelman.shadow" version "5.0.0"
id "eclipse"
id "com.matthewprenger.cursegradle"
}
apply plugin: "net.minecraftforge.gradle"
@@ -73,10 +74,38 @@ reobf {
publishing {
publications {
mavenForge(MavenPublication) {
artifact(file("${project.buildDir}/libs/${project.archivesBaseName}-${project.version}-forge.jar")) {
artifact(shadowJar.archivePath) {
builtBy shadowJar
classifier "forge"
}
}
}
}
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 = "419699"
releaseType = "release"
changelogType = "html"
changelog = rootProject.releaseChangelog
addGameVersion "1.16.4"
addGameVersion "Java 8"
addGameVersion "Forge"
relations {
requiredDependency "fabric-api"
}
mainArtifact(shadowJar.archivePath.toFile()) {
displayName = "[Forge $rootProject.supported_version] v$project.version"
}
afterEvaluate {
uploadTask.dependsOn("build")
}
}
}
options {
forgeGradleIntegration = false
javaVersionAutoDetect = false
}
}

View File

@@ -1,5 +1,5 @@
modLoader = "javafml"
loaderVersion = "[32,)"
loaderVersion = "[33,)"
issueTrackerURL = "https://github.com/shedaniel/architectury/issues"
license = "Apache-2.0"