Mercurial > jhg
comparison build.gradle @ 459:55e9588b84b8
Run tests with gradle
| author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
|---|---|
| date | Tue, 19 Jun 2012 21:06:53 +0200 |
| parents | 7b883bf03b14 |
| children | ad0322a4af20 |
comparison
equal
deleted
inserted
replaced
| 458:c95cd5994ba2 | 459:55e9588b84b8 |
|---|---|
| 1 def isRelease = false | 1 def isRelease = false |
| 2 | 2 |
| 3 version = '0.9.0-SNAPSHOT' | 3 version = '0.9.5-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' |
| 113 } | 113 } |
| 114 } | 114 } |
| 115 } | 115 } |
| 116 } | 116 } |
| 117 | 117 |
| 118 | |
| 119 task findOutWhyProjectCopyDoesntWork() << { | |
| 120 // files under .hg/ are not copied with copy {} | |
| 121 ext.myjar = zipTree( 'test-data/test-repos.jar' ) | |
| 122 ext.destDir = new File(project.getBuildDir(), "hg4j-tests1/") | |
| 123 outputs.dir ext.destDir | |
| 124 CopySpec ss = copySpec { | |
| 125 from ext.myjar | |
| 126 into ext.destDir | |
| 127 include '*', '*/.*', '**/.*/*', '**/.*', '**/*', '*/.*/**', '**/**', '.*/**', '**/.hg/*', '**/.hg*' | |
| 128 eachFile {element -> | |
| 129 println "AAA:$element.relativePath" | |
| 130 } | |
| 131 } | |
| 132 println "includeEmptyDir: $ss.includeEmptyDirs" | |
| 133 println "includes: $ss.includes" | |
| 134 println "allIncludes: $ss.allIncludes" | |
| 135 println "excludes: $ss.excludes" | |
| 136 println "allExcludes: $ss.allExcludes" | |
| 137 } | |
| 138 | |
| 139 | |
| 118 test { | 140 test { |
| 119 // <property name="test-repos-root" value="${java.io.tmpdir}/hg4j-tests/"/> | 141 // <property name="test-repos-root" value="${java.io.tmpdir}/hg4j-tests/"/> |
| 120 // <delete dir="${test-repos-root}" quiet="yes"/> | 142 // <delete dir="${test-repos-root}" quiet="yes"/> |
| 121 // <unjar src="test-data/test-repos.jar" dest="${test-repos-root}"/> | 143 // <unjar src="test-data/test-repos.jar" dest="${test-repos-root}"/> |
| 122 | 144 |
| 123 systemProperties 'hg4j.tests.repos' : 'value' | 145 File testReposRoot = new File(project.getBuildDir(), "hg4j-tests2/"); |
| 146 if ( testReposRoot.exists() ) { | |
| 147 project.delete(testReposRoot) | |
| 148 } | |
| 149 testReposRoot.mkdirs(); | |
| 150 | |
| 151 zipTree('test-data/test-repos.jar').visit {element -> | |
| 152 element.copyTo(element.relativePath.getFile(testReposRoot)) | |
| 153 } | |
| 154 | |
| 155 systemProperties 'hg4j.tests.repos' : testReposRoot | |
| 124 systemProperties 'hg4j.tests.remote' : 'http://hg.serpentine.com/tutorial/hello' | 156 systemProperties 'hg4j.tests.remote' : 'http://hg.serpentine.com/tutorial/hello' |
| 125 } | 157 } |
