-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Conflicts: # buildSrc/build.gradle.kts # platform/fabric/gradle.properties # platform/forge/gradle.properties # src/main/java/lol/bai/badpackets/impl/mixin/client/MixinClientPacketListener.java
- Loading branch information
Showing
8 changed files
with
57 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,45 @@ | ||
import com.matthewprenger.cursegradle.CurseArtifact | ||
import com.matthewprenger.cursegradle.CurseExtension | ||
import com.matthewprenger.cursegradle.CurseProject | ||
import com.matthewprenger.cursegradle.CurseRelation | ||
import net.darkhax.curseforgegradle.Constants | ||
import net.darkhax.curseforgegradle.TaskPublishCurseForge | ||
import org.gradle.jvm.tasks.Jar | ||
import org.gradle.kotlin.dsl.apply | ||
import org.gradle.kotlin.dsl.closureOf | ||
import org.gradle.kotlin.dsl.configure | ||
import org.gradle.kotlin.dsl.create | ||
|
||
fun <T : Jar> UploadConfig.curseforge(task: T) = project.run { | ||
apply(plugin = "com.matthewprenger.cursegradle") | ||
apply(plugin = "net.darkhax.curseforgegradle") | ||
|
||
env["CURSEFORGE_API"]?.let { CURSEFORGE_API -> | ||
configure<CurseExtension> { | ||
apiKey = CURSEFORGE_API | ||
project(closureOf<CurseProject> { | ||
id = rootProp["cf.projectId"] | ||
releaseType = prop["cf.releaseType"] | ||
tasks.create<TaskPublishCurseForge>("curseforge") { | ||
group = "publishing" | ||
dependsOn("build") | ||
|
||
changelogType = "markdown" | ||
changelog = "https://github.com/badasintended/badpackets/releases/tag/${project.version}" | ||
disableVersionDetection() | ||
|
||
prop["cf.loader"].split(", ").forEach(this::addGameVersion) | ||
prop["cf.gameVersion"].split(", ").forEach(this::addGameVersion) | ||
apiToken = env["CURSEFORGE_API"] | ||
apiEndpoint = "https://${prop["cf.endpoint"]}" | ||
|
||
mainArtifact(task, closureOf<CurseArtifact> { | ||
displayName = "[${prop["cf.loader"].replace(", ", "/")}] ${project.version}" | ||
}) | ||
upload(prop["cf.projectId"], task).apply { | ||
displayName = "[${project.name.capitalize()} ${rootProp["minecraft"]}] ${project.version}" | ||
releaseType = prop["cf.releaseType"] | ||
|
||
if(listOf("cf.require", "cf.optional", "cf.break").any { prop.has(it) }) relations(closureOf<CurseRelation> { | ||
prop.ifPresent("cf.require") { | ||
it.split(", ").forEach(this::requiredDependency) | ||
} | ||
prop.ifPresent("cf.optional") { | ||
it.split(", ").forEach(this::optionalDependency) | ||
} | ||
prop.ifPresent("cf.break") { | ||
it.split(", ").forEach(this::incompatible) | ||
} | ||
}) | ||
changelogType = "markdown" | ||
changelog = env["CHANGELOG"] | ||
|
||
prop["cf.gameVersion"].split(", ").forEach(this::addGameVersion) | ||
|
||
afterEvaluate { | ||
uploadTask.dependsOn("build") | ||
prop["cf.loader"].split(", ").forEach { | ||
addModLoader(it) | ||
} | ||
|
||
fun relation(key: String, type: String) { | ||
prop.ifPresent("cf.${key}") { value -> | ||
value.split(", ").forEach { | ||
addRelation(it, type) | ||
} | ||
} | ||
}) | ||
} | ||
|
||
relation("require", Constants.RELATION_REQUIRED); | ||
relation("optional", Constants.RELATION_OPTIONAL); | ||
relation("break", Constants.RELATION_INCOMPATIBLE); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#Mon Sep 14 12:28:28 PDT 2015 | ||
distributionBase =GRADLE_USER_HOME | ||
distributionPath =wrapper/dists | ||
zipStoreBase =GRADLE_USER_HOME | ||
distributionBase = GRADLE_USER_HOME | ||
distributionPath = wrapper/dists | ||
zipStoreBase = GRADLE_USER_HOME | ||
zipStorePath = wrapper/dists | ||
distributionUrl = https\://services.gradle.org/distributions/gradle-7.3-bin.zip | ||
distributionUrl = https\://services.gradle.org/distributions/gradle-8.3-bin.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters