use of org.gradle.initialization.IncludedBuildSpec in project gradle by gradle.
the class CompositeBuildSettingsLoader method findAndLoadSettings.
@Override
public SettingsInternal findAndLoadSettings(GradleInternal gradle) {
SettingsInternal settings = delegate.findAndLoadSettings(gradle);
// Add included builds defined in settings
List<IncludedBuildSpec> includedBuilds = settings.getIncludedBuilds();
if (!includedBuilds.isEmpty()) {
for (IncludedBuildSpec includedBuildSpec : includedBuilds) {
// TODO: Allow builds to inject into explicitly included builds
IncludedBuildInternal includedBuild = includedBuildRegistry.addExplicitBuild(BuildDefinition.fromStartParameterForBuild(gradle.getStartParameter(), includedBuildSpec.rootDir, DefaultPluginRequests.EMPTY), nestedBuildFactory);
includedBuildSpec.configurer.execute(includedBuild.getModel());
}
}
// Add all included builds from the command-line
for (File rootDir : gradle.getStartParameter().getIncludedBuilds()) {
// TODO: Allow builds to inject into explicitly included builds
includedBuildRegistry.addExplicitBuild(BuildDefinition.fromStartParameterForBuild(gradle.getStartParameter(), rootDir, DefaultPluginRequests.EMPTY), nestedBuildFactory);
}
// Lock-in explicitly included builds
includedBuildRegistry.validateExplicitIncludedBuilds(settings);
return settings;
}
Aggregations