comparison build.gradle @ 453:7b883bf03b14

Artifacts upload using gradle build
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Wed, 13 Jun 2012 18:18:37 +0200
parents 7dcc920e2d57
children 55e9588b84b8
comparison
equal deleted inserted replaced
452:7dcc920e2d57 453:7b883bf03b14
1 def isRelease = false 1 def isRelease = false
2 2
3 version = '0.9.0' 3 version = '0.9.0-SNAPSHOT'
4 description = 'Pure Java API and Toolkit for Mercurial DVCS' 4 description = 'Pure Java API and Toolkit for Mercurial DVCS'
5 group = 'org.tmatesoft.hg4j' 5 group = 'org.tmatesoft.hg4j'
6 6
7 apply plugin : 'java' 7 apply plugin : 'java'
8 apply plugin : 'maven' 8 apply plugin : 'maven'
34 repositories { 34 repositories {
35 mavenLocal() 35 mavenLocal()
36 mavenCentral() 36 mavenCentral()
37 } 37 }
38 38
39 configurations {
40 deployJars
41 }
42
39 dependencies { 43 dependencies {
40 testCompile 'junit:junit:4.8.2' 44 testCompile 'junit:junit:4.8.2'
41 cliCompile 'junit:junit:4.8.2' 45 cliCompile 'junit:junit:4.8.2'
42 cliCompile files(sourceSets.main.output) { 46 cliCompile files(sourceSets.main.output) {
43 builtBy compileJava 47 builtBy compileJava
44 } 48 }
49 deployJars "org.apache.maven.wagon:wagon-http:1.0-beta-2"
45 } 50 }
46 51
47 configurations {
48 deployJars
49 }
50
51 def sharedMetaInf = { 52 def sharedMetaInf = {
52 from project.file('COPYING') 53 from project.file('COPYING')
53 } 54 }
54 55
55 56
77 deployJars jar, sourcesJar 78 deployJars jar, sourcesJar
78 } 79 }
79 80
80 install { 81 install {
81 configuration = configurations.deployJars 82 configuration = configurations.deployJars
83 /*
82 repositories.mavenDeployer { 84 repositories.mavenDeployer {
83 addFilter('f1') { artifact, file -> 85 addFilter('f1') { artifact, file ->
84 println file.name 86 println file.name
85 println artifact.ext 87 println artifact.ext
86 println file.name - ('.' + artifact.ext) 88 println file.name - ('.' + artifact.ext)
96 addFilter('f3') { artifact, file -> 98 addFilter('f3') { artifact, file ->
97 def fname = file.name - ('.' + artifact.ext) 99 def fname = file.name - ('.' + artifact.ext)
98 fname.endsWith(version) 100 fname.endsWith(version)
99 } 101 }
100 } 102 }
103 */
101 } 104 }
105
106 uploadArchives {
107 configuration = configurations.deployJars
108 repositories {
109 mavenDeployer {
110 configuration = configurations.deployJars
111 repository(url: "http://maven.tmatesoft.com/content/repositories/snapshots/") {
112 authentication(userName: "", password: "")
113 }
114 }
115 }
116 }
102 117
103 test { 118 test {
104 // <property name="test-repos-root" value="${java.io.tmpdir}/hg4j-tests/"/> 119 // <property name="test-repos-root" value="${java.io.tmpdir}/hg4j-tests/"/>
105 // <delete dir="${test-repos-root}" quiet="yes"/> 120 // <delete dir="${test-repos-root}" quiet="yes"/>
106 // <unjar src="test-data/test-repos.jar" dest="${test-repos-root}"/> 121 // <unjar src="test-data/test-repos.jar" dest="${test-repos-root}"/>