WALA itself does not use any JUnit 4.12 features. However, I am working on a WALA-based project that does require JUnit 4.12. Mixing jar versions is a path to madness. So if the WALA maintainers don't mind, it would make my life easier if WALA itself required JUnit 4.12. Otherwise, I need to maintain that 4.11/4.12 difference indefinitely as a divergence between official WALA and my WALA variant. I suppose an alternative could be to let the JUnit version be specified externally somehow. I have not explored this option in depth, but could look into it if simply moving to JUnit 4.12 is undesirable.
48 lines
1.1 KiB
Groovy
48 lines
1.1 KiB
Groovy
apply plugin: 'com.github.hauner.jarTest'
|
|
apply plugin: '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
|
|
}
|
|
|
|
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 cleanTest(type: Delete) {
|
|
delete 'report'
|
|
}
|
|
|
|
clean.dependsOn cleanTest
|