本文整理汇总了Java中org.gradle.api.initialization.Settings类的典型用法代码示例。如果您正苦于以下问题:Java Settings类的具体用法?Java Settings怎么用?Java Settings使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Settings类属于org.gradle.api.initialization包,在下文中一共展示了Settings类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getDynamicTarget
import org.gradle.api.initialization.Settings; //导入依赖的package包/类
@Override
protected DynamicObject getDynamicTarget() {
if (inPluginRepositoriesBlock) {
return new ExtraPropertiesDynamicObjectAdapter(Settings.class, ((ExtensibleDynamicObject) super.getDynamicTarget()).getDynamicProperties());
} else {
return super.getDynamicTarget();
}
}
示例2: apply
import org.gradle.api.initialization.Settings; //导入依赖的package包/类
@Override
public void apply(Settings settings) {
String pluginHost = getPortalHost(settings);
PluginManifest pluginManifest = new ManifestRetriever(settings, pluginHost).getAvailablePlugins();
settings.getPluginManagement().resolutionStrategy(new ResolutionStrategyAction(pluginManifest));
settings.getPluginManagement().repositories(new RepositoryConfigurationAction(pluginManifest));
}
示例3: getPortalHost
import org.gradle.api.initialization.Settings; //导入依赖的package包/类
/**
* @return The plugin portal host.
*/
private String getPortalHost(Settings settings) {
Map<String, String> projectProperties = settings.getGradle().getStartParameter().getProjectProperties();
if (projectProperties.containsKey("plugin.portal.host")) {
return projectProperties.get("plugin.portal.host");
}
throw new GradleException("Property plugin.portal.host is unset!");
}
示例4: testApplyPlugin
import org.gradle.api.initialization.Settings; //导入依赖的package包/类
@Test
public void testApplyPlugin() {
Settings settings = mock(Settings.class);
BuildCacheConfiguration conf = mock(BuildCacheConfiguration.class);
when(settings.getBuildCache()).thenReturn(conf);
AwsS3Plugin plugin = new AwsS3Plugin();
plugin.apply(settings);
verify(conf).registerBuildCacheService(AwsS3BuildCache.class, AwsS3BuildCacheServiceFactory.class);
}
示例5: apply
import org.gradle.api.initialization.Settings; //导入依赖的package包/类
@Override
public void apply(Settings settings) {
settings
.getBuildCache()
.registerBuildCacheService(
CloudStorageBuildCache.class, CloudStorageBuildCacheServiceFactory.class);
}
示例6: getSettings
import org.gradle.api.initialization.Settings; //导入依赖的package包/类
public Settings getSettings() {
return this;
}
示例7: configure
import org.gradle.api.initialization.Settings; //导入依赖的package包/类
public void configure(CommandLineParser parser) {
parser.option(NO_SEARCH_UPWARDS, "no-search-upward").hasDescription(String.format("Don't search in parent folders for a %s file.", Settings.DEFAULT_SETTINGS_FILE));
parser.option(PROJECT_DIR, "project-dir").hasArgument().hasDescription("Specifies the start directory for Gradle. Defaults to current directory.");
parser.option(GRADLE_USER_HOME, "gradle-user-home").hasArgument().hasDescription("Specifies the gradle user home directory.");
}
示例8: settingsEvaluated
import org.gradle.api.initialization.Settings; //导入依赖的package包/类
public void settingsEvaluated(Settings settings) {
buildProfile.setSettingsEvaluated(timeProvider.getCurrentTime());
}
示例9: settingsEvaluated
import org.gradle.api.initialization.Settings; //导入依赖的package包/类
public void settingsEvaluated(Settings settings) {
}
示例10: settingsEvaluated
import org.gradle.api.initialization.Settings; //导入依赖的package包/类
public void settingsEvaluated(Settings settings) {
SettingsInternal settingsInternal = (SettingsInternal) settings;
logger.info("Settings evaluated using {}.",
settingsInternal.getSettingsScript().getDisplayName());
}
示例11: settingsEvaluated
import org.gradle.api.initialization.Settings; //导入依赖的package包/类
public void settingsEvaluated(Settings settings) {
if (settings.getGradle() == gradle) {
logger.settingsEvaluated();
}
}
示例12: ManifestRetriever
import org.gradle.api.initialization.Settings; //导入依赖的package包/类
public ManifestRetriever(Settings settings, String pluginHost) {
this.settings = settings;
this.pluginHost = pluginHost;
}
示例13: apply
import org.gradle.api.initialization.Settings; //导入依赖的package包/类
@Override
public void apply(Settings settings) {
logger.info("Registering S3 build cache");
BuildCacheConfiguration buildCacheConfiguration = settings.getBuildCache();
buildCacheConfiguration.registerBuildCacheService(AwsS3BuildCache.class, AwsS3BuildCacheServiceFactory.class);
}
示例14: settingsEvaluated
import org.gradle.api.initialization.Settings; //导入依赖的package包/类
public void settingsEvaluated(Settings settings) {
SettingsInternal settingsInternal = (SettingsInternal) settings;
logger.info(String.format("Settings evaluated using %s.",
settingsInternal.getSettingsScript().getDisplayName()));
}
示例15: settingsEvaluated
import org.gradle.api.initialization.Settings; //导入依赖的package包/类
@Override
public void settingsEvaluated(Settings settings) {
checkNotNull(settings);
}