use of org.gradle.api.internal.StartParameterInternal in project gradle by gradle.
the class BuildStateFactory method buildDefinitionFor.
public BuildDefinition buildDefinitionFor(File buildSrcDir, BuildState owner) {
PublicBuildPath publicBuildPath = owner.getMutableModel().getServices().get(PublicBuildPath.class);
StartParameterInternal buildSrcStartParameter = buildSrcStartParameterFor(buildSrcDir, owner.getMutableModel().getStartParameter());
BuildDefinition buildDefinition = BuildDefinition.fromStartParameterForBuild(buildSrcStartParameter, BUILD_SRC, buildSrcDir, PluginRequests.EMPTY, Actions.doNothing(), publicBuildPath, true);
@SuppressWarnings("deprecation") File customBuildFile = buildSrcStartParameter.getBuildFile();
assert customBuildFile == null;
return buildDefinition;
}
use of org.gradle.api.internal.StartParameterInternal in project gradle by gradle.
the class DefaultSettingsLoader method createEmptySettings.
// StartParameter.setSettingsFile() and StartParameter.getBuildFile()
@SuppressWarnings("deprecation")
private SettingsInternal createEmptySettings(GradleInternal gradle, StartParameter startParameter, ClassLoaderScope classLoaderScope) {
StartParameterInternal noSearchParameter = (StartParameterInternal) startParameter.newInstance();
noSearchParameter.setSettingsFile(null);
noSearchParameter.useEmptySettings();
noSearchParameter.doNotSearchUpwards();
BuildLayout layout = buildLayoutFactory.getLayoutFor(new BuildLayoutConfiguration(noSearchParameter));
SettingsInternal settings = findSettingsAndLoadIfAppropriate(gradle, noSearchParameter, layout, classLoaderScope);
// Set explicit build file, if required
@SuppressWarnings("deprecation") File customBuildFile = noSearchParameter.getBuildFile();
if (customBuildFile != null) {
ProjectDescriptor rootProject = settings.getRootProject();
rootProject.setBuildFileName(noSearchParameter.getBuildFile().getName());
}
return settings;
}
Aggregations