Skip to content

Commit

Permalink
add maven upload support for dvs1 (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
progwml6 authored and AlgorithmX2 committed Aug 4, 2016
1 parent b9f736a commit 2d286de
Showing 1 changed file with 35 additions and 1 deletion.
36 changes: 35 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ apply plugin: 'net.minecraftforge.gradle.forge'

group= "mod.chiselsandbits"
archivesBaseName = "chiselsandbits"
if (System.getenv().BUILD_NUMBER != null) {//adds the build number to the end of the version string if on a build server
project.version += ".${System.getenv().BUILD_NUMBER}"
}

repositories {
maven { url "http://dvs1.progwml6.com/files/maven" }
Expand Down Expand Up @@ -44,15 +47,32 @@ task apiJar(type: Jar) {

classifier = 'api'
}
// prevent java 8's strict doclint for javadocs from failing builds
allprojects {
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}

jar {
manifest {
attributes 'FMLAT': 'chiselsandbits_at.cfg'
}
}
task javadocJar(type: Jar, dependsOn: javadoc) {
from javadoc.destinationDir
classifier = 'javadoc'
}

task sourcesJar(type: Jar) {
from sourceSets.main.allJava
classifier = 'sources'
}

artifacts {
archives apiJar
archives javadocJar
archives sourcesJar
archives apiJar
}

processResources
Expand All @@ -77,3 +97,17 @@ processResources
// Move access transformers to META-INF
rename '(.+_at.cfg)', 'META-INF/$1'
}

task("uploadJars", dependsOn:"build") {
description = "uploads JARs"
if (project.hasProperty("local_maven")) {
apply plugin: 'maven'
uploadArchives {
repositories {
mavenDeployer {
repository(url: "file://${local_maven}")
}
}
}
}
}

0 comments on commit 2d286de

Please sign in to comment.