Search in sources :

Example 6 with SettingsInternal

use of org.gradle.api.internal.SettingsInternal in project gradle by gradle.

the class BuildLogger method settingsEvaluated.

public void settingsEvaluated(Settings settings) {
    SettingsInternal settingsInternal = (SettingsInternal) settings;
    logger.info("Settings evaluated using {}.", settingsInternal.getSettingsScript().getDisplayName());
}
Also used : SettingsInternal(org.gradle.api.internal.SettingsInternal)

Example 7 with SettingsInternal

use of org.gradle.api.internal.SettingsInternal in project gradle by gradle.

the class DefaultSettingsLoader method findAndLoadSettings.

@Override
public SettingsInternal findAndLoadSettings(GradleInternal gradle) {
    StartParameter startParameter = gradle.getStartParameter();
    SettingsInternal settings = findSettingsAndLoadIfAppropriate(gradle, startParameter);
    ProjectSpec spec = ProjectSpecs.forStartParameter(startParameter, settings);
    if (spec.containsProject(settings.getProjectRegistry())) {
        setDefaultProject(spec, settings);
        return settings;
    }
    deprecateWarningIfNecessary(startParameter, settings);
    // Try again with empty settings
    StartParameter noSearchParameter = startParameter.newInstance();
    noSearchParameter.useEmptySettings();
    settings = findSettingsAndLoadIfAppropriate(gradle, noSearchParameter);
    // Set explicit build file, if required
    if (noSearchParameter.getBuildFile() != null) {
        ProjectDescriptor rootProject = settings.getRootProject();
        rootProject.setBuildFileName(noSearchParameter.getBuildFile().getName());
    }
    setDefaultProject(spec, settings);
    return settings;
}
Also used : SettingsInternal(org.gradle.api.internal.SettingsInternal) StartParameter(org.gradle.StartParameter) ProjectDescriptor(org.gradle.api.initialization.ProjectDescriptor)

Example 8 with SettingsInternal

use of org.gradle.api.internal.SettingsInternal in project gradle by gradle.

the class DefaultSettingsLoaderFactory method defaultSettingsLoader.

private SettingsLoader defaultSettingsLoader() {
    final DefaultSettingsLoader delegate = new DefaultSettingsLoader(settingsFinder, settingsProcessor, buildSourceBuilder);
    return new SettingsLoader() {

        @Override
        public SettingsInternal findAndLoadSettings(GradleInternal gradle) {
            SettingsInternal settings = delegate.findAndLoadSettings(gradle);
            gradle.setSettings(settings);
            return settings;
        }
    };
}
Also used : SettingsInternal(org.gradle.api.internal.SettingsInternal) GradleInternal(org.gradle.api.internal.GradleInternal) CompositeBuildSettingsLoader(org.gradle.internal.composite.CompositeBuildSettingsLoader)

Example 9 with SettingsInternal

use of org.gradle.api.internal.SettingsInternal in project gradle by gradle.

the class SettingsEvaluatedCallbackFiringSettingsProcessor method process.

@Override
public SettingsInternal process(GradleInternal gradle, SettingsLocation settingsLocation, ClassLoaderScope buildRootClassLoaderScope, StartParameter startParameter) {
    SettingsInternal settings = delegate.process(gradle, settingsLocation, buildRootClassLoaderScope, startParameter);
    gradle.getBuildListenerBroadcaster().settingsEvaluated(settings);
    return settings;
}
Also used : SettingsInternal(org.gradle.api.internal.SettingsInternal)

Aggregations

SettingsInternal (org.gradle.api.internal.SettingsInternal)9 File (java.io.File)1 StartParameter (org.gradle.StartParameter)1 ProjectDescriptor (org.gradle.api.initialization.ProjectDescriptor)1 GradleInternal (org.gradle.api.internal.GradleInternal)1 BuildCacheController (org.gradle.caching.internal.controller.BuildCacheController)1 RootBuildCacheControllerRef (org.gradle.caching.internal.controller.RootBuildCacheControllerRef)1 IncludedBuildInternal (org.gradle.composite.internal.IncludedBuildInternal)1 GradleLauncher (org.gradle.initialization.GradleLauncher)1 IncludedBuildSpec (org.gradle.initialization.IncludedBuildSpec)1 CompositeBuildSettingsLoader (org.gradle.internal.composite.CompositeBuildSettingsLoader)1 Timer (org.gradle.internal.time.Timer)1