Skip to content
Snippets Groups Projects
Commit 97f13ba2 authored by Griefed's avatar Griefed :joystick:
Browse files

chore: Add Gradle plugin maven publish for versioning and publishing to GitHub package registry

parent ed322b72
No related branches found
No related tags found
No related merge requests found
......@@ -3,10 +3,11 @@ import java.text.SimpleDateFormat
plugins {
id 'java'
id 'idea'
id 'maven-publish'
}
group 'de.griefed'
version '1.0-SNAPSHOT'
//noinspection GroovyUnusedAssignment
sourceCompatibility = targetCompatibility = '1.8'
......@@ -95,4 +96,27 @@ jar {
'META-INF/README.md',
'Log4j-**'
)
}
// Publish the package with passed version to GHPR. Use ./gradlew -Pversion=${NEW_VERSION} publish, for example.
publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/Griefed/serverpackcreatorexampleaddon")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
publications {
//noinspection GroovyAssignabilityCheck
gpr(MavenPublication) {
//noinspection GroovyAssignabilityCheck
artifactId='serverpackcreatorexampleaddon'
//noinspection GroovyAssignabilityCheck
from (components.java)
}
}
}
\ No newline at end of file
rootProject.name = 'ServerPackCreatorExampleAddon'
rootProject.name = 'serverpackcreatorexampleaddon'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment