Download "android-4.1.1.4.jar" (as "android.jar") when needed
Previously Maven did this, but Gradle did not. So Gradle testing would only succeed if we'd already done a Maven build first. Now these tests pass in a fresh tree that's never seen a Maven build.
This commit is contained in:
parent
141e4a6b41
commit
cad94b7076
|
@ -17,6 +17,7 @@ dependencies {
|
|||
project(':com.ibm.wala.util'),
|
||||
project(configuration: 'testArchives', path: ':com.ibm.wala.core.tests'),
|
||||
)
|
||||
testRuntime 'com.google.android:android:4.1.1.4'
|
||||
}
|
||||
|
||||
task cloneDroidBench(type: Exec) {
|
||||
|
@ -29,9 +30,24 @@ task cloneDroidBench(type: Exec) {
|
|||
// TODO: should check out a specific tag or hash
|
||||
}
|
||||
|
||||
// TODO: can Gradle's dependency system manage this download for us?
|
||||
task downloadAndroidJar(type: de.undercouch.gradle.tasks.download.Download) {
|
||||
src 'http://central.maven.org/maven2/com/google/android/android/4.1.1.4/android-4.1.1.4.jar'
|
||||
dest new File(temporaryDir, 'android.jar')
|
||||
overwrite false
|
||||
}
|
||||
|
||||
task verifyAndroidJar(type: VerifyWithStamp, dependsOn: downloadAndroidJar) {
|
||||
src files(downloadAndroidJar)[0]
|
||||
checksum '88be04f4d84d58fadee2e780a322fdb9'
|
||||
}
|
||||
|
||||
processTestResources {
|
||||
dependsOn cloneDroidBench
|
||||
|
||||
dependsOn verifyAndroidJar
|
||||
from downloadAndroidJar
|
||||
|
||||
def testdata = project(':com.ibm.wala.core.testdata')
|
||||
dependsOn testdata.verifyJavaCup
|
||||
from testdata.collectJLex
|
||||
|
|
Loading…
Reference in New Issue