Skip to content
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.

Dev App Server v1 integration #113

Merged
merged 1 commit into from
Apr 6, 2017
Merged

Dev App Server v1 integration #113

merged 1 commit into from
Apr 6, 2017

Conversation

loosebazooka
Copy link
Contributor

@loosebazooka loosebazooka commented Apr 6, 2017

  • Services replaces AppYamls (setting AppYamls reveals deprecation warning)
  • By default, we use dev appserver v1
  • users can swap between v1 and v2 by setting
appengine {
  run {
    serverVersion = "1" or "2-alpha"
  }
}

String serverVersion = run.getServerVersion();
validator.validateServerVersion(serverVersion);

if (V1.equals(serverVersion)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could use switch instead


DefaultStopConfiguration stop = new DefaultStopConfiguration();

if (V1.equals(serverVersion)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could use switch instead

void validateServerVersion(String serverVersion) throws ProjectConfigurationException {
if (!SERVER_VERSIONS.contains(serverVersion)) {
throw new ProjectConfigurationException(
"Invalid serverVersion '" + serverVersion + "' please use " + SERVER_VERSIONS,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use one of

@@ -76,94 +76,14 @@ public void testDeploy_taskTree() throws IOException {
.withArguments("appengineDeploy", "--dry-run")
.build();

final List<String> expected = ImmutableList
.of(":compileJava", ":processResources", ":classes", ":war", ":explodeWar", ":assemble",
final List<String> expected = Arrays
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont' know? I'll change this back

public TemporaryFolder tmpDir = new TemporaryFolder();

@Rule
public ExpectedException exception = ExpectedException.none();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you don't expect exceptions, they you don't need this field.

return null;
@Deprecated
public void setAppYamls(Object appYamls) {
project.getLogger().warn("'appYamls' is deprecated, this parameter will set 'services'. Please use 'services' in the future.");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can leave out please.

- Services replaces AppYamls (setting AppYamls reveals deprecation warning)
- By default, we use dev appserver v1
- users can swap between v1 and v2 by setting
appengine {
  run {
    serverVersion = "1" or "2-alpha"
  }
}
@loosebazooka loosebazooka merged commit 1482d8d into master Apr 6, 2017
@loosebazooka loosebazooka deleted the appserver1 branch April 11, 2017 21:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants