Mercurial > hg4j
annotate build.gradle @ 707:42b88709e41d
Merge: support 'unresolved' resolution with MergeStateBuilder
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Fri, 16 Aug 2013 19:22:59 +0200 |
parents | 6e7786086f77 |
children |
rev | line source |
---|---|
468
3ca4ae7bdd38
Clean experimental marks and deprecation code. Update version number to release
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
466
diff
changeset
|
1 /* |
641
2f33f102a8fa
Updated copyright year
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
470
diff
changeset
|
2 * Copyright (c) 2012-2013 TMate Software Ltd |
2f33f102a8fa
Updated copyright year
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
470
diff
changeset
|
3 * |
2f33f102a8fa
Updated copyright year
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
470
diff
changeset
|
4 * This program is free software; you can redistribute it and/or modify |
2f33f102a8fa
Updated copyright year
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
470
diff
changeset
|
5 * it under the terms of the GNU General Public License as published by |
2f33f102a8fa
Updated copyright year
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
470
diff
changeset
|
6 * the Free Software Foundation; version 2 of the License. |
2f33f102a8fa
Updated copyright year
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
470
diff
changeset
|
7 * |
2f33f102a8fa
Updated copyright year
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
470
diff
changeset
|
8 * This program is distributed in the hope that it will be useful, |
2f33f102a8fa
Updated copyright year
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
470
diff
changeset
|
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
2f33f102a8fa
Updated copyright year
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
470
diff
changeset
|
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2f33f102a8fa
Updated copyright year
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
470
diff
changeset
|
11 * GNU General Public License for more details. |
2f33f102a8fa
Updated copyright year
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
470
diff
changeset
|
12 * |
2f33f102a8fa
Updated copyright year
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
470
diff
changeset
|
13 * For information on how to redistribute this software under |
2f33f102a8fa
Updated copyright year
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
470
diff
changeset
|
14 * the terms of a license other than GNU General Public License |
2f33f102a8fa
Updated copyright year
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
470
diff
changeset
|
15 * contact TMate Software at support@hg4j.com |
468
3ca4ae7bdd38
Clean experimental marks and deprecation code. Update version number to release
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
466
diff
changeset
|
16 */ |
452
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
17 def isRelease = false |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
18 |
643
a8ce405da1f5
v1.2 line of dev: update versions, use patch merge code by default
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
641
diff
changeset
|
19 version = '1.2.0-SNAPSHOT' |
452
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
20 description = 'Pure Java API and Toolkit for Mercurial DVCS' |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
21 group = 'org.tmatesoft.hg4j' |
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 apply plugin : 'java' |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
24 apply plugin : 'maven' |
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 sourceCompatibility = '1.5' |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
27 targetCompatibility = '1.5' |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
28 |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
29 sourceSets { |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
30 main { |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
31 java { |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
32 srcDir 'src/' |
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 } |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
35 test { |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
36 java { |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
37 srcDir 'test/' |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
38 } |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
39 resources { |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
40 srcDir 'test-data/' |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
41 } |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
42 } |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
43 cli { |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
44 java { |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
45 srcDir 'cmdline/' |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
46 } |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
47 } |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
48 } |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
49 |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
50 repositories { |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
51 mavenLocal() |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
52 mavenCentral() |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
53 } |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
54 |
453
7b883bf03b14
Artifacts upload using gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
452
diff
changeset
|
55 configurations { |
7b883bf03b14
Artifacts upload using gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
452
diff
changeset
|
56 deployJars |
7b883bf03b14
Artifacts upload using gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
452
diff
changeset
|
57 } |
7b883bf03b14
Artifacts upload using gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
452
diff
changeset
|
58 |
452
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
59 dependencies { |
700
6e7786086f77
Update gradle build to respect new dependency from trilead
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
643
diff
changeset
|
60 compile 'com.trilead:trilead-ssh2:1.0.0-build217' |
452
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
61 testCompile 'junit:junit:4.8.2' |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
62 cliCompile 'junit:junit:4.8.2' |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
63 cliCompile files(sourceSets.main.output) { |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
64 builtBy compileJava |
453
7b883bf03b14
Artifacts upload using gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
452
diff
changeset
|
65 } |
7b883bf03b14
Artifacts upload using gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
452
diff
changeset
|
66 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
|
67 } |
453
7b883bf03b14
Artifacts upload using gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
452
diff
changeset
|
68 |
452
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
69 def sharedMetaInf = { |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
70 from project.file('COPYING') |
700
6e7786086f77
Update gradle build to respect new dependency from trilead
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
643
diff
changeset
|
71 from project.file('LICENSE-TRILEAD.txt') |
452
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 |
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 task sourcesJar(type: Jar) { |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
76 classifier = 'src' |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
77 from sourceSets.main.java, sourceSets.test.java, sourceSets.cli.java |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
78 metaInf sharedMetaInf |
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 task cmdlineJar(type: Jar) { |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
82 appendix = 'console' |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
83 from sourceSets.cli.output |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
84 metaInf sharedMetaInf |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
85 } |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
86 |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
87 jar { |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
88 manifest { |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
89 attributes ("Implementation-Version": version) |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
90 } |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
91 metaInf sharedMetaInf |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
92 } |
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 artifacts { |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
95 archives sourcesJar, cmdlineJar |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
96 deployJars jar, sourcesJar |
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 |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
99 install { |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
100 configuration = configurations.deployJars |
453
7b883bf03b14
Artifacts upload using gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
452
diff
changeset
|
101 /* |
452
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
102 repositories.mavenDeployer { |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
103 addFilter('f1') { artifact, file -> |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
104 println file.name |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
105 println artifact.ext |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
106 println file.name - ('.' + artifact.ext) |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
107 println ' ' |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
108 def fname = file.name - ('.' + artifact.ext) |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
109 println fname.endsWith('src') |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
110 fname.endsWith('src') |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
111 } |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
112 addFilter('f2') { artifact, file -> |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
113 def fname = file.name - ('.' + artifact.ext) |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
114 fname.endsWith('console') |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
115 } |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
116 addFilter('f3') { artifact, file -> |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
117 def fname = file.name - ('.' + artifact.ext) |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
118 fname.endsWith(version) |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
119 } |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
120 } |
453
7b883bf03b14
Artifacts upload using gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
452
diff
changeset
|
121 */ |
452
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
122 } |
453
7b883bf03b14
Artifacts upload using gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
452
diff
changeset
|
123 |
7b883bf03b14
Artifacts upload using gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
452
diff
changeset
|
124 uploadArchives { |
7b883bf03b14
Artifacts upload using gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
452
diff
changeset
|
125 configuration = configurations.deployJars |
7b883bf03b14
Artifacts upload using gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
452
diff
changeset
|
126 repositories { |
7b883bf03b14
Artifacts upload using gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
452
diff
changeset
|
127 mavenDeployer { |
7b883bf03b14
Artifacts upload using gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
452
diff
changeset
|
128 configuration = configurations.deployJars |
470
31bd09da0dcf
Switch to 1.1 development
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
468
diff
changeset
|
129 repository(url: "http://maven.tmatesoft.com/content/repositories/snapshots/") { |
466
3ace1fc95d0a
Use <HOME>/.gradle/gradle.properties
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
462
diff
changeset
|
130 authentication(userName: project.ext.deploySnapshotsRepositoryUser, password: project.ext.deploySnapshotsRepositoryPassword) |
453
7b883bf03b14
Artifacts upload using gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
452
diff
changeset
|
131 } |
7b883bf03b14
Artifacts upload using gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
452
diff
changeset
|
132 } |
7b883bf03b14
Artifacts upload using gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
452
diff
changeset
|
133 } |
7b883bf03b14
Artifacts upload using gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
452
diff
changeset
|
134 } |
452
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
135 |
459
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
136 |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
137 task findOutWhyProjectCopyDoesntWork() << { |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
138 // files under .hg/ are not copied with copy {} |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
139 ext.myjar = zipTree( 'test-data/test-repos.jar' ) |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
140 ext.destDir = new File(project.getBuildDir(), "hg4j-tests1/") |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
141 outputs.dir ext.destDir |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
142 CopySpec ss = copySpec { |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
143 from ext.myjar |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
144 into ext.destDir |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
145 include '*', '*/.*', '**/.*/*', '**/.*', '**/*', '*/.*/**', '**/**', '.*/**', '**/.hg/*', '**/.hg*' |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
146 eachFile {element -> |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
147 println "AAA:$element.relativePath" |
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 } |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
150 println "includeEmptyDir: $ss.includeEmptyDirs" |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
151 println "includes: $ss.includes" |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
152 println "allIncludes: $ss.allIncludes" |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
153 println "excludes: $ss.excludes" |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
154 println "allExcludes: $ss.allExcludes" |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
155 } |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
156 |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
157 |
452
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
158 test { |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
159 // <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
|
160 // <delete dir="${test-repos-root}" quiet="yes"/> |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
161 // <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
|
162 |
462
ad0322a4af20
Update tests not to fail with Mercurial 2.2 changes, run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
459
diff
changeset
|
163 File testReposRoot = new File(project.getBuildDir(), "hg4j-tests/"); |
459
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
164 if ( testReposRoot.exists() ) { |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
165 project.delete(testReposRoot) |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
166 } |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
167 testReposRoot.mkdirs(); |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
168 |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
169 zipTree('test-data/test-repos.jar').visit {element -> |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
170 element.copyTo(element.relativePath.getFile(testReposRoot)) |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
171 } |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
172 |
55e9588b84b8
Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
453
diff
changeset
|
173 systemProperties 'hg4j.tests.repos' : testReposRoot |
452
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
174 systemProperties 'hg4j.tests.remote' : 'http://hg.serpentine.com/tutorial/hello' |
7dcc920e2d57
Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
175 } |