diff options
author | LexManos <LexManos@gmail.com> | 2018-11-02 12:42:26 -0700 |
---|---|---|
committer | LexManos <LexManos@gmail.com> | 2018-11-02 12:42:26 -0700 |
commit | b480d66d92400d4c1802d9d420a5d93b9eb9eb17 (patch) | |
tree | d92362e3cee13cc1218b9a216d959855d7377a76 /build.gradle | |
parent | a2fe1761eade11c81a2bcc52ff8e930556dd9050 (diff) | |
download | Artifactural-b480d66d92400d4c1802d9d420a5d93b9eb9eb17.tar.gz Artifactural-b480d66d92400d4c1802d9d420a5d93b9eb9eb17.tar.bz2 Artifactural-b480d66d92400d4c1802d9d420a5d93b9eb9eb17.zip |
Jenkinsfile, license headers, publish under net.minecraftforge group and tag based version.
Diffstat (limited to 'build.gradle')
-rw-r--r-- | build.gradle | 34 |
1 files changed, 27 insertions, 7 deletions
diff --git a/build.gradle b/build.gradle index ba4e0be..51768a0 100644 --- a/build.gradle +++ b/build.gradle @@ -1,8 +1,23 @@ +plugins { + id 'net.minecrell.licenser' version '0.3' + id 'org.ajoberstar.grgit' version '2.3.0' + //id 'com.github.johnrengelman.shadow' version '2.0.4' +} + apply plugin: 'java' apply plugin: 'maven-publish' -group = 'com.amadornes' -version = '1.0.0' +group = 'net.minecraftforge' +version = gitVersion() +def gitVersion() { + def raw = grgit.describe(longDescr: true) + def desc = (raw == null ? 'unknown-unknown-unknown' : raw).split('-') as List + def hash = desc.remove(desc.size() - 1) + def offset = desc.remove(desc.size() - 1) + def tag = desc.join('-') + def branch = grgit.branch.current().name + return "${tag}.${offset}" //${t -> if (branch != 'master') t << '-' + branch}" +} sourceSets { api @@ -43,6 +58,11 @@ jar { from sourceSets.gradlecomp.output } + +license { + header = file("$rootDir/LICENSE-header.txt") +} + publishing { publications { mavenJava(MavenPublication) { @@ -54,16 +74,16 @@ publishing { name = project.archivesBaseName packaging = 'jar' description = 'A Gradle artifact processing and management tool' - url = 'https://github.com/amadornes/Artifactural/' + url = 'https://github.com/MinecraftForge/Artifactural/' scm { - url = 'https://github.com/amadornes/Artifactural/' - connection = 'scm:git:git://github.com/amadornes/Artifactural.git' - developerConnection = 'scm:git:git@github.com:amadornes/Artifactural.git' + url = 'https://github.com/MinecraftForge/Artifactural/' + connection = 'scm:git:git://github.com/MinecraftForge/Artifactural.git' + developerConnection = 'scm:git:git@github.com:MinecraftForge/Artifactural.git' } issueManagement { system = 'github' - url = 'https://github.com/amadornes/Artifactural/issues' + url = 'https://github.com/MinecraftForge/Artifactural/issues' } licenses { license { |