[gradle] consume and provide local maven repos

Signed-off-by: Moritz Eysholdt <moritz.eysholdt@typefox.io>
This commit is contained in:
Moritz Eysholdt 2016-06-17 11:52:09 +02:00
parent 2d82866ded
commit a65917cfb1
3 changed files with 12 additions and 4 deletions

2
Jenkinsfile vendored
View file

@ -7,7 +7,7 @@ node {
stage 'Build'
sh "./gradlew build"
archive '**/build/**/*.jar'
archive 'build/maven-repository/**/*.*'
slackSend "Build Succeeded - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"

View file

@ -1,9 +1,8 @@
subprojects {
repositories {
jcenter()
maven {
url 'https://oss.sonatype.org/content/repositories/snapshots'
}
maven { url 'http://services.typefox.io/open-source/jenkins//job/lsapi/lastSuccessfulBuild/artifact/build/maven-repository/' }
maven { url 'http://services.typefox.io/open-source/jenkins//job/xtext-lib/job/master/lastStableBuild/artifact/build/maven-repository/' }
}
apply plugin: 'java'

View file

@ -16,6 +16,15 @@ task javadocJar(type: Jar, dependsOn: javadoc) {
from javadoc.destinationDir
}
task createLocalMavenRepo(type: Upload) {
configuration = configurations['archives']
repositories {
mavenDeployer {
repository(url: "file:" + file("../build/maven-repository"))
}
}
}
artifacts {
archives sourcesJar, javadocJar
}