Publish Resource Updates using Gradle Plugin
Posted Sep 1, 2023
Hey, I made a gradle plugin using the Polymart API to publish updates for your resource automatically. Requires your API key. Check it out on GitHub.
Want to see more Polymart automation tools? Maybe a Maven version of the plugin? Please leave a star on the GitHub repository so I know people are using it, and I'll make more tools.
Polymart Release Gradle Plugin
A Gradle plugin for automating releases to Polymart. Check it out on the gradle plugin portal.
Features
- Upload new versions of your resource directly from your Gradle build script.
- Supports multiple file types including
.zip
,.jar
,.yml
,.sk
, and.schematic
. - Option to mark a version as beta or snapshot.
Installation
Add the following code to your build.gradle
(Groovy) or build.gradle.kts
(Kotlin) file to include the plugin:
Groovy
plugins {
id 'com.cjcrafter.polymart-release' version '1.0.1'
}
Kotlin
plugins {
id("com.cjcrafter.polymart-release") version "1.0.1"
}
Configuration
You can configure the plugin by adding a polymart
block to your build.gradle
or build.gradle.kts
.
Groovy
polymart {
apiKey = 'your_api_key_here'
resourceId = 1234
version = '1.0.0'
title = 'New Release'
message = 'New features added'
file = file('path/to/your/file.zip')
beta = false // optional, defaults to false
snapshot = false // optional, defaults to false
}
Kotlin
polymart {
apiKey = "your_api_key_here"
resourceId = 1234
version = "1.0.0"
title = "New Release"
message = "New features added"
file.set(file("path/to/your/file.zip"))
beta = false // optional, defaults to false
snapshot = false // optional, defaults to false
}
Usage
Once configured, you can run the following Gradle task to upload a new version to Polymart:
./gradlew createPolymartRelease