GradleCurse allows you to deploy your plugins and addons to the Curse network and dev.bukkit.org using the Gradle build tool.
GradleCurse is a Gradle plugin which means you will have to add the classpath dependency to you build script. I am currently hosting all available build on Sonatype's snapshot repository. Release builds will be synced to the Maven central repository once they are available. However, for now you will also have to add the Sonatype repo to your build script repositories.
gradle.build exmaple
buildscript {
repositories {
mavenCentral()
maven {
url 'https://oss.sonatype.org/content/groups/public'
}
}
dependencies {
classpath group: 'net.monofraps', name: 'GradleCurse', version: '1.0-SNAPSHOT'
}
}
apply plugin: 'gradle-curse'
The next step is to configure the curseDeploy object. The following is the most basic configuration.
curseDeploy {
gameHandle = 'wow'
deployment {
curseProjectName = 'my-project'
apiKey = 'KeepThisApiKeySecret'
uploadFileName = 'TheNameTheFileWillHaveOnCurse.zip'
file = 'build/libs/my-plugin.jar'
gameVersions = [1, 2, 3]
}
}
To upload your artifact to your project's Curse page you can now simply run
gradle deployToCurse
The curseDeploy project property extension object provides several different options to configure the plugin.
gameHandle (required) - the short name of the game you're
developing for (e.g. wow for World of Warcraft, rom for Runes of Magic)
baseUrl (optional) - the base URL to use when getting game
version information and uploading. $gameHandle$ will be replaced with whatever gameHandle is set to.
deployment
enabled (optional, defaults to true) - only enabled deployments are uploaded to Curse.curseProjectName (required) - the slug of your project.uploadUrl (optional) - the URL to use for uploading. $baseUrl$ will be replaced with whatever baseUrl is set to. $projectName$ will be replaced with whatever projectName is set to.apiKey (required) - your CurseForge API key. Get your API key here: http://www.curseforge.com/home/api-key/uploadFileName (optional, defaults to $project.name$-$project.version$) - the name of the uploaded file. This will show up on the download page.changeLog (optional) - a change log. THis will show up on the download page.knownCaveats (optional) - any known caveats. This will show up the download page.changeLogMarkup (optional) - the markup used for the changeLog.caveatsMarkup (optional) - the markup used for knownCaveats.file (required) - the file to upload.fileType (optional, defaults to BETA) - type of file you want to upload. This will show up on the download page.gameVersions (required) - a list of 1 - 3 compatible game versions. You can use the showGameVersions task to display the 3 latest versions.Markup types are defined in net.monofraps.gradlecurse.MarkupType
PLAINCREOLEFile types are defined in net.monofraps.gradlecurse.FileType
RELEASEBETAALPHAThe GradleCurse plugin automagically creates two tasks.
showGameVersions - shows the latest 3 versions of the game you're developing for.deployToCurse - uploads all (enabled) deployments defined in curseDeploy to Curse.Fortunately, dev.bukkit.org is part of the Curse network which means they provide the same web API. To make this plugin work with DBO, simply set baseUrl to http://dev.bukkit.org