Fix issue with subproject test task dependencies (#41321) (#41351)

This commit is contained in:
Mark Vieira 2019-04-18 11:15:34 -07:00 committed by GitHub
parent 11dc9fe249
commit 0227ac5690
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -65,7 +65,7 @@ public class TestingConventionsTasks extends DefaultTask {
public TestingConventionsTasks() {
setDescription("Tests various testing conventions");
// Run only after everything is compiled
Boilerplate.getJavaSourceSets(getProject()).all(sourceSet -> dependsOn(sourceSet.getClassesTaskName()));
Boilerplate.getJavaSourceSets(getProject()).all(sourceSet -> dependsOn(sourceSet.getOutput().getClassesDirs()));
naming = getProject().container(TestingConventionRule.class);
}

View File

@ -15,6 +15,7 @@ subprojects {
test {
mainProject.sourceSets.test.output.classesDirs.each { dir ->
output.addClassesDir { dir }
output.builtBy(mainProject.tasks.testClasses)
}
runtimeClasspath += mainProject.sourceSets.test.output
}