Created
July 6, 2014 21:39
-
-
Save anonymous/2f595507c284846b1f57 to your computer and use it in GitHub Desktop.
gradle 2.0 multiproject build failing with integrationTest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// settings.gradle | |
include 'testing' | |
// testing/build.gradle | |
// empty. | |
// build.gradle .. adapted from samples/java/withIntegrationTest | |
allprojects { | |
apply plugin: 'java' | |
repositories { | |
mavenCentral() | |
} | |
sourceSets { | |
integrationTest { | |
java { srcDir file('src/integration-test/java') } | |
resources { srcDir file('src/integration-test/resources') } | |
} | |
} | |
dependencies { | |
testCompile 'junit:junit:4.11' | |
integrationTestCompile 'commons-collections:commons-collections:3.2' | |
integrationTestCompile sourceSets.main.output | |
integrationTestCompile configurations.testCompile | |
integrationTestCompile sourceSets.test.output | |
integrationTestRuntime configurations.testRuntime | |
} | |
task integrationTest(type: Test, dependsOn: jar) { | |
testClassesDir = sourceSets.integrationTest.output.classesDir | |
classpath = sourceSets.integrationTest.runtimeClasspath | |
systemProperties['jar.path'] = jar.archivePath | |
} | |
check.dependsOn integrationTest | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment