2021-06-27 18:34:33 +02:00
|
|
|
import com.google.gson.Gson
|
2021-05-14 01:50:33 +02:00
|
|
|
import org.apache.commons.codec.Charsets
|
2021-04-05 15:47:34 +02:00
|
|
|
import org.apache.http.HttpEntity
|
2021-05-14 01:50:33 +02:00
|
|
|
import org.apache.http.HttpResponse
|
|
|
|
import org.apache.http.client.HttpClient
|
|
|
|
import org.apache.http.client.config.CookieSpecs
|
|
|
|
import org.apache.http.client.config.RequestConfig
|
2021-04-05 15:47:34 +02:00
|
|
|
import org.apache.http.client.methods.CloseableHttpResponse
|
2021-06-27 18:34:33 +02:00
|
|
|
import org.apache.http.client.methods.HttpGet
|
2021-04-05 15:47:34 +02:00
|
|
|
import org.apache.http.client.methods.HttpPost
|
|
|
|
import org.apache.http.entity.ContentType
|
|
|
|
import org.apache.http.entity.mime.MultipartEntityBuilder
|
|
|
|
import org.apache.http.impl.client.CloseableHttpClient
|
2021-05-14 01:50:33 +02:00
|
|
|
import org.apache.http.impl.client.HttpClientBuilder
|
2021-04-05 15:47:34 +02:00
|
|
|
import org.apache.http.impl.client.HttpClients
|
2021-05-18 04:39:06 +02:00
|
|
|
|
2021-06-27 18:34:33 +02:00
|
|
|
import java.util.regex.Matcher
|
|
|
|
import java.util.regex.Pattern
|
2021-04-05 15:47:34 +02:00
|
|
|
|
|
|
|
buildscript {
|
|
|
|
repositories {
|
2021-06-27 18:34:33 +02:00
|
|
|
maven { url "https://plugins.gradle.org/m2/" }
|
2021-04-05 15:47:34 +02:00
|
|
|
mavenCentral()
|
|
|
|
mavenLocal()
|
2021-05-18 04:39:06 +02:00
|
|
|
jcenter()
|
2021-04-05 15:47:34 +02:00
|
|
|
}
|
|
|
|
dependencies {
|
|
|
|
classpath "org.apache.httpcomponents:httpmime:4.5.13"
|
2021-06-27 19:55:51 +02:00
|
|
|
classpath "com.google.code.gson:gson:2.8.7"
|
2021-05-18 04:39:06 +02:00
|
|
|
classpath "org.apache.httpcomponents:httpclient:4.5.13"
|
2021-04-05 15:47:34 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-06-27 18:34:33 +02:00
|
|
|
plugins {
|
|
|
|
id 'net.researchgate.release' version '2.8.1'
|
|
|
|
}
|
|
|
|
|
|
|
|
apply plugin: 'java'
|
|
|
|
apply plugin: 'idea'
|
|
|
|
|
2021-04-05 15:47:34 +02:00
|
|
|
def branch = System.getenv("GITHUB_REF");
|
2021-06-27 18:34:33 +02:00
|
|
|
if (branch != null) {
|
|
|
|
branch = branch.replace('refs/heads/', '')
|
|
|
|
}
|
|
|
|
def isCanary = version.toString().contains('canary')
|
2021-04-05 15:47:34 +02:00
|
|
|
|
2021-04-05 16:07:56 +02:00
|
|
|
group = 'com.sekwah.advancedportals'
|
|
|
|
|
2018-07-23 02:43:29 +02:00
|
|
|
description = ""
|
|
|
|
|
|
|
|
sourceCompatibility = 1.8
|
|
|
|
targetCompatibility = 1.8
|
|
|
|
|
|
|
|
tasks.withType(JavaCompile) {
|
|
|
|
options.encoding = 'UTF-8'
|
|
|
|
}
|
|
|
|
|
2019-05-31 05:04:33 +02:00
|
|
|
String getPluginData(String tag) {
|
2019-08-12 10:40:06 +02:00
|
|
|
File file = file("src/main/resources/plugin.yml")
|
2019-05-31 05:04:33 +02:00
|
|
|
String version = "notfound"
|
2021-06-27 18:34:33 +02:00
|
|
|
file.readLines("UTF-8").each { String line ->
|
2019-05-31 05:04:33 +02:00
|
|
|
line = line.trim()
|
2021-06-27 18:34:33 +02:00
|
|
|
if (line.startsWith(tag)) {
|
2019-05-31 05:04:33 +02:00
|
|
|
version = line.substring(tag.length() + 2, line.length())
|
|
|
|
}
|
|
|
|
}
|
2019-06-02 05:39:08 +02:00
|
|
|
println "Advanced Portals v" + version
|
2019-05-31 05:04:33 +02:00
|
|
|
return version
|
|
|
|
}
|
|
|
|
|
2018-07-23 02:43:29 +02:00
|
|
|
configurations {
|
|
|
|
// configuration that holds jars to copy into lib
|
|
|
|
includeLibs
|
|
|
|
}
|
|
|
|
|
|
|
|
repositories {
|
2020-01-20 11:55:18 +01:00
|
|
|
maven { url "https://repo.maven.apache.org/maven2" }
|
2018-07-23 02:43:29 +02:00
|
|
|
maven { url "https://hub.spigotmc.org/nexus/content/repositories/snapshots/" }
|
2020-01-20 11:55:18 +01:00
|
|
|
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
|
2020-12-30 03:49:45 +01:00
|
|
|
maven { url "https://nexus.velocitypowered.com/repository/maven-public/" }
|
2021-05-09 04:45:31 +02:00
|
|
|
maven { url 'https://papermc.io/repo/repository/maven-public/' }
|
2018-07-23 02:43:29 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// includeLibs just says to include the library in the final jar
|
|
|
|
dependencies {
|
2021-05-14 01:50:33 +02:00
|
|
|
|
2020-06-26 01:42:39 +02:00
|
|
|
//implementation "org.bukkit:bukkit:1.16.1-R0.1-SNAPSHOT"
|
|
|
|
implementation "org.spigotmc:spigot-api:1.16.1-R0.1-SNAPSHOT"
|
2021-06-27 22:08:06 +02:00
|
|
|
implementation "net.md-5:bungeecord-api:1.16-R0.4"
|
2020-01-20 11:55:18 +01:00
|
|
|
|
2021-07-06 09:56:46 +02:00
|
|
|
implementation "com.velocitypowered:velocity-api:1.1.9"
|
2020-12-30 03:49:45 +01:00
|
|
|
annotationProcessor "com.velocitypowered:velocity-api:1.1.0-SNAPSHOT"
|
|
|
|
|
2019-12-30 16:18:14 +01:00
|
|
|
implementation "io.netty:netty-all:4.0.4.Final"
|
2021-05-09 04:45:31 +02:00
|
|
|
compileOnly 'com.destroystokyo.paper:paper-api:1.16.5-R0.1-SNAPSHOT'
|
2020-06-21 03:49:18 +02:00
|
|
|
|
|
|
|
//compile fileTree(dir: 'libs', include: ['*.jar'])
|
2018-07-23 02:43:29 +02:00
|
|
|
}
|
|
|
|
|
2021-04-05 15:47:34 +02:00
|
|
|
/** For pre-releases and testers to be able to try the latest commits if they want.
|
|
|
|
* If the builds start exceeding 8MB then we may want to upload to s3 instead and periodically clear.
|
|
|
|
* TODO possibly add a task that announces when builds are made?
|
|
|
|
* Though add a note that it may take a while for Curse to approve the files.
|
|
|
|
*/
|
|
|
|
task discordupload {
|
|
|
|
dependsOn(jar)
|
|
|
|
doLast {
|
|
|
|
String discordWebhook = System.getenv("DISCORD_WEBHOOK")
|
|
|
|
|
2021-06-27 18:34:33 +02:00
|
|
|
if (discordWebhook != null) {
|
2021-04-05 15:47:34 +02:00
|
|
|
println("Logging Into Discord")
|
|
|
|
|
|
|
|
CloseableHttpClient httpClient = HttpClients.createDefault()
|
|
|
|
HttpPost uploadFile = new HttpPost(discordWebhook)
|
|
|
|
|
|
|
|
MultipartEntityBuilder builder = MultipartEntityBuilder.create()
|
2021-06-27 18:34:33 +02:00
|
|
|
|
|
|
|
if (isCanary) {
|
|
|
|
builder.addTextBody("content", "New canary Build")
|
|
|
|
} else {
|
|
|
|
builder.addTextBody("content", "New release build\n\n" +
|
|
|
|
"Current Features: <${project.github}/blob/${branch}/CHANGELOG.md>")
|
|
|
|
}
|
2021-04-05 15:47:34 +02:00
|
|
|
|
|
|
|
builder.addBinaryBody("file", file(jar.archiveFile).newInputStream(), ContentType.APPLICATION_OCTET_STREAM, jar.archiveName)
|
|
|
|
|
|
|
|
HttpEntity multipart = builder.build()
|
|
|
|
|
|
|
|
uploadFile.setEntity(multipart)
|
|
|
|
CloseableHttpResponse response = httpClient.execute(uploadFile)
|
|
|
|
response.getEntity()
|
|
|
|
|
|
|
|
println("Posted build")
|
|
|
|
|
|
|
|
} else {
|
|
|
|
println("Discord webhook unspecified")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2021-05-14 01:50:33 +02:00
|
|
|
String getValueFromCurseAPI(apiKey, endpoint) {
|
|
|
|
String API_BASE_URL = 'https://minecraft.curseforge.com'
|
|
|
|
|
2021-05-18 04:39:06 +02:00
|
|
|
Gson gson = new Gson()
|
|
|
|
|
2021-05-14 01:50:33 +02:00
|
|
|
HttpClient client = HttpClientBuilder.create()
|
|
|
|
.setDefaultRequestConfig(RequestConfig.custom()
|
|
|
|
.setCookieSpec(CookieSpecs.IGNORE_COOKIES).build()).build()
|
|
|
|
|
|
|
|
HttpGet get = new HttpGet(API_BASE_URL + endpoint)
|
|
|
|
get.setHeader('X-Api-Token', apiKey)
|
|
|
|
|
|
|
|
HttpResponse response = client.execute(get)
|
|
|
|
|
|
|
|
int statusCode = response.statusLine.statusCode
|
|
|
|
|
|
|
|
if (statusCode == 200) {
|
|
|
|
byte[] data = response.entity.content.bytes
|
|
|
|
return new String(data, Charsets.UTF_8)
|
|
|
|
} else {
|
|
|
|
if (response.getFirstHeader('content-type').value.contains('json')) {
|
|
|
|
InputStreamReader reader = new InputStreamReader(response.entity.content)
|
|
|
|
reader.close()
|
|
|
|
throw new RuntimeException("[CurseForge] Error")
|
|
|
|
} else {
|
|
|
|
throw new RuntimeException("[CurseForge] HTTP Error Code $response.statusLine.statusCode: $response.statusLine.reasonPhrase")
|
|
|
|
}
|
2021-04-05 15:47:34 +02:00
|
|
|
}
|
2021-05-14 01:50:33 +02:00
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2021-05-18 04:39:06 +02:00
|
|
|
/**
|
|
|
|
* Upload a single file (in case you also want to upload the other files like source n stuff)
|
|
|
|
* @param json
|
|
|
|
* @param file
|
|
|
|
* @return
|
|
|
|
* @throws IOException
|
|
|
|
* @throws URISyntaxException
|
|
|
|
*/
|
|
|
|
UploadResponse uploadFile(Metadata metadata, File file, String apiKey, Gson gson) throws IOException, URISyntaxException {
|
|
|
|
String API_BASE_URL = 'https://minecraft.curseforge.com'
|
|
|
|
String UPLOAD_URL = "/api/projects/%s/upload-file"
|
|
|
|
// Upload
|
|
|
|
// Important info
|
|
|
|
String uploadUrl = String.format(API_BASE_URL + UPLOAD_URL, project.curse_project_id)
|
|
|
|
|
|
|
|
HttpClient client = HttpClientBuilder.create()
|
|
|
|
.setDefaultRequestConfig(RequestConfig.custom()
|
|
|
|
.setCookieSpec(CookieSpecs.IGNORE_COOKIES).build()).build()
|
|
|
|
|
|
|
|
HttpPost post = new HttpPost(uploadUrl)
|
|
|
|
post.setHeader('X-Api-Token', apiKey)
|
|
|
|
|
|
|
|
|
|
|
|
// https://support.curseforge.com/en/support/solutions/articles/9000197321-curseforge-api
|
|
|
|
post.setEntity(MultipartEntityBuilder.create()
|
|
|
|
.addTextBody('metadata', gson.toJson(metadata), ContentType.APPLICATION_JSON)
|
|
|
|
.addBinaryBody('file', file)
|
|
|
|
.build())
|
|
|
|
|
|
|
|
HttpResponse response = client.execute(post)
|
|
|
|
InputStreamReader reader = new InputStreamReader(response.entity.content)
|
|
|
|
UploadResponse uploadResponse = gson.fromJson(reader, UploadResponse)
|
|
|
|
reader.close()
|
|
|
|
return uploadResponse
|
2021-05-14 01:50:33 +02:00
|
|
|
}
|
2021-04-05 15:47:34 +02:00
|
|
|
|
2021-05-14 01:50:33 +02:00
|
|
|
class GameVersion {
|
|
|
|
int id
|
|
|
|
int gameVersionTypeID
|
|
|
|
String name
|
|
|
|
String slug
|
|
|
|
}
|
|
|
|
|
2021-05-18 04:39:06 +02:00
|
|
|
/**
|
|
|
|
* As described here https://support.curseforge.com/en/support/solutions/articles/9000197321-curseforge-api
|
2021-06-27 18:34:33 +02:00
|
|
|
*/
|
2021-05-18 04:39:06 +02:00
|
|
|
class Metadata {
|
|
|
|
String changelog
|
|
|
|
String changelogType
|
|
|
|
int[] gameVersions
|
|
|
|
String releaseType
|
|
|
|
}
|
|
|
|
|
|
|
|
class UploadResponse {
|
|
|
|
int id;
|
|
|
|
}
|
|
|
|
|
2021-05-14 01:50:33 +02:00
|
|
|
|
|
|
|
// Based on https://github.com/matthewprenger/CurseGradle as it didnt support Bukkit uploads at the time.
|
|
|
|
task curseforge {
|
|
|
|
dependsOn(jar)
|
|
|
|
doLast {
|
|
|
|
String apiKey = null
|
|
|
|
|
|
|
|
if (System.getenv("CURSE_API") != null) {
|
|
|
|
apiKey = System.getenv("CURSE_API")
|
|
|
|
}
|
|
|
|
|
2021-06-27 18:34:33 +02:00
|
|
|
if (apiKey != null) {
|
2021-05-18 04:39:06 +02:00
|
|
|
|
2021-06-27 18:34:33 +02:00
|
|
|
Gson gson = new Gson()
|
2021-05-18 04:39:06 +02:00
|
|
|
|
|
|
|
//String VERSION_TYPES_URL = "/api/game/version-types"
|
|
|
|
int gameVersionTypeID = 1
|
2021-05-14 01:50:33 +02:00
|
|
|
String VERSION_URL = "/api/game/versions"
|
|
|
|
println("Uploading to CurseForge")
|
|
|
|
|
2021-05-18 04:39:06 +02:00
|
|
|
// Get game versions
|
|
|
|
String gameVersionsString = getValueFromCurseAPI(apiKey, VERSION_URL)
|
|
|
|
GameVersion[] gameVersions = gson.fromJson(gameVersionsString, GameVersion[].class)
|
2021-06-27 18:34:33 +02:00
|
|
|
def versions = gameVersions.findAll { it.gameVersionTypeID == gameVersionTypeID }
|
2021-05-18 04:39:06 +02:00
|
|
|
|
|
|
|
String[] supportedVersions = [
|
2021-06-27 18:34:33 +02:00
|
|
|
"1.16",
|
|
|
|
"1.15",
|
|
|
|
"1.14",
|
|
|
|
"1.13"
|
2021-05-18 04:39:06 +02:00
|
|
|
]
|
|
|
|
|
2021-06-27 18:34:33 +02:00
|
|
|
def supportedGameVersions = versions.findAll { supportedVersions.contains(it.name) }
|
|
|
|
int[] supportedGameVersionIds = supportedGameVersions.collect { it.id }.toArray()
|
2021-05-18 04:39:06 +02:00
|
|
|
|
|
|
|
println("Supported Version Id's ${supportedGameVersionIds}")
|
|
|
|
|
|
|
|
Metadata uploadMetadata = new Metadata();
|
|
|
|
|
2021-06-27 20:11:16 +02:00
|
|
|
uploadMetadata.changelog = "${project.github}/blob/${branch}/CHANGELOG.md"
|
2021-05-18 04:39:06 +02:00
|
|
|
uploadMetadata.changelogType = "markdown"
|
2021-06-27 20:11:16 +02:00
|
|
|
uploadMetadata.releaseType = "release"
|
2021-05-18 04:39:06 +02:00
|
|
|
uploadMetadata.gameVersions = supportedGameVersionIds
|
|
|
|
|
|
|
|
def uploadId = uploadFile(uploadMetadata, file(jar.archiveFile), apiKey, gson)
|
|
|
|
|
|
|
|
println("Uploaded with ID: ${uploadId.id}")
|
2021-05-14 01:50:33 +02:00
|
|
|
|
|
|
|
println("Published build")
|
|
|
|
|
|
|
|
} else {
|
|
|
|
println("Discord webhook unspecified")
|
2021-04-05 15:47:34 +02:00
|
|
|
}
|
|
|
|
}
|
2021-05-14 01:50:33 +02:00
|
|
|
// id = project.curse_project_id
|
|
|
|
// // TODO add code to reference this but also cut the latest change logs in for the files
|
|
|
|
// changelogType = 'markdown'
|
|
|
|
// releaseType = 'release'
|
2021-04-05 15:47:34 +02:00
|
|
|
}
|
|
|
|
|
2019-06-02 05:39:08 +02:00
|
|
|
task copyPlugin {
|
|
|
|
doLast {
|
|
|
|
copy {
|
2021-06-27 18:34:33 +02:00
|
|
|
if (System.env.MC_SERVER_LOC == null) {
|
2020-01-22 17:30:59 +01:00
|
|
|
throw new Exception('You must set the server location and jar to use')
|
2019-06-02 05:39:08 +02:00
|
|
|
}
|
|
|
|
println "$buildDir/libs/Advanced-Portals-${version}.jar"
|
|
|
|
println "${System.env.MC_SERVER_LOC}/plugins/Advanced-Portals-${version}.jar"
|
|
|
|
try {
|
|
|
|
delete fileTree("${System.env.MC_SERVER_LOC}/plugins/") {
|
|
|
|
include "*.jar"
|
|
|
|
}
|
|
|
|
}
|
2021-06-27 18:34:33 +02:00
|
|
|
catch (RuntimeException e) {
|
2019-06-02 05:39:08 +02:00
|
|
|
println e.getLocalizedMessage()
|
|
|
|
}
|
|
|
|
from file("$buildDir/libs/Advanced-Portals-${version}.jar")
|
|
|
|
into file("${System.env.MC_SERVER_LOC}/plugins/")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2018-07-23 02:43:29 +02:00
|
|
|
|
|
|
|
// Set SPIGOT_LOC to the location of your server and SPIGOT_JAR as the name of the jar file in the server you want to run
|
|
|
|
// DIReallyKnowWhatIAmDoingISwear is to remove the stupid pause spigot has at the start
|
|
|
|
task runJar() {
|
|
|
|
doLast {
|
2021-06-27 18:34:33 +02:00
|
|
|
if (System.env.MC_SERVER_LOC == null || System.env.MC_SERVER_JAR == null) {
|
2020-01-22 17:30:59 +01:00
|
|
|
throw new Exception('You must set the server location and jar to use MC_SERVER_LOC and MC_SERVER_JAR')
|
2019-06-02 05:39:08 +02:00
|
|
|
}
|
2018-07-23 02:43:29 +02:00
|
|
|
javaexec {
|
|
|
|
main "-jar"
|
|
|
|
args "${System.env.MC_SERVER_LOC}\\${System.env.MC_SERVER_JAR}.jar"
|
2018-08-27 22:43:02 +02:00
|
|
|
jvmArgs = ["-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005", "-DIReallyKnowWhatIAmDoingISwear=true"]
|
2018-07-23 02:43:29 +02:00
|
|
|
workingDir "${System.env.MC_SERVER_LOC}"
|
|
|
|
}
|
|
|
|
}
|
2019-12-30 15:52:00 +01:00
|
|
|
}
|
2021-05-12 02:19:01 +02:00
|
|
|
|
2021-06-27 18:34:33 +02:00
|
|
|
task publish {
|
|
|
|
doLast {
|
|
|
|
println "This is a dummy task to run others for version: ${version}"
|
2021-05-12 02:19:01 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-06-27 18:34:33 +02:00
|
|
|
// https://github.com/researchgate/gradle-release
|
|
|
|
// Only other plugin I can find using auto & gradle https://github.com/intuit/hooks
|
|
|
|
release {
|
|
|
|
failOnPublishNeeded = false
|
|
|
|
failOnSnapshotDependencies = false
|
|
|
|
git {
|
|
|
|
requireBranch = ''
|
2021-05-19 02:01:01 +02:00
|
|
|
}
|
2021-06-27 18:34:33 +02:00
|
|
|
|
|
|
|
|
|
|
|
// Disable tasks because something we have is causing -x to be ignored
|
|
|
|
createReleaseTag.enabled = false
|
|
|
|
preTagCommit.enabled = false
|
|
|
|
commitNewVersion.enabled = false
|
2021-05-19 02:01:01 +02:00
|
|
|
}
|
|
|
|
|
2021-06-27 18:34:33 +02:00
|
|
|
task cleanbuildfolder {
|
|
|
|
doFirst {
|
|
|
|
println "Cleaning up previous builds (to stop publishing old ones by mistake)"
|
|
|
|
project.delete(files("${buildDir}/libs"))
|
2021-05-12 02:19:01 +02:00
|
|
|
}
|
|
|
|
}
|
2021-06-27 18:34:33 +02:00
|
|
|
|
|
|
|
void updateFileVersion(String fileLoc, Pattern pattern, Closure<String> stringClosure) {
|
|
|
|
File file = new File(projectDir, fileLoc)
|
|
|
|
Matcher m = pattern.matcher(file.text)
|
|
|
|
if (m.find()) {
|
|
|
|
def newVersion = stringClosure.call(m)
|
|
|
|
println "Replacing ${pattern.toString()} in ${fileLoc} with '${newVersion}'"
|
|
|
|
file.text = file.text.replaceAll(pattern, newVersion)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Just to keep all numbers the same (as they are dotted all over the place)
|
|
|
|
task updateVersionNumbers {
|
|
|
|
doFirst {
|
|
|
|
def versionRegex = ~/(\nversion:\s)([0-9.-]+)/
|
|
|
|
def velocityVersionRegex = ~/(\sversion\s=\s")([0-9.-]+)("\))/
|
|
|
|
|
|
|
|
updateFileVersion("src/main/resources/bungee.yml", versionRegex,
|
|
|
|
{ Matcher m ->
|
|
|
|
return "${m.group(1)}${getVersion()}"
|
|
|
|
})
|
|
|
|
|
|
|
|
updateFileVersion("src/main/resources/plugin.yml", versionRegex,
|
|
|
|
{ Matcher m ->
|
|
|
|
return "${m.group(1)}${getVersion()}"
|
|
|
|
})
|
|
|
|
|
|
|
|
updateFileVersion("src/main/java/com/sekwah/advancedportals/velocity/AdvancedPortalsPlugin.java",
|
|
|
|
velocityVersionRegex,
|
|
|
|
{ Matcher m ->
|
|
|
|
return "${m.group(1)}${getVersion()}${m.group(3)}"
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-06-27 20:04:59 +02:00
|
|
|
updateVersion.finalizedBy 'updateVersionNumbers'
|
|
|
|
|
2021-06-27 18:34:33 +02:00
|
|
|
compileJava.dependsOn 'cleanbuildfolder'
|
|
|
|
|
|
|
|
// Publish rules
|
|
|
|
// Current behavior seems to be canary or release. Though pre-releases may break this pattern.
|
|
|
|
publish.dependsOn 'build'
|
|
|
|
publish.finalizedBy 'discordupload'
|
|
|
|
if (!isCanary) {
|
|
|
|
publish.finalizedBy 'curseforge'
|
|
|
|
}
|