Properly distinguish main from test code, now that I know how

This commit is contained in:
Ben Liblit 2017-12-21 09:09:27 -06:00
parent a276932a10
commit 695cd2863c
15 changed files with 146 additions and 121 deletions

View File

@ -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

View File

@ -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')
}

View File

@ -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')
}

View File

@ -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')
}

View File

@ -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')
}

View File

@ -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')

View File

@ -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'
}

View File

@ -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')
}

View File

@ -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'
}

View File

@ -1 +1 @@
sourceSets.main.java.srcDir 'src'
sourceSets.test.java.srcDir 'src'

View File

@ -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')
}

View File

@ -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')
}

View File

@ -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'
}

View File

@ -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')
}

View File

@ -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')
}