Search in sources :

Example 1 with IncludedBuildExecuter

use of org.gradle.initialization.IncludedBuildExecuter in project gradle by gradle.

the class CompositeBuildTaskDelegate method executeTasksInOtherBuild.

@TaskAction
public void executeTasksInOtherBuild() {
    IncludedBuilds includedBuilds = getServices().get(IncludedBuilds.class);
    IncludedBuildExecuter builder = getServices().get(IncludedBuildExecuter.class);
    IncludedBuild includedBuild = includedBuilds.getBuild(build);
    BuildIdentifier buildId = new DefaultBuildIdentifier(includedBuild.getName());
    // sourceBuild is currently always root build in a composite
    builder.execute(new DefaultBuildIdentifier(":", true), buildId, tasks);
}
Also used : DefaultBuildIdentifier(org.gradle.api.internal.artifacts.component.DefaultBuildIdentifier) BuildIdentifier(org.gradle.api.artifacts.component.BuildIdentifier) DefaultBuildIdentifier(org.gradle.api.internal.artifacts.component.DefaultBuildIdentifier) IncludedBuildExecuter(org.gradle.initialization.IncludedBuildExecuter) IncludedBuilds(org.gradle.initialization.IncludedBuilds) IncludedBuild(org.gradle.api.initialization.IncludedBuild) TaskAction(org.gradle.api.tasks.TaskAction)

Aggregations

BuildIdentifier (org.gradle.api.artifacts.component.BuildIdentifier)1 IncludedBuild (org.gradle.api.initialization.IncludedBuild)1 DefaultBuildIdentifier (org.gradle.api.internal.artifacts.component.DefaultBuildIdentifier)1 TaskAction (org.gradle.api.tasks.TaskAction)1 IncludedBuildExecuter (org.gradle.initialization.IncludedBuildExecuter)1 IncludedBuilds (org.gradle.initialization.IncludedBuilds)1