diff options
| author | Modmuss50 <modmuss50@gmail.com> | 2019-05-22 12:06:00 +0100 |
|---|---|---|
| committer | Daniel She <shekwancheung0528@gmail.com> | 2019-05-22 19:06:00 +0800 |
| commit | 85c5d89bba993b8e82180a259fe40b09cf2de0eb (patch) | |
| tree | 4af72dfbad913d6ac5f7f6bc6d6d8f153b213b82 | |
| parent | df40575b7a673ede2f9f38695cb8ac2d47c67385 (diff) | |
| download | RoughlyEnoughItems-85c5d89bba993b8e82180a259fe40b09cf2de0eb.tar.gz RoughlyEnoughItems-85c5d89bba993b8e82180a259fe40b09cf2de0eb.tar.bz2 RoughlyEnoughItems-85c5d89bba993b8e82180a259fe40b09cf2de0eb.zip | |
Setup jenkins and maven (#95)
| -rw-r--r-- | JenkinsD | 16 | ||||
| -rwxr-xr-x | build.gradle | 40 | ||||
| -rw-r--r-- | gradle.properties | 2 |
3 files changed, 54 insertions, 4 deletions
diff --git a/JenkinsD b/JenkinsD new file mode 100644 index 000000000..866bb1a78 --- /dev/null +++ b/JenkinsD @@ -0,0 +1,16 @@ +pipeline { + agent any + stages { + + stage ('Build') { + steps { + sh "rm -rf build/libs/" + sh "chmod +x gradlew" + sh "./gradlew clean --stacktrace" + sh "./gradlew build publish --refresh-dependencies --stacktrace" + + archiveArtifacts artifacts: '**/build/libs/*.jar', fingerprint: true + } + } + } +}
\ No newline at end of file diff --git a/build.gradle b/build.gradle index 64bcb0c8f..f47805a4b 100755 --- a/build.gradle +++ b/build.gradle @@ -3,13 +3,17 @@ import net.fabricmc.loom.task.RemapJar plugins { id 'fabric-loom' version '0.2.2-SNAPSHOT' id "com.github.johnrengelman.shadow" version "4.0.3" + id 'maven-publish' } sourceCompatibility = 1.8 targetCompatibility = 1.8 archivesBaseName = "RoughlyEnoughItems" -version = project.mod_version +group = "me.shedaniel" + +def ENV = System.getenv() +version = project.mod_version + "+" + (ENV.BUILD_NUMBER ? ("build." + ENV.BUILD_NUMBER) : "local") def includeDep = true @@ -36,7 +40,7 @@ configurations { } shadowJar { - version = project.mod_version.replaceAll('\\+build.', '.') + version = project.mod_version classifier = includeDep ? null : "bare" configurations = [project.configurations.included] } @@ -67,9 +71,39 @@ dependencies { include "cloth-config:ClothConfig:${cloth_config_version}" } - compile "blue.endless:jankson:${project.jankson_version}" + modCompile "blue.endless:jankson:${project.jankson_version}" included "blue.endless:jankson:${project.jankson_version}" modCompile "io.github.prospector.modmenu:ModMenu:${modmenu_version}" compile "org.lwjgl:lwjgl-jemalloc:3.2.1" } + +task sourcesJar(type: Jar, dependsOn: classes) { + classifier = "sources" + from sourceSets.main.allSource +} + +publishing { + publications { + mavenJava(MavenPublication) { + artifact(jar) { + builtBy remapJar + } + artifact(sourcesJar) { + builtBy remapSourcesJar + } + } + } + + repositories { + if (project.hasProperty('danielshe_pass')) { + maven { + url = "http://deploy.modmuss50.me/" + credentials { + username = "danielshe" + password = project.getProperty('danielshe_pass') + } + } + } + } +}
\ No newline at end of file diff --git a/gradle.properties b/gradle.properties index a7b81a7cc..1e92112ae 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -mod_version=2.9+build.112 +mod_version=2.9 minecraft_version=1.14.1 yarn_version=1.14.1+build.10 fabricloader_version=0.4.7+build.147 |
