When IntelliJ IDEA imports WALA's Gradle configuration, it creates what is calls a "module" for each sourceSet of each Gradle subproject. In so doing, it automatically picks up the source and resource directories used by each of these sourceSets. Unfortunately, IntelliJ IDEA does not allow multiple modules to share a single root directory as their source or resource directories, and that's exactly what was going on with the "example-src" subdirectory under "com.ibm.wala.cast.js.test.data". This revised Gradle configuration still has is copying the necessary "example-src" resources to the appropriate locations for use as test resources. But IntelliJ IDEA no longer treats "example-src" as a root directory for resources in the automatically-generated modules. So now we get along nicer with IntelliJ IDEA while keeping everything working with Gradle as well.
30 lines
697 B
Groovy
30 lines
697 B
Groovy
sourceSets {
|
|
main.java.srcDirs = ['src']
|
|
test.java.srcDirs = ['tests']
|
|
}
|
|
|
|
dependencies {
|
|
compile(
|
|
'nu.validator.htmlparser:htmlparser:1.4',
|
|
project(':com.ibm.wala.cast'),
|
|
project(':com.ibm.wala.cast.js'),
|
|
project(':com.ibm.wala.util'),
|
|
)
|
|
testCompile(
|
|
project(':com.ibm.wala.cast.test'),
|
|
project(':com.ibm.wala.core.tests'),
|
|
project(configuration: 'testArchives', path: ':com.ibm.wala.cast.js.rhino.test'),
|
|
project(configuration: 'testArchives', path: ':com.ibm.wala.cast.js.test'),
|
|
)
|
|
}
|
|
|
|
processTestResources {
|
|
def data = project(':com.ibm.wala.cast.js.test.data')
|
|
dependsOn data.processTestResources
|
|
from data.sourceSets.test.resources
|
|
}
|
|
|
|
test {
|
|
maxHeapSize = '800M'
|
|
}
|