I have an integration test source set in gradle, and it is dependent on my main classes being compiled. I set that up by doing
integrationTestClasses.dependsOn 'classes'
Is this the way to do it, or is there a way to setup dependencies on source sets so this happens automatically? In my configurations
block I already have
integrationTestCompile { extendsFrom testCompile }
integrationTestRuntime { extendsFrom integrationTestCompile, testRuntime }
What's missing is:
With this in place, task dependencies should be established automatically.
It is also possible to establish the dependency chain when defining the sourceSets. This worked to setup the "main" sourceSet to depend on a "generated" sourceSet:
The same principle should work to setup "integrationTest" to depend on "main".