Java Code Examples for org.gradle.StartParameter#useEmptySettings()
The following examples show how to use
org.gradle.StartParameter#useEmptySettings() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SettingsHandler.java From pushfish-android with BSD 2-Clause "Simplified" License | 6 votes |
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; } // 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; }
Example 2
Source File: SettingsHandler.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 6 votes |
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; } // 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; }