Make one source installed depending on another

I have an integration source installed in gradle and it depends on the compilation of my main classes. I installed this by doing

integrationTestClasses.dependsOn 'classes'

Is this a way to do this, or is there a way to establish dependencies on source sets so that this happens automatically? In my block configurationsI already have

integrationTestCompile { extendsFrom testCompile }
integrationTestRuntime { extendsFrom integrationTestCompile, testRuntime }
+16
source share
2 answers

What is missing:

dependencies {
    integrationTestCompile sourceSets.main.output
}

With this, on-site dependencies tasks should be installed automatically.

+23
source

. "main" sourceSet, "" sourceSet:

// Default sourceSets already created by the java plugin: src/main and src/test
// Default content for each sourceSet: /java and /resources
sourceSets {
    // Adding src/generated
    generated
    // Setting src/main to depend on the dependencies and output of src/generated
    main {
        compileClasspath += generated.compileClasspath + generated.output
    }
}

"integrationTest", "".

+1

All Articles