sourceSets.test { java.srcDirs = ['source'] resources.srcDirs = [ 'data', project(':com.ibm.wala.core.testdata').compileTestJava, ] } dependencies { testCompile( 'com.google.android.tools:dx:1.7', 'junit:junit:4.11', 'org.osgi:org.osgi.core:4.2.0', project(':com.ibm.wala.core'), project(':com.ibm.wala.dalvik'), project(':com.ibm.wala.shrike'), 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) { // TODO: download to somewhere private to this build tree; update code that looks in "/tmp" accordingly def destDir = file('/tmp/DroidBench') inputs.property('repository', 'https://github.com/secure-software-engineering/DroidBench.git') outputs.dirs destDir doFirst { delete destDir } commandLine 'git', 'clone', '--depth=1', inputs.properties.repository, destDir // 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 from testdata.downloadJavaCup } test { maxHeapSize = '800M' // https://github.com/liblit/WALA/issues/5 and possibly https://github.com/wala/WALA/issues/268 exclude '**/DalvikAnnotationsTest.class' exclude '**/DynamicDalvikComparisonJavaLibsTest.class' exclude '**/DynamicDalvikComparisonTestForAndroidLibs.class' exclude '**/JVMLDalvikComparisonTest.class' }