use of org.gradle.api.internal.SettingsInternal in project gradle by gradle.
the class DefaultIncludedBuildFactory method createBuild.
@Override
public ConfigurableIncludedBuild createBuild(File buildDirectory) {
validateBuildDirectory(buildDirectory);
Factory<GradleLauncher> factory = new ContextualGradleLauncherFactory(buildDirectory, nestedBuildFactory, startParameter);
DefaultIncludedBuild includedBuild = instantiator.newInstance(DefaultIncludedBuild.class, buildDirectory, factory, moduleIdentifierFactory);
SettingsInternal settingsInternal = includedBuild.getLoadedSettings();
validateIncludedBuild(includedBuild, settingsInternal);
return includedBuild;
}
use of org.gradle.api.internal.SettingsInternal in project gradle by gradle.
the class NotifyingSettingsLoader method findAndLoadSettings.
@Override
public SettingsInternal findAndLoadSettings(GradleInternal gradle) {
SettingsInternal settings = settingsLoader.findAndLoadSettings(gradle);
gradle.getBuildListenerBroadcaster().settingsEvaluated(settings);
buildLoader.load(settings.getRootProject(), settings.getDefaultProject(), gradle, settings.getRootClassLoaderScope());
gradle.getBuildListenerBroadcaster().projectsLoaded(gradle);
return settings;
}
use of org.gradle.api.internal.SettingsInternal in project gradle by gradle.
the class RootBuildCacheControllerSettingsProcessor method process.
@Override
public SettingsInternal process(GradleInternal gradle, SettingsLocation settingsLocation, ClassLoaderScope buildRootClassLoaderScope, StartParameter startParameter) {
SettingsInternal settings = delegate.process(gradle, settingsLocation, buildRootClassLoaderScope, startParameter);
if (gradle.getParent() == null) {
BuildCacheController rootController = gradle.getServices().get(BuildCacheController.class);
RootBuildCacheControllerRef rootControllerRef = gradle.getServices().get(RootBuildCacheControllerRef.class);
rootControllerRef.set(rootController);
}
return settings;
}
use of org.gradle.api.internal.SettingsInternal in project gradle by gradle.
the class ScriptEvaluatingSettingsProcessor method process.
public SettingsInternal process(GradleInternal gradle, SettingsLocation settingsLocation, ClassLoaderScope buildRootClassLoaderScope, StartParameter startParameter) {
Timer settingsProcessingClock = Time.startTimer();
Map<String, String> properties = propertiesLoader.mergeProperties(Collections.<String, String>emptyMap());
SettingsInternal settings = settingsFactory.createSettings(gradle, settingsLocation.getSettingsDir(), settingsLocation.getSettingsScriptSource(), properties, startParameter, buildRootClassLoaderScope);
applySettingsScript(settingsLocation, settings);
LOGGER.debug("Timing: Processing settings took: {}", settingsProcessingClock.getElapsed());
return settings;
}
use of org.gradle.api.internal.SettingsInternal 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