Java 类org.gradle.api.ProjectConfigurationException 实例源码

项目:Reer    文件:DefaultProject.java   
@Override
public ProjectInternal bindAllModelRules() {
    try {
        getModelRegistry().bindAllReferences();
    } catch (Exception e) {
        throw new ProjectConfigurationException(String.format("A problem occurred configuring %s.", this), e);
    }
    return this;
}
项目:Reer    文件:TaskNameResolver.java   
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);
    }
}
项目:Reer    文件:TaskNameResolver.java   
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);
    }
}
项目:app-gradle-plugin    文件:DevAppServerHelper.java   
@VisibleForTesting
void validateServerVersion(String serverVersion) throws ProjectConfigurationException {
  if (!SERVER_VERSIONS.contains(serverVersion)) {
    throw new ProjectConfigurationException(
        "Invalid serverVersion '" + serverVersion + "' use one of " + SERVER_VERSIONS, null);
  }
}
项目:app-gradle-plugin    文件:DevAppServerRunTask.java   
/** 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);
}
项目:app-gradle-plugin    文件:DevAppServerHelperTest.java   
@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);
}
项目:app-gradle-plugin    文件:DevAppServerHelperTest.java   
@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);
}
项目:app-gradle-plugin    文件:DevAppServerHelperTest.java   
@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");
}
项目:Reer    文件:LifecycleProjectEvaluator.java   
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);
}
项目:app-gradle-plugin    文件:RunExtension.java   
public void setServerVersion(String serverVersion) throws ProjectConfigurationException {
  this.serverVersion = serverVersion;
}
项目:Pushjet-Android    文件:LifecycleProjectEvaluator.java   
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);
}
项目:Pushjet-Android    文件:LifecycleProjectEvaluator.java   
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);
}