Mercurial > hg4j
annotate build.gradle @ 460:5311e041d2dd
Removed 'experimental' tag from Pair
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Wed, 20 Jun 2012 16:49:43 +0200 |
parents | 55e9588b84b8 |
children | ad0322a4af20 |
rev | line source |
---|---|
452
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
1 def isRelease = false |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
2 |
459
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
3 version = '0.9.5-SNAPSHOT' |
452
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
4 description = 'Pure Java API and Toolkit for Mercurial DVCS' |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
5 group = 'org.tmatesoft.hg4j' |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
6 |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
7 apply plugin : 'java' |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
8 apply plugin : 'maven' |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
9 |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
10 sourceCompatibility = '1.5' |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
11 targetCompatibility = '1.5' |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
12 |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
13 sourceSets { |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
14 main { |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
15 java { |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
16 srcDir 'src/' |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
17 } |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
18 } |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
19 test { |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
20 java { |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
21 srcDir 'test/' |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
22 } |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
23 resources { |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
24 srcDir 'test-data/' |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
25 } |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
26 } |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
27 cli { |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
28 java { |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
29 srcDir 'cmdline/' |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
30 } |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
31 } |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
32 } |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
33 |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
34 repositories { |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
35 mavenLocal() |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
36 mavenCentral() |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
37 } |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
38 |
453
7b883bf03b14
Artifacts upload using gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
452
diff
changeset
|
39 configurations { |
7b883bf03b14
Artifacts upload using gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
452
diff
changeset
|
40 deployJars |
7b883bf03b14
Artifacts upload using gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
452
diff
changeset
|
41 } |
7b883bf03b14
Artifacts upload using gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
452
diff
changeset
|
42 |
452
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
43 dependencies { |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
44 testCompile 'junit:junit:4.8.2' |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
45 cliCompile 'junit:junit:4.8.2' |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
46 cliCompile files(sourceSets.main.output) { |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
47 builtBy compileJava |
453
7b883bf03b14
Artifacts upload using gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
452
diff
changeset
|
48 } |
7b883bf03b14
Artifacts upload using gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
452
diff
changeset
|
49 deployJars "org.apache.maven.wagon:wagon-http:1.0-beta-2" |
452
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
50 } |
453
7b883bf03b14
Artifacts upload using gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
452
diff
changeset
|
51 |
452
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
52 def sharedMetaInf = { |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
53 from project.file('COPYING') |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
54 } |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
55 |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
56 |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
57 task sourcesJar(type: Jar) { |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
58 classifier = 'src' |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
59 from sourceSets.main.java, sourceSets.test.java, sourceSets.cli.java |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
60 metaInf sharedMetaInf |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
61 } |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
62 |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
63 task cmdlineJar(type: Jar) { |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
64 appendix = 'console' |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
65 from sourceSets.cli.output |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
66 metaInf sharedMetaInf |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
67 } |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
68 |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
69 jar { |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
70 manifest { |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
71 attributes ("Implementation-Version": version) |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
72 } |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
73 metaInf sharedMetaInf |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
74 } |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
75 |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
76 artifacts { |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
77 archives sourcesJar, cmdlineJar |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
78 deployJars jar, sourcesJar |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
79 } |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
80 |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
81 install { |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
82 configuration = configurations.deployJars |
453
7b883bf03b14
Artifacts upload using gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
452
diff
changeset
|
83 /* |
452
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
84 repositories.mavenDeployer { |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
85 addFilter('f1') { artifact, file -> |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
86 println file.name |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
87 println artifact.ext |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
88 println file.name - ('.' + artifact.ext) |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
89 println ' ' |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
90 def fname = file.name - ('.' + artifact.ext) |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
91 println fname.endsWith('src') |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
92 fname.endsWith('src') |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
93 } |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
94 addFilter('f2') { artifact, file -> |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
95 def fname = file.name - ('.' + artifact.ext) |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
96 fname.endsWith('console') |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
97 } |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
98 addFilter('f3') { artifact, file -> |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
99 def fname = file.name - ('.' + artifact.ext) |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
100 fname.endsWith(version) |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
101 } |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
102 } |
453
7b883bf03b14
Artifacts upload using gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
452
diff
changeset
|
103 */ |
452
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
104 } |
453
7b883bf03b14
Artifacts upload using gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
452
diff
changeset
|
105 |
7b883bf03b14
Artifacts upload using gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
452
diff
changeset
|
106 uploadArchives { |
7b883bf03b14
Artifacts upload using gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
452
diff
changeset
|
107 configuration = configurations.deployJars |
7b883bf03b14
Artifacts upload using gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
452
diff
changeset
|
108 repositories { |
7b883bf03b14
Artifacts upload using gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
452
diff
changeset
|
109 mavenDeployer { |
7b883bf03b14
Artifacts upload using gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
452
diff
changeset
|
110 configuration = configurations.deployJars |
7b883bf03b14
Artifacts upload using gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
452
diff
changeset
|
111 repository(url: "http://maven.tmatesoft.com/content/repositories/snapshots/") { |
7b883bf03b14
Artifacts upload using gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
452
diff
changeset
|
112 authentication(userName: "", password: "") |
7b883bf03b14
Artifacts upload using gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
452
diff
changeset
|
113 } |
7b883bf03b14
Artifacts upload using gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
452
diff
changeset
|
114 } |
7b883bf03b14
Artifacts upload using gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
452
diff
changeset
|
115 } |
7b883bf03b14
Artifacts upload using gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
452
diff
changeset
|
116 } |
452
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
117 |
459
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
118 |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
119 task findOutWhyProjectCopyDoesntWork() << { |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
120 // files under .hg/ are not copied with copy {} |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
121 ext.myjar = zipTree( 'test-data/test-repos.jar' ) |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
122 ext.destDir = new File(project.getBuildDir(), "hg4j-tests1/") |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
123 outputs.dir ext.destDir |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
124 CopySpec ss = copySpec { |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
125 from ext.myjar |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
126 into ext.destDir |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
127 include '*', '*/.*', '**/.*/*', '**/.*', '**/*', '*/.*/**', '**/**', '.*/**', '**/.hg/*', '**/.hg*' |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
128 eachFile {element -> |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
129 println "AAA:$element.relativePath" |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
130 } |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
131 } |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
132 println "includeEmptyDir: $ss.includeEmptyDirs" |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
133 println "includes: $ss.includes" |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
134 println "allIncludes: $ss.allIncludes" |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
135 println "excludes: $ss.excludes" |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
136 println "allExcludes: $ss.allExcludes" |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
137 } |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
138 |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
139 |
452
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
140 test { |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
141 // <property name="test-repos-root" value="${java.io.tmpdir}/hg4j-tests/"/> |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
142 // <delete dir="${test-repos-root}" quiet="yes"/> |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
143 // <unjar src="test-data/test-repos.jar" dest="${test-repos-root}"/> |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
144 |
459
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
145 File testReposRoot = new File(project.getBuildDir(), "hg4j-tests2/"); |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
146 if ( testReposRoot.exists() ) { |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
147 project.delete(testReposRoot) |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
148 } |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
149 testReposRoot.mkdirs(); |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
150 |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
151 zipTree('test-data/test-repos.jar').visit {element -> |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
152 element.copyTo(element.relativePath.getFile(testReposRoot)) |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
153 } |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
154 |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
155 systemProperties 'hg4j.tests.repos' : testReposRoot |
452
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
156 systemProperties 'hg4j.tests.remote' : 'http://hg.serpentine.com/tutorial/hello' |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
157 } |