From 9869958c7c0952987f22b6f10f9e598f66dae468 Mon Sep 17 00:00:00 2001 From: Andreas Fitzek Date: Tue, 15 Jul 2014 18:52:38 +0200 Subject: Create Maven repository --- build.gradle | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 6bf1da7f..a5d3f0d1 100644 --- a/build.gradle +++ b/build.gradle @@ -1,18 +1,41 @@ subprojects { apply plugin: 'java' apply plugin: 'eclipse' + apply plugin: 'maven' + group = 'at.gv.egiz.pdfas' + + configurations { + deployerJars + } + repositories { mavenCentral() } - dependencies { testCompile 'junit:junit:4.8.2' } + dependencies { + testCompile 'junit:junit:4.8.2' + //to use WebDav protocol on upload + deployerJars 'org.apache.maven.wagon:wagon-webdav:1.0-beta-2' + } sourceCompatibility = 1.5 + project.ext{ + releaseRepoUrl = "file://${project(':').projectDir}/../mvn-repo/releases" + snapshotRepoUrl = "file://${project(':').projectDir}/../mvn-repo/snapshots" + } + version = '4.0.0-RC7' pdfasversion = version revision = getCheckedOutGitCommitHash() jar { manifest.attributes provider: 'EGIZ', 'Specification-Version': getCheckedOutGitCommitHash(), 'Implementation-Version': version } + + uploadArchives { + repositories.mavenDeployer { + repository(url: project.releaseRepoUrl) + snapshotRepository(url: project.snapshotRepoUrl) + } + } } def getCheckedOutGitCommitHash() { -- cgit v1.2.3