本文整理汇总了Java中org.gradle.api.ProjectConfigurationException类的典型用法代码示例。如果您正苦于以下问题:Java ProjectConfigurationException类的具体用法?Java ProjectConfigurationException怎么用?Java ProjectConfigurationException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ProjectConfigurationException类属于org.gradle.api包,在下文中一共展示了ProjectConfigurationException类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: bindAllModelRules
import org.gradle.api.ProjectConfigurationException; //导入依赖的package包/类
@Override
public ProjectInternal bindAllModelRules() {
try {
getModelRegistry().bindAllReferences();
} catch (Exception e) {
throw new ProjectConfigurationException(String.format("A problem occurred configuring %s.", this), e);
}
return this;
}
示例2: discoverTasks
import org.gradle.api.ProjectConfigurationException; //导入依赖的package包/类
private static void discoverTasks(ProjectInternal project) {
try {
project.getTasks().discoverTasks();
} catch (Throwable e) {
throw new ProjectConfigurationException(String.format("A problem occurred configuring %s.", project), e);
}
}
示例3: getExistingTask
import org.gradle.api.ProjectConfigurationException; //导入依赖的package包/类
private static TaskInternal getExistingTask(ProjectInternal project, String taskName) {
try {
return (TaskInternal) project.getTasks().getByName(taskName);
} catch (Throwable e) {
throw new ProjectConfigurationException(String.format("A problem occurred configuring %s.", project), e);
}
}
示例4: validateServerVersion
import org.gradle.api.ProjectConfigurationException; //导入依赖的package包/类
@VisibleForTesting
void validateServerVersion(String serverVersion) throws ProjectConfigurationException {
if (!SERVER_VERSIONS.contains(serverVersion)) {
throw new ProjectConfigurationException(
"Invalid serverVersion '" + serverVersion + "' use one of " + SERVER_VERSIONS, null);
}
}
示例5: runAction
import org.gradle.api.ProjectConfigurationException; //导入依赖的package包/类
/** Task entrypoint : run the devappserver (blocking). */
@TaskAction
public void runAction() throws AppEngineException, ProjectConfigurationException {
CloudSdk sdk = cloudSdkBuilderFactory.newBuilder(getLogger()).build();
serverHelper.getAppServer(sdk, runConfig).run(runConfig);
}
示例6: testGetAppServer_badValue
import org.gradle.api.ProjectConfigurationException; //导入依赖的package包/类
@Test
public void testGetAppServer_badValue() {
when(run.getServerVersion()).thenReturn("nonsense");
exception.expect(ProjectConfigurationException.class);
exception.expectMessage(
"Invalid serverVersion 'nonsense' use one of " + DevAppServerHelper.SERVER_VERSIONS);
helper.getAppServer(sdk, run);
}
示例7: testGetStopConfiguration_badValue
import org.gradle.api.ProjectConfigurationException; //导入依赖的package包/类
@Test
public void testGetStopConfiguration_badValue() {
when(run.getServerVersion()).thenReturn("nonsense");
exception.expect(ProjectConfigurationException.class);
exception.expectMessage(
"Invalid serverVersion 'nonsense' use one of " + DevAppServerHelper.SERVER_VERSIONS);
helper.getStopConfiguration(run);
}
示例8: testValidator_badValue
import org.gradle.api.ProjectConfigurationException; //导入依赖的package包/类
@Test
public void testValidator_badValue() {
Validator validatorUnderTest = new Validator();
exception.expect(ProjectConfigurationException.class);
exception.expectMessage(
"Invalid serverVersion 'nonsense' use one of " + DevAppServerHelper.SERVER_VERSIONS);
validatorUnderTest.validateServerVersion("nonsense");
}
示例9: addConfigurationFailure
import org.gradle.api.ProjectConfigurationException; //导入依赖的package包/类
private void addConfigurationFailure(ProjectInternal project, ProjectStateInternal state, Exception e) {
ProjectConfigurationException failure = new ProjectConfigurationException(String.format("A problem occurred configuring %s.", project.getDisplayName()), e);
state.executed(failure);
}
示例10: setServerVersion
import org.gradle.api.ProjectConfigurationException; //导入依赖的package包/类
public void setServerVersion(String serverVersion) throws ProjectConfigurationException {
this.serverVersion = serverVersion;
}
示例11: addConfigurationFailure
import org.gradle.api.ProjectConfigurationException; //导入依赖的package包/类
private void addConfigurationFailure(ProjectInternal project, ProjectStateInternal state, Exception e) {
ProjectConfigurationException failure = new ProjectConfigurationException(String.format("A problem occurred configuring %s.", project), e);
state.executed(failure);
}