From c3f1c05630d6a842444b5ce0c2398646aa86a77d Mon Sep 17 00:00:00 2001 From: JozsefA Date: Mon, 21 Jun 2021 13:56:27 -0700 Subject: [PATCH] Update buildscript - Maven publish --- README.md | 1 + build.gradle | 19 ++++++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e5b64e880..56741b0d4 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ Logo by @voxel_dani on Twitter

Flywheel

A modern engine for modded Minecraft.
+Jenkins Discord Curseforge Downloads
diff --git a/build.gradle b/build.gradle index 9d47c0c26..af1a0da87 100644 --- a/build.gradle +++ b/build.gradle @@ -16,6 +16,7 @@ plugins { } apply plugin: 'net.minecraftforge.gradle' +apply plugin: 'maven-publish' apply plugin: 'org.spongepowered.mixin' boolean dev = System.getenv('RELEASE') == null || System.getenv('RELEASE').equalsIgnoreCase('false'); @@ -24,7 +25,7 @@ ext.buildnumber = 0 project.buildnumber = System.getenv('BUILD_NUMBER') != null ? System.getenv('BUILD_NUMBER') : "custom" version = "${mc_update_version}-${mod_version}" + (dev ? ".${buildnumber}" : '') -group = 'jozufozu' +group = 'com.jozufozu.flywheel' archivesBaseName = 'flywheel' sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' @@ -134,6 +135,22 @@ artifacts { archives jar, sourcesJar } +publishing { + tasks.publish.dependsOn 'build' + publications { + mavenJava(MavenPublication) { + artifact jar + artifact sourcesJar + } + } + + repositories { + if (project.hasProperty('mavendir')) { + maven { url mavendir } + } + } +} + tasks.curseforge.enabled = !dev && project.hasProperty('jozu_curseforge_key') curseforge {