diff --git a/com.ibm.wala.cast.java.test.data/build.gradle b/com.ibm.wala.cast.java.test.data/build.gradle index 77b06698e..3cca1be44 100644 --- a/com.ibm.wala.cast.java.test.data/build.gradle +++ b/com.ibm.wala.cast.java.test.data/build.gradle @@ -1,8 +1,9 @@ plugins { + id 'com.github.hauner.jarTest' version '1.0.1' id 'de.undercouch.download' version '3.3.0' } -sourceSets.main.java.srcDir 'src' +sourceSets.test.java.srcDir 'src' //////////////////////////////////////////////////////////////////////// @@ -30,4 +31,4 @@ clean { delete downloadJLex.dest.parent } -compileJava.dependsOn verifyJLex +compileTestJava.dependsOn verifyJLex diff --git a/com.ibm.wala.cast.java.test/build.gradle b/com.ibm.wala.cast.java.test/build.gradle index dbae67d16..ca9e41399 100644 --- a/com.ibm.wala.cast.java.test/build.gradle +++ b/com.ibm.wala.cast.java.test/build.gradle @@ -1,13 +1,17 @@ -sourceSets.main.java.srcDir 'src' +plugins { + id 'com.github.hauner.jarTest' version '1.0.1' +} + +sourceSets.test.java.srcDir 'src' dependencies { - compile project(':com.ibm.wala.cast') - compile project(':com.ibm.wala.cast.java') - compile project(':com.ibm.wala.core') - compile project(':com.ibm.wala.core.tests') - compile project(':com.ibm.wala.shrike') - compile project(':com.ibm.wala.util') - compile 'junit:junit:4.11' - compile 'org.eclipse.core:org.eclipse.core.runtime:3.10.0.v20140318-2214' - compile 'org.osgi:org.osgi.core:4.2.0' + testCompile 'junit:junit:4.11' + testCompile 'org.eclipse.core:org.eclipse.core.runtime:3.10.0.v20140318-2214' + testCompile 'org.osgi:org.osgi.core:4.2.0' + testCompile project(':com.ibm.wala.cast') + testCompile project(':com.ibm.wala.cast.java') + testCompile project(':com.ibm.wala.core') + testCompile project(':com.ibm.wala.shrike') + testCompile project(':com.ibm.wala.util') + testCompile project(configuration: 'testArchives', path: ':com.ibm.wala.core.tests') } diff --git a/com.ibm.wala.cast.js.html.nu_validator/build.gradle b/com.ibm.wala.cast.js.html.nu_validator/build.gradle index 88c76ab73..eccac5f9b 100644 --- a/com.ibm.wala.cast.js.html.nu_validator/build.gradle +++ b/com.ibm.wala.cast.js.html.nu_validator/build.gradle @@ -1,15 +1,16 @@ sourceSets { - main.java.srcDirs = ['src', 'tests'] + main.java.srcDir 'src' + test.java.srcDir 'tests' } dependencies { - compile project(':com.ibm.wala.util') compile project(':com.ibm.wala.cast') compile project(':com.ibm.wala.cast.js') - compile project(':com.ibm.wala.cast.js.rhino.test') - compile project(':com.ibm.wala.cast.test') - compile project(':com.ibm.wala.cast.js.test') - compile project(':com.ibm.wala.core.tests') + compile project(':com.ibm.wala.util') compile 'nu.validator.htmlparser:htmlparser:1.4' -} + testCompile project(configuration: 'testArchives', path: ':com.ibm.wala.cast.js.rhino.test') + testCompile project(configuration: 'testArchives', path: ':com.ibm.wala.cast.js.test') + testCompile project(':com.ibm.wala.cast.test') + testCompile project(':com.ibm.wala.core.tests') +} diff --git a/com.ibm.wala.cast.js.nodejs.test/build.gradle b/com.ibm.wala.cast.js.nodejs.test/build.gradle index 7f109323f..412a10419 100644 --- a/com.ibm.wala.cast.js.nodejs.test/build.gradle +++ b/com.ibm.wala.cast.js.nodejs.test/build.gradle @@ -1,10 +1,10 @@ -sourceSets.main { +sourceSets.test { java.srcDir 'src' resources.srcDir 'testdata' } dependencies { - compile project(':com.ibm.wala.cast.js.nodejs') - compile project(':com.ibm.wala.core') - compile 'junit:junit:4.11' + testCompile 'junit:junit:4.11' + testCompile project(':com.ibm.wala.cast.js.nodejs') + testCompile project(':com.ibm.wala.core') } diff --git a/com.ibm.wala.cast.js.rhino.test/build.gradle b/com.ibm.wala.cast.js.rhino.test/build.gradle index cf27d7408..f5a43f851 100644 --- a/com.ibm.wala.cast.js.rhino.test/build.gradle +++ b/com.ibm.wala.cast.js.rhino.test/build.gradle @@ -1,14 +1,18 @@ -sourceSets.main.java.srcDir 'harness-src' +plugins { + id 'com.github.hauner.jarTest' version '1.0.1' +} + +sourceSets.test.java.srcDir 'harness-src' dependencies { - compile project(':com.ibm.wala.cast.js.rhino') - compile project(':com.ibm.wala.shrike') - compile project(':com.ibm.wala.util') - compile project(':com.ibm.wala.cast') - compile project(':com.ibm.wala.core') - compile project(':com.ibm.wala.core.tests') - compile project(':com.ibm.wala.cast.js') - compile project(':com.ibm.wala.cast.js.test') - compile project(':com.ibm.wala.cast.test') - compile 'junit:junit:4.11' + testCompile 'junit:junit:4.11' + testCompile project(':com.ibm.wala.cast') + testCompile project(':com.ibm.wala.cast.js') + testCompile project(':com.ibm.wala.cast.js.rhino') + testCompile project(':com.ibm.wala.core') + testCompile project(':com.ibm.wala.shrike') + testCompile project(':com.ibm.wala.util') + testCompile project(configuration: 'testArchives', path: ':com.ibm.wala.cast.js.test') + testCompile project(configuration: 'testArchives', path: ':com.ibm.wala.cast.test') + testCompile project(configuration: 'testArchives', path: ':com.ibm.wala.core.tests') } diff --git a/com.ibm.wala.cast.js.test/build.gradle b/com.ibm.wala.cast.js.test/build.gradle index 95d182222..ee6135640 100644 --- a/com.ibm.wala.cast.js.test/build.gradle +++ b/com.ibm.wala.cast.js.test/build.gradle @@ -1,15 +1,19 @@ -sourceSets.main.java.srcDir 'harness-src' +plugins { + id 'com.github.hauner.jarTest' version '1.0.1' +} + +sourceSets.test.java.srcDir 'harness-src' dependencies { - compile project(':com.ibm.wala.cast.js.rhino') - compile project(':com.ibm.wala.util') - compile project(':com.ibm.wala.cast') - compile project(':com.ibm.wala.core') - compile project(':com.ibm.wala.cast.test') - compile project(':com.ibm.wala.core.tests') - compile project(':com.ibm.wala.cast.js') - compile project(':com.ibm.wala.shrike') - compile 'junit:junit:4.11' + testCompile 'junit:junit:4.11' + testCompile project(':com.ibm.wala.cast') + testCompile project(':com.ibm.wala.cast.js') + testCompile project(':com.ibm.wala.cast.js.rhino') + testCompile project(':com.ibm.wala.core') + testCompile project(':com.ibm.wala.shrike') + testCompile project(':com.ibm.wala.util') + testCompile project(configuration: 'testArchives', path: ':com.ibm.wala.cast.test') + testCompile project(configuration: 'testArchives', path: ':com.ibm.wala.core.tests') } processTestResources.dependsOn tasks.getByPath(':com.ibm.wala.cast.js.test.data:unversionAjaxslt') diff --git a/com.ibm.wala.cast.js/build.gradle b/com.ibm.wala.cast.js/build.gradle index 2576c4998..78621ffea 100644 --- a/com.ibm.wala.cast.js/build.gradle +++ b/com.ibm.wala.cast.js/build.gradle @@ -4,11 +4,11 @@ sourceSets.main { } dependencies { - compile project(':com.ibm.wala.util') - compile project(':com.ibm.wala.core') - compile project(':com.ibm.wala.shrike') - compile project(':com.ibm.wala.core.tests') compile project(':com.ibm.wala.cast') + compile project(':com.ibm.wala.core') + // compile project(':com.ibm.wala.core.tests') + compile project(':com.ibm.wala.shrike') + compile project(':com.ibm.wala.util') compile 'commons-io:commons-io:2.4' compile 'net.htmlparser.jericho:jericho-html:3.2' } diff --git a/com.ibm.wala.cast.test/build.gradle b/com.ibm.wala.cast.test/build.gradle index d09b9e2c0..c40384d95 100644 --- a/com.ibm.wala.cast.test/build.gradle +++ b/com.ibm.wala.cast.test/build.gradle @@ -1,10 +1,14 @@ -sourceSets.main.java.srcDir 'harness-src/java' +plugins { + id 'com.github.hauner.jarTest' version '1.0.1' +} + +sourceSets.test.java.srcDir 'harness-src/java' // TODO: hook up harness-src/c somehow dependencies { - compile project(':com.ibm.wala.cast') - compile project(':com.ibm.wala.core') - compile project(':com.ibm.wala.core.tests') - compile project(':com.ibm.wala.util') - compile 'junit:junit:4.11' + testCompile 'junit:junit:4.11' + testCompile project(':com.ibm.wala.cast') + testCompile project(':com.ibm.wala.core') + testCompile project(':com.ibm.wala.util') + testCompile project(configuration: 'testArchives', path: ':com.ibm.wala.core.tests') } diff --git a/com.ibm.wala.cast/build.gradle b/com.ibm.wala.cast/build.gradle index ab30439b7..16bf31bad 100644 --- a/com.ibm.wala.cast/build.gradle +++ b/com.ibm.wala.cast/build.gradle @@ -4,6 +4,5 @@ dependencies { compile project(':com.ibm.wala.util') compile project(':com.ibm.wala.shrike') compile project(':com.ibm.wala.core') - compile project(':com.ibm.wala.core.tests') compile 'commons-io:commons-io:2.4' } diff --git a/com.ibm.wala.core.testdata/build.gradle b/com.ibm.wala.core.testdata/build.gradle index 1a33ef200..3e87b3b2b 100644 --- a/com.ibm.wala.core.testdata/build.gradle +++ b/com.ibm.wala.core.testdata/build.gradle @@ -1 +1 @@ -sourceSets.main.java.srcDir 'src' +sourceSets.test.java.srcDir 'src' diff --git a/com.ibm.wala.core.tests/build.gradle b/com.ibm.wala.core.tests/build.gradle index 36b10f943..b8947e4bf 100644 --- a/com.ibm.wala.core.tests/build.gradle +++ b/com.ibm.wala.core.tests/build.gradle @@ -1,15 +1,19 @@ -sourceSets.main { +plugins { + id 'com.github.hauner.jarTest' version '1.0.1' +} + +sourceSets.test { java.srcDir 'src' resources.srcDir 'dat' } dependencies { - compile project(':com.ibm.wala.core') - compile project(':com.ibm.wala.shrike') - compile project(':com.ibm.wala.util') - compile 'junit:junit:4.11' - compile 'org.apache.ant:ant:1.8.2' - compile 'org.eclipse.core:org.eclipse.core.runtime:3.10.0.v20140318-2214' - compile 'org.hamcrest:hamcrest-core:1.3' - compile 'org.osgi:org.osgi.core:4.2.0' + testCompile 'junit:junit:4.11' + testCompile 'org.apache.ant:ant:1.8.2' + testCompile 'org.eclipse.core:org.eclipse.core.runtime:3.10.0.v20140318-2214' + testCompile 'org.hamcrest:hamcrest-core:1.3' + testCompile 'org.osgi:org.osgi.core:4.2.0' + testCompile project(':com.ibm.wala.core') + testCompile project(':com.ibm.wala.shrike') + testCompile project(':com.ibm.wala.util') } diff --git a/com.ibm.wala.dalvik.test/build.gradle b/com.ibm.wala.dalvik.test/build.gradle index ba53c3ee4..d529ea547 100644 --- a/com.ibm.wala.dalvik.test/build.gradle +++ b/com.ibm.wala.dalvik.test/build.gradle @@ -1,15 +1,15 @@ -sourceSets.main { +sourceSets.test { java.srcDir 'source' resources.srcDir 'data' } dependencies { - compile project(':com.ibm.wala.core') - compile project(':com.ibm.wala.core.tests') - compile project(':com.ibm.wala.dalvik') - compile project(':com.ibm.wala.shrike') - compile project(':com.ibm.wala.util') - compile 'com.google.android.tools:dx:1.7' - compile 'junit:junit:4.11' - compile 'org.osgi:org.osgi.core:4.2.0' + testCompile 'com.google.android.tools:dx:1.7' + testCompile 'junit:junit:4.11' + testCompile 'org.osgi:org.osgi.core:4.2.0' + testCompile project(':com.ibm.wala.core') + testCompile project(':com.ibm.wala.dalvik') + testCompile project(':com.ibm.wala.shrike') + testCompile project(':com.ibm.wala.util') + testCompile project(configuration: 'testArchives', path: ':com.ibm.wala.core.tests') } diff --git a/com.ibm.wala.ide.jdt.test/build.gradle b/com.ibm.wala.ide.jdt.test/build.gradle index 40aba4407..8bbd93669 100644 --- a/com.ibm.wala.ide.jdt.test/build.gradle +++ b/com.ibm.wala.ide.jdt.test/build.gradle @@ -1,23 +1,23 @@ -sourceSets.main { +sourceSets.test { java.srcDir 'source' resources.srcDir 'testdata' } dependencies { - compile project(':com.ibm.wala.cast') - compile project(':com.ibm.wala.cast.java') - compile project(':com.ibm.wala.cast.java.ecj') - compile project(':com.ibm.wala.cast.java.test') - compile project(':com.ibm.wala.core') - compile project(':com.ibm.wala.core.tests') - compile project(':com.ibm.wala.ide') - compile project(':com.ibm.wala.ide.jdt') - compile project(':com.ibm.wala.ide.tests') - compile project(':com.ibm.wala.shrike') - compile project(':com.ibm.wala.util') - compile 'junit:junit:4.11' - compile 'org.eclipse.core:org.eclipse.core.runtime:3.10.0.v20140318-2214' - compile 'org.eclipse.jdt:org.eclipse.jdt.core:3.13.50' - compile 'org.eclipse.platform:org.eclipse.core.runtime:3.13.0' - runtime 'org.eclipse.platform:org.eclipse.osgi:3.12.50' + testCompile 'junit:junit:4.11' + testCompile 'org.eclipse.core:org.eclipse.core.runtime:3.10.0.v20140318-2214' + testCompile 'org.eclipse.jdt:org.eclipse.jdt.core:3.13.50' + testCompile 'org.eclipse.platform:org.eclipse.core.runtime:3.13.0' + testCompile project(':com.ibm.wala.cast') + testCompile project(':com.ibm.wala.cast.java') + testCompile project(':com.ibm.wala.cast.java.ecj') + testCompile project(':com.ibm.wala.core') + testCompile project(':com.ibm.wala.ide') + testCompile project(':com.ibm.wala.ide.jdt') + testCompile project(':com.ibm.wala.shrike') + testCompile project(':com.ibm.wala.util') + testCompile project(configuration: 'testArchives', path: ':com.ibm.wala.cast.java.test') + testCompile project(configuration: 'testArchives', path: ':com.ibm.wala.core.tests') + testCompile project(configuration: 'testArchives', path: ':com.ibm.wala.ide.tests') + testRuntime 'org.eclipse.platform:org.eclipse.osgi:3.12.50' } diff --git a/com.ibm.wala.ide.jsdt.tests/build.gradle b/com.ibm.wala.ide.jsdt.tests/build.gradle index 6c00d17e6..5b8b696cb 100644 --- a/com.ibm.wala.ide.jsdt.tests/build.gradle +++ b/com.ibm.wala.ide.jsdt.tests/build.gradle @@ -1,18 +1,18 @@ -sourceSets.main.java.srcDir 'src' +sourceSets.test.java.srcDir 'src' dependencies { - compile project(':com.ibm.wala.cast') - compile project(':com.ibm.wala.cast.js') - compile project(':com.ibm.wala.cast.js.rhino') - compile project(':com.ibm.wala.core') - compile project(':com.ibm.wala.ide.jsdt') - compile project(':com.ibm.wala.ide.tests') - compile project(':com.ibm.wala.util') - compile 'junit:junit:4.11' - compile 'org.eclipse.core:org.eclipse.core.runtime:3.10.0.v20140318-2214' - compile 'org.eclipse.platform:org.eclipse.core.runtime:3.13.0' - compile 'org.eclipse.platform:org.eclipse.equinox.common:3.9.0' - compile 'org.eclipse.platform:org.eclipse.osgi:3.12.50' - compile 'org.eclipse.wst.jsdt:core:1.0.201.v2010012803' - compile 'org.osgi:org.osgi.core:4.2.0' + testCompile 'junit:junit:4.11' + testCompile 'org.eclipse.core:org.eclipse.core.runtime:3.10.0.v20140318-2214' + testCompile 'org.eclipse.platform:org.eclipse.core.runtime:3.13.0' + testCompile 'org.eclipse.platform:org.eclipse.equinox.common:3.9.0' + testCompile 'org.eclipse.platform:org.eclipse.osgi:3.12.50' + testCompile 'org.eclipse.wst.jsdt:core:1.0.201.v2010012803' + testCompile 'org.osgi:org.osgi.core:4.2.0' + testCompile project(':com.ibm.wala.cast') + testCompile project(':com.ibm.wala.cast.js') + testCompile project(':com.ibm.wala.cast.js.rhino') + testCompile project(':com.ibm.wala.core') + testCompile project(':com.ibm.wala.ide.jsdt') + testCompile project(':com.ibm.wala.util') + testCompile project(configuration: 'testArchives', path: ':com.ibm.wala.ide.tests') } diff --git a/com.ibm.wala.ide.tests/build.gradle b/com.ibm.wala.ide.tests/build.gradle index 91109c91f..905ed5367 100644 --- a/com.ibm.wala.ide.tests/build.gradle +++ b/com.ibm.wala.ide.tests/build.gradle @@ -1,18 +1,22 @@ -sourceSets.main.java.srcDir 'src' +plugins { + id 'com.github.hauner.jarTest' version '1.0.1' +} + +sourceSets.test.java.srcDir 'src' dependencies { - compile project(':com.ibm.wala.core') - compile project(':com.ibm.wala.core.tests') - compile project(':com.ibm.wala.ide') - compile project(':com.ibm.wala.util') - compile 'org.eclipse.core:org.eclipse.core.runtime:3.10.0.v20140318-2214' - compile 'org.eclipse.platform:org.eclipse.core.resources:3.12.0' - compile 'org.eclipse.platform:org.eclipse.core.runtime:3.13.0' - compile 'org.eclipse.platform:org.eclipse.equinox.common:3.9.0' - compile 'org.eclipse.platform:org.eclipse.jface:3.13.1' - compile 'org.eclipse.platform:org.eclipse.osgi:3.12.50' - compile 'org.eclipse.platform:org.eclipse.ui.ide:3.13.1' - compile 'org.eclipse.platform:org.eclipse.ui.workbench:3.110.1' - compile 'org.osgi:org.osgi.core:4.2.0' - runtime project(':com.ibm.wala.ide.jdt') + testCompile 'org.eclipse.core:org.eclipse.core.runtime:3.10.0.v20140318-2214' + testCompile 'org.eclipse.platform:org.eclipse.core.resources:3.12.0' + testCompile 'org.eclipse.platform:org.eclipse.core.runtime:3.13.0' + testCompile 'org.eclipse.platform:org.eclipse.equinox.common:3.9.0' + testCompile 'org.eclipse.platform:org.eclipse.jface:3.13.1' + testCompile 'org.eclipse.platform:org.eclipse.osgi:3.12.50' + testCompile 'org.eclipse.platform:org.eclipse.ui.ide:3.13.1' + testCompile 'org.eclipse.platform:org.eclipse.ui.workbench:3.110.1' + testCompile 'org.osgi:org.osgi.core:4.2.0' + testCompile project(':com.ibm.wala.core') + testCompile project(':com.ibm.wala.ide') + testCompile project(':com.ibm.wala.util') + testCompile project(configuration: 'testArchives', path: ':com.ibm.wala.core.tests') + testRuntime project(':com.ibm.wala.ide.jdt') }