Update buildscript

- Maven publish
This commit is contained in:
JozsefA 2021-06-21 13:56:27 -07:00
parent 1c5efa6e50
commit c3f1c05630
2 changed files with 19 additions and 1 deletions

View file

@ -2,6 +2,7 @@
<img src="https://i.imgur.com/yVFgPpr.png" alt="Logo by @voxel_dani on Twitter" width="250">
<h1>Flywheel</h1>
<h6>A modern engine for modded Minecraft.</h6>
<a href='https://ci.tterrag.com/job/Flywheel/job/Forge/job/1.16/'><img src='https://ci.tterrag.com/job/Flywheel/job/Forge/job/1.16/badge/icon' alt="Jenkins"></a>
<a href="https://discord.gg/xjD59ThnXy"><img src="https://img.shields.io/discord/841464837406195712?color=844685&label=Discord&style=flat" alt="Discord"></a>
<a href="https://www.curseforge.com/minecraft/mc-mods/flywheel"><img src="http://cf.way2muchnoise.eu/flywheel.svg" alt="Curseforge Downloads"></a>
<br>

View file

@ -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 {