WALA/com.ibm.wala.core.tests/build.gradle
Ben Liblit d9f7abdad3 Augment cleanTest tasks rather than replacing them
Previously I hadn't realized that Gradle's "java" plugin would generate
default "cleanTest" tasks for us.  By defining my own "cleanTest" tasks
we were replacing the generated ones, but what we really wanted to do
was augment them with additional files to delete.
2018-08-11 12:36:22 -05:00

53 lines
1.2 KiB
Groovy

plugins {
id 'com.github.hauner.jarTest'
id 'eclipse'
}
eclipse.project.natures 'org.eclipse.pde.PluginNature'
sourceSets.test {
java.srcDirs = ['src']
resources.srcDirs = ['dat']
}
dependencies {
testCompile(
'eclipse-deps:org.eclipse.core.runtime:+',
'junit:junit:4.12',
'org.apache.ant:ant:1.8.2',
'org.hamcrest:hamcrest-core:1.3',
'org.osgi:org.osgi.core:4.2.0',
project(':com.ibm.wala.core'),
project(':com.ibm.wala.shrike'),
project(':com.ibm.wala.util'),
)
}
processTestResources {
def testdata = project(':com.ibm.wala.core.testdata')
dependsOn testdata.compileTestJava
dependsOn testdata.extractBcel
from testdata.collectJLex
from testdata.collectTestData
from testdata.downloadJavaCup
from files(testdata.extractBcel)[0]
from testdata.generateHelloHashJar
from testdata.extractKawa
from testdata.buildChessJar
from testdata.buildKawaTestJar
}
test {
maxHeapSize = '800M'
systemProperty 'com.ibm.wala.junit.analyzingJar', 'true'
systemProperty 'com.ibm.wala.junit.profile', 'short'
classpath += files project(':com.ibm.wala.core.testdata').sourceSets.test.java.outputDir
}
task cleanTestExtras(type: Delete) {
delete 'report'
}
cleanTest.dependsOn cleanTestExtras