annotate build.gradle @ 682:f568330dd9c0

Compile with Java5, ensure generics are fine for other compilers, too
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Mon, 22 Jul 2013 22:47:06 +0200
parents a8ce405da1f5
children 6e7786086f77
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 {
7dcc920e2d57 Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
60 testCompile 'junit:junit:4.8.2'
7dcc920e2d57 Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
61 cliCompile 'junit:junit:4.8.2'
7dcc920e2d57 Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
62 cliCompile files(sourceSets.main.output) {
7dcc920e2d57 Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
63 builtBy compileJava
453
7b883bf03b14 Artifacts upload using gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 452
diff changeset
64 }
7b883bf03b14 Artifacts upload using gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 452
diff changeset
65 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
66 }
453
7b883bf03b14 Artifacts upload using gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 452
diff changeset
67
452
7dcc920e2d57 Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
68 def sharedMetaInf = {
7dcc920e2d57 Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
69 from project.file('COPYING')
7dcc920e2d57 Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
70 }
7dcc920e2d57 Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
71
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 task sourcesJar(type: Jar) {
7dcc920e2d57 Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
74 classifier = 'src'
7dcc920e2d57 Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
75 from sourceSets.main.java, sourceSets.test.java, sourceSets.cli.java
7dcc920e2d57 Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
76 metaInf sharedMetaInf
7dcc920e2d57 Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
77 }
7dcc920e2d57 Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
78
7dcc920e2d57 Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
79 task cmdlineJar(type: Jar) {
7dcc920e2d57 Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
80 appendix = 'console'
7dcc920e2d57 Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
81 from sourceSets.cli.output
7dcc920e2d57 Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
82 metaInf sharedMetaInf
7dcc920e2d57 Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
83 }
7dcc920e2d57 Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
84
7dcc920e2d57 Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
85 jar {
7dcc920e2d57 Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
86 manifest {
7dcc920e2d57 Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
87 attributes ("Implementation-Version": version)
7dcc920e2d57 Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
88 }
7dcc920e2d57 Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
89 metaInf sharedMetaInf
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
7dcc920e2d57 Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
92 artifacts {
7dcc920e2d57 Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
93 archives sourcesJar, cmdlineJar
7dcc920e2d57 Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
94 deployJars jar, sourcesJar
7dcc920e2d57 Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
95 }
7dcc920e2d57 Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
96
7dcc920e2d57 Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
97 install {
7dcc920e2d57 Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
98 configuration = configurations.deployJars
453
7b883bf03b14 Artifacts upload using gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 452
diff changeset
99 /*
452
7dcc920e2d57 Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
100 repositories.mavenDeployer {
7dcc920e2d57 Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
101 addFilter('f1') { artifact, file ->
7dcc920e2d57 Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
102 println file.name
7dcc920e2d57 Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
103 println artifact.ext
7dcc920e2d57 Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
104 println file.name - ('.' + artifact.ext)
7dcc920e2d57 Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
105 println ' '
7dcc920e2d57 Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
106 def fname = file.name - ('.' + artifact.ext)
7dcc920e2d57 Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
107 println fname.endsWith('src')
7dcc920e2d57 Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
108 fname.endsWith('src')
7dcc920e2d57 Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
109 }
7dcc920e2d57 Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
110 addFilter('f2') { artifact, file ->
7dcc920e2d57 Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
111 def fname = file.name - ('.' + artifact.ext)
7dcc920e2d57 Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
112 fname.endsWith('console')
7dcc920e2d57 Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
113 }
7dcc920e2d57 Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
114 addFilter('f3') { artifact, file ->
7dcc920e2d57 Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
115 def fname = file.name - ('.' + artifact.ext)
7dcc920e2d57 Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
116 fname.endsWith(version)
7dcc920e2d57 Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
117 }
7dcc920e2d57 Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
118 }
453
7b883bf03b14 Artifacts upload using gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 452
diff changeset
119 */
452
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
7b883bf03b14 Artifacts upload using gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 452
diff changeset
122 uploadArchives {
7b883bf03b14 Artifacts upload using gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 452
diff changeset
123 configuration = configurations.deployJars
7b883bf03b14 Artifacts upload using gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 452
diff changeset
124 repositories {
7b883bf03b14 Artifacts upload using gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 452
diff changeset
125 mavenDeployer {
7b883bf03b14 Artifacts upload using gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 452
diff changeset
126 configuration = configurations.deployJars
470
31bd09da0dcf Switch to 1.1 development
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 468
diff changeset
127 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
128 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
129 }
7b883bf03b14 Artifacts upload using gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 452
diff changeset
130 }
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 }
452
7dcc920e2d57 Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
133
459
55e9588b84b8 Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 453
diff changeset
134
55e9588b84b8 Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 453
diff changeset
135 task findOutWhyProjectCopyDoesntWork() << {
55e9588b84b8 Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 453
diff changeset
136 // files under .hg/ are not copied with copy {}
55e9588b84b8 Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 453
diff changeset
137 ext.myjar = zipTree( 'test-data/test-repos.jar' )
55e9588b84b8 Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 453
diff changeset
138 ext.destDir = new File(project.getBuildDir(), "hg4j-tests1/")
55e9588b84b8 Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 453
diff changeset
139 outputs.dir ext.destDir
55e9588b84b8 Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 453
diff changeset
140 CopySpec ss = copySpec {
55e9588b84b8 Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 453
diff changeset
141 from ext.myjar
55e9588b84b8 Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 453
diff changeset
142 into ext.destDir
55e9588b84b8 Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 453
diff changeset
143 include '*', '*/.*', '**/.*/*', '**/.*', '**/*', '*/.*/**', '**/**', '.*/**', '**/.hg/*', '**/.hg*'
55e9588b84b8 Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 453
diff changeset
144 eachFile {element ->
55e9588b84b8 Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 453
diff changeset
145 println "AAA:$element.relativePath"
55e9588b84b8 Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 453
diff changeset
146 }
55e9588b84b8 Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 453
diff changeset
147 }
55e9588b84b8 Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 453
diff changeset
148 println "includeEmptyDir: $ss.includeEmptyDirs"
55e9588b84b8 Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 453
diff changeset
149 println "includes: $ss.includes"
55e9588b84b8 Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 453
diff changeset
150 println "allIncludes: $ss.allIncludes"
55e9588b84b8 Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 453
diff changeset
151 println "excludes: $ss.excludes"
55e9588b84b8 Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 453
diff changeset
152 println "allExcludes: $ss.allExcludes"
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
452
7dcc920e2d57 Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
156 test {
7dcc920e2d57 Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
157 // <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
158 // <delete dir="${test-repos-root}" quiet="yes"/>
7dcc920e2d57 Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
159 // <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
160
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
161 File testReposRoot = new File(project.getBuildDir(), "hg4j-tests/");
459
55e9588b84b8 Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 453
diff changeset
162 if ( testReposRoot.exists() ) {
55e9588b84b8 Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 453
diff changeset
163 project.delete(testReposRoot)
55e9588b84b8 Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 453
diff changeset
164 }
55e9588b84b8 Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 453
diff changeset
165 testReposRoot.mkdirs();
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 zipTree('test-data/test-repos.jar').visit {element ->
55e9588b84b8 Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 453
diff changeset
168 element.copyTo(element.relativePath.getFile(testReposRoot))
55e9588b84b8 Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 453
diff changeset
169 }
55e9588b84b8 Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 453
diff changeset
170
55e9588b84b8 Run tests with gradle
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 453
diff changeset
171 systemProperties 'hg4j.tests.repos' : testReposRoot
452
7dcc920e2d57 Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
172 systemProperties 'hg4j.tests.remote' : 'http://hg.serpentine.com/tutorial/hello'
7dcc920e2d57 Moving towards gradle build
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
173 }