From 43eec8ef9112ef6def0af22005e6b173c3b1e2c0 Mon Sep 17 00:00:00 2001 From: Appu Goundan Date: Wed, 2 Jan 2019 13:55:47 -0500 Subject: [PATCH 1/3] Move to plugins-core 0.7.2 - also changes extraFilesDirectory -> extraFilesDirectory --- build.gradle | 2 +- .../AppEngineAppYamlPluginIntegrationTest.java | 8 ++++---- ...AppEngineStandardPluginIntegrationTest.java | 8 ++++---- .../appyaml/AppEngineAppYamlPlugin.java | 2 +- .../appyaml/AppYamlDeployTargetResolver.java | 2 +- .../appyaml/StageAppYamlExtension.java | 18 +++++++++++------- .../appengine/appyaml/StageAppYamlTask.java | 7 +++---- .../core/AppEngineCorePluginConfiguration.java | 2 +- .../appengine/core/CheckCloudSdkTask.java | 12 ++++++------ .../appengine/core/CloudSdkLoginTask.java | 4 ++-- .../appengine/core/CloudSdkOperations.java | 16 ++++++++-------- .../gradle/appengine/core/ConfigReader.java | 12 ++++++------ .../gradle/appengine/core/DeployAllTask.java | 11 +++++------ .../gradle/appengine/core/DeployCronTask.java | 4 ++-- .../appengine/core/DeployDispatchTask.java | 4 ++-- .../gradle/appengine/core/DeployDosTask.java | 4 ++-- .../gradle/appengine/core/DeployExtension.java | 4 ++-- .../gradle/appengine/core/DeployIndexTask.java | 4 ++-- .../gradle/appengine/core/DeployQueueTask.java | 4 ++-- .../gradle/appengine/core/DeployTask.java | 6 +++--- .../gradle/appengine/core/GcloudTask.java | 2 +- .../GenRepoInfoFileExtension.java | 2 +- .../sourcecontext/GenRepoInfoFileTask.java | 4 ++-- .../sourcecontext/SourceContextPlugin.java | 2 +- .../standard/AppEngineStandardPlugin.java | 2 +- .../appengine/standard/DevAppServerHelper.java | 10 +++++----- .../standard/DevAppServerRunTask.java | 4 ++-- .../standard/DevAppServerStartTask.java | 10 +++++----- .../standard/DevAppServerStopTask.java | 10 +++++----- .../appengine/standard/RunExtension.java | 2 +- .../standard/StageStandardExtension.java | 7 ++++--- .../appengine/standard/StageStandardTask.java | 4 ++-- .../standard/StandardDeployTargetResolver.java | 2 +- .../util/io/FileOutputLineListener.java | 2 +- .../util/io/GradleLoggerOutputListener.java | 2 +- .../gradle/appengine/AppEnginePluginTest.java | 2 ++ .../AppYamlDeployTargetResolverTest.java | 12 ++++++------ .../appengine/core/CheckCloudSdkTaskTest.java | 14 +++++++------- .../appengine/core/DeployAllTaskTest.java | 12 ++++++------ .../standard/DevAppServerHelperTest.java | 14 +++++++------- .../StandardDeployTargetResolverTest.java | 12 ++++++------ 41 files changed, 135 insertions(+), 130 deletions(-) diff --git a/build.gradle b/build.gradle index 8d4f843a..308a4105 100644 --- a/build.gradle +++ b/build.gradle @@ -36,7 +36,7 @@ group = 'com.google.cloud.tools' dependencies { compile localGroovy() compile gradleApi() - compile 'com.google.cloud.tools:appengine-plugins-core:0.7.1' + compile 'com.google.cloud.tools:appengine-plugins-core:0.7.2' testCompile 'commons-io:commons-io:2.4' testCompile 'junit:junit:4.12' diff --git a/src/integTest/java/com/google/cloud/tools/gradle/appengine/AppEngineAppYamlPluginIntegrationTest.java b/src/integTest/java/com/google/cloud/tools/gradle/appengine/AppEngineAppYamlPluginIntegrationTest.java index fc65821c..414bec3b 100644 --- a/src/integTest/java/com/google/cloud/tools/gradle/appengine/AppEngineAppYamlPluginIntegrationTest.java +++ b/src/integTest/java/com/google/cloud/tools/gradle/appengine/AppEngineAppYamlPluginIntegrationTest.java @@ -17,10 +17,10 @@ package com.google.cloud.tools.gradle.appengine; -import com.google.cloud.tools.appengine.cloudsdk.CloudSdk; -import com.google.cloud.tools.appengine.cloudsdk.CloudSdkNotFoundException; -import com.google.cloud.tools.appengine.cloudsdk.Gcloud; -import com.google.cloud.tools.appengine.cloudsdk.process.ProcessHandlerException; +import com.google.cloud.tools.appengine.operations.CloudSdk; +import com.google.cloud.tools.appengine.operations.Gcloud; +import com.google.cloud.tools.appengine.operations.cloudsdk.CloudSdkNotFoundException; +import com.google.cloud.tools.appengine.operations.cloudsdk.process.ProcessHandlerException; import com.google.cloud.tools.managedcloudsdk.ManagedCloudSdk; import com.google.cloud.tools.managedcloudsdk.UnsupportedOsException; import java.io.File; diff --git a/src/integTest/java/com/google/cloud/tools/gradle/appengine/AppEngineStandardPluginIntegrationTest.java b/src/integTest/java/com/google/cloud/tools/gradle/appengine/AppEngineStandardPluginIntegrationTest.java index ff608e0c..a70f2666 100644 --- a/src/integTest/java/com/google/cloud/tools/gradle/appengine/AppEngineStandardPluginIntegrationTest.java +++ b/src/integTest/java/com/google/cloud/tools/gradle/appengine/AppEngineStandardPluginIntegrationTest.java @@ -17,10 +17,10 @@ package com.google.cloud.tools.gradle.appengine; -import com.google.cloud.tools.appengine.cloudsdk.CloudSdk; -import com.google.cloud.tools.appengine.cloudsdk.CloudSdkNotFoundException; -import com.google.cloud.tools.appengine.cloudsdk.Gcloud; -import com.google.cloud.tools.appengine.cloudsdk.process.ProcessHandlerException; +import com.google.cloud.tools.appengine.operations.CloudSdk; +import com.google.cloud.tools.appengine.operations.Gcloud; +import com.google.cloud.tools.appengine.operations.cloudsdk.CloudSdkNotFoundException; +import com.google.cloud.tools.appengine.operations.cloudsdk.process.ProcessHandlerException; import com.google.cloud.tools.gradle.appengine.standard.AppEngineStandardPlugin; import com.google.cloud.tools.managedcloudsdk.ManagedCloudSdk; import com.google.cloud.tools.managedcloudsdk.UnsupportedOsException; diff --git a/src/main/java/com/google/cloud/tools/gradle/appengine/appyaml/AppEngineAppYamlPlugin.java b/src/main/java/com/google/cloud/tools/gradle/appengine/appyaml/AppEngineAppYamlPlugin.java index a6a7953b..cc3f353a 100644 --- a/src/main/java/com/google/cloud/tools/gradle/appengine/appyaml/AppEngineAppYamlPlugin.java +++ b/src/main/java/com/google/cloud/tools/gradle/appengine/appyaml/AppEngineAppYamlPlugin.java @@ -17,7 +17,7 @@ package com.google.cloud.tools.gradle.appengine.appyaml; -import com.google.cloud.tools.appengine.cloudsdk.CloudSdkNotFoundException; +import com.google.cloud.tools.appengine.operations.cloudsdk.CloudSdkNotFoundException; import com.google.cloud.tools.gradle.appengine.core.AppEngineCorePluginConfiguration; import com.google.cloud.tools.gradle.appengine.core.CloudSdkOperations; import com.google.cloud.tools.gradle.appengine.core.DeployAllTask; diff --git a/src/main/java/com/google/cloud/tools/gradle/appengine/appyaml/AppYamlDeployTargetResolver.java b/src/main/java/com/google/cloud/tools/gradle/appengine/appyaml/AppYamlDeployTargetResolver.java index fecc2381..e60e0bf1 100644 --- a/src/main/java/com/google/cloud/tools/gradle/appengine/appyaml/AppYamlDeployTargetResolver.java +++ b/src/main/java/com/google/cloud/tools/gradle/appengine/appyaml/AppYamlDeployTargetResolver.java @@ -20,7 +20,7 @@ import static com.google.cloud.tools.gradle.appengine.core.ConfigReader.APPENGINE_CONFIG; import static com.google.cloud.tools.gradle.appengine.core.ConfigReader.GCLOUD_CONFIG; -import com.google.cloud.tools.appengine.cloudsdk.Gcloud; +import com.google.cloud.tools.appengine.operations.Gcloud; import com.google.cloud.tools.gradle.appengine.core.ConfigReader; import org.gradle.api.GradleException; diff --git a/src/main/java/com/google/cloud/tools/gradle/appengine/appyaml/StageAppYamlExtension.java b/src/main/java/com/google/cloud/tools/gradle/appengine/appyaml/StageAppYamlExtension.java index d45ffc64..bb2bb222 100644 --- a/src/main/java/com/google/cloud/tools/gradle/appengine/appyaml/StageAppYamlExtension.java +++ b/src/main/java/com/google/cloud/tools/gradle/appengine/appyaml/StageAppYamlExtension.java @@ -17,9 +17,12 @@ package com.google.cloud.tools.gradle.appengine.appyaml; -import com.google.cloud.tools.appengine.api.deploy.StageArchiveConfiguration; +import com.google.cloud.tools.appengine.configuration.AppYamlProjectStageConfiguration; import com.google.cloud.tools.gradle.appengine.util.NullSafe; import java.io.File; +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; import org.gradle.api.Project; import org.gradle.api.tasks.InputDirectory; import org.gradle.api.tasks.InputFile; @@ -35,7 +38,7 @@ public class StageAppYamlExtension { private File dockerDirectory; private File artifact; private File stagingDirectory; - private File extraFilesDirectory; + private List extraFilesDirectory; public StageAppYamlExtension(Project project) { this.project = project; @@ -80,19 +83,20 @@ public void setStagingDirectory(Object stagingDirectory) { @Optional @InputDirectory - public File getExtraFilesDirectory() { + public List getExtraFilesDirectory() { return extraFilesDirectory; } public void setExtraFilesDirectory(Object extraFilesDirectory) { - this.extraFilesDirectory = project.file(extraFilesDirectory); + this.extraFilesDirectory = new ArrayList<>(project.files(extraFilesDirectory).getFiles()); } - StageArchiveConfiguration toStageArchiveConfiguration() { - return StageArchiveConfiguration.builder( + AppYamlProjectStageConfiguration toStageArchiveConfiguration() { + return AppYamlProjectStageConfiguration.builder( appEngineDirectory.toPath(), artifact.toPath(), stagingDirectory.toPath()) .dockerDirectory(NullSafe.convert(dockerDirectory, File::toPath)) - .extraFilesDirectory(NullSafe.convert(extraFilesDirectory, File::toPath)) + .extraFilesDirectories( + extraFilesDirectory.stream().map(File::toPath).collect(Collectors.toList())) .build(); } } diff --git a/src/main/java/com/google/cloud/tools/gradle/appengine/appyaml/StageAppYamlTask.java b/src/main/java/com/google/cloud/tools/gradle/appengine/appyaml/StageAppYamlTask.java index e4638c60..9a0130b0 100644 --- a/src/main/java/com/google/cloud/tools/gradle/appengine/appyaml/StageAppYamlTask.java +++ b/src/main/java/com/google/cloud/tools/gradle/appengine/appyaml/StageAppYamlTask.java @@ -17,9 +17,8 @@ package com.google.cloud.tools.gradle.appengine.appyaml; -import com.google.cloud.tools.appengine.api.AppEngineException; -import com.google.cloud.tools.appengine.api.deploy.AppEngineArchiveStaging; -import com.google.cloud.tools.appengine.cloudsdk.CloudSdkAppEngineArchiveStaging; +import com.google.cloud.tools.appengine.AppEngineException; +import com.google.cloud.tools.appengine.operations.AppYamlProjectStaging; import org.gradle.api.DefaultTask; import org.gradle.api.tasks.Nested; import org.gradle.api.tasks.TaskAction; @@ -44,7 +43,7 @@ public void stageAction() throws AppEngineException { getProject().delete(appYamlExtension.getStagingDirectory()); getProject().mkdir(appYamlExtension.getStagingDirectory().getAbsolutePath()); - AppEngineArchiveStaging staging = new CloudSdkAppEngineArchiveStaging(); + AppYamlProjectStaging staging = new AppYamlProjectStaging(); staging.stageArchive(appYamlExtension.toStageArchiveConfiguration()); } } diff --git a/src/main/java/com/google/cloud/tools/gradle/appengine/core/AppEngineCorePluginConfiguration.java b/src/main/java/com/google/cloud/tools/gradle/appengine/core/AppEngineCorePluginConfiguration.java index 38c5b551..2f8ec320 100644 --- a/src/main/java/com/google/cloud/tools/gradle/appengine/core/AppEngineCorePluginConfiguration.java +++ b/src/main/java/com/google/cloud/tools/gradle/appengine/core/AppEngineCorePluginConfiguration.java @@ -17,7 +17,7 @@ package com.google.cloud.tools.gradle.appengine.core; -import com.google.cloud.tools.appengine.cloudsdk.CloudSdkNotFoundException; +import com.google.cloud.tools.appengine.operations.cloudsdk.CloudSdkNotFoundException; import com.google.cloud.tools.managedcloudsdk.BadCloudSdkVersionException; import com.google.cloud.tools.managedcloudsdk.ManagedCloudSdk; import com.google.cloud.tools.managedcloudsdk.UnsupportedOsException; diff --git a/src/main/java/com/google/cloud/tools/gradle/appengine/core/CheckCloudSdkTask.java b/src/main/java/com/google/cloud/tools/gradle/appengine/core/CheckCloudSdkTask.java index d5064a21..680a3123 100644 --- a/src/main/java/com/google/cloud/tools/gradle/appengine/core/CheckCloudSdkTask.java +++ b/src/main/java/com/google/cloud/tools/gradle/appengine/core/CheckCloudSdkTask.java @@ -17,12 +17,12 @@ package com.google.cloud.tools.gradle.appengine.core; -import com.google.cloud.tools.appengine.cloudsdk.AppEngineJavaComponentsNotInstalledException; -import com.google.cloud.tools.appengine.cloudsdk.CloudSdk; -import com.google.cloud.tools.appengine.cloudsdk.CloudSdkNotFoundException; -import com.google.cloud.tools.appengine.cloudsdk.CloudSdkOutOfDateException; -import com.google.cloud.tools.appengine.cloudsdk.CloudSdkVersionFileException; -import com.google.cloud.tools.appengine.cloudsdk.InvalidJavaSdkException; +import com.google.cloud.tools.appengine.operations.CloudSdk; +import com.google.cloud.tools.appengine.operations.cloudsdk.AppEngineJavaComponentsNotInstalledException; +import com.google.cloud.tools.appengine.operations.cloudsdk.CloudSdkNotFoundException; +import com.google.cloud.tools.appengine.operations.cloudsdk.CloudSdkOutOfDateException; +import com.google.cloud.tools.appengine.operations.cloudsdk.CloudSdkVersionFileException; +import com.google.cloud.tools.appengine.operations.cloudsdk.InvalidJavaSdkException; import com.google.common.base.Strings; import org.gradle.api.DefaultTask; import org.gradle.api.GradleException; diff --git a/src/main/java/com/google/cloud/tools/gradle/appengine/core/CloudSdkLoginTask.java b/src/main/java/com/google/cloud/tools/gradle/appengine/core/CloudSdkLoginTask.java index 66833f22..fcd0e67f 100644 --- a/src/main/java/com/google/cloud/tools/gradle/appengine/core/CloudSdkLoginTask.java +++ b/src/main/java/com/google/cloud/tools/gradle/appengine/core/CloudSdkLoginTask.java @@ -17,8 +17,8 @@ package com.google.cloud.tools.gradle.appengine.core; -import com.google.cloud.tools.appengine.api.AppEngineException; -import com.google.cloud.tools.appengine.cloudsdk.Gcloud; +import com.google.cloud.tools.appengine.AppEngineException; +import com.google.cloud.tools.appengine.operations.Gcloud; import org.gradle.api.tasks.TaskAction; public class CloudSdkLoginTask extends GcloudTask { diff --git a/src/main/java/com/google/cloud/tools/gradle/appengine/core/CloudSdkOperations.java b/src/main/java/com/google/cloud/tools/gradle/appengine/core/CloudSdkOperations.java index 01d3121c..d8905725 100644 --- a/src/main/java/com/google/cloud/tools/gradle/appengine/core/CloudSdkOperations.java +++ b/src/main/java/com/google/cloud/tools/gradle/appengine/core/CloudSdkOperations.java @@ -17,14 +17,14 @@ package com.google.cloud.tools.gradle.appengine.core; -import com.google.cloud.tools.appengine.cloudsdk.AppCfg; -import com.google.cloud.tools.appengine.cloudsdk.CloudSdk; -import com.google.cloud.tools.appengine.cloudsdk.CloudSdkNotFoundException; -import com.google.cloud.tools.appengine.cloudsdk.Gcloud; -import com.google.cloud.tools.appengine.cloudsdk.LocalRun; -import com.google.cloud.tools.appengine.cloudsdk.process.LegacyProcessHandler; -import com.google.cloud.tools.appengine.cloudsdk.process.NonZeroExceptionExitListener; -import com.google.cloud.tools.appengine.cloudsdk.process.ProcessHandler; +import com.google.cloud.tools.appengine.operations.AppCfg; +import com.google.cloud.tools.appengine.operations.CloudSdk; +import com.google.cloud.tools.appengine.operations.Gcloud; +import com.google.cloud.tools.appengine.operations.LocalRun; +import com.google.cloud.tools.appengine.operations.cloudsdk.CloudSdkNotFoundException; +import com.google.cloud.tools.appengine.operations.cloudsdk.process.LegacyProcessHandler; +import com.google.cloud.tools.appengine.operations.cloudsdk.process.NonZeroExceptionExitListener; +import com.google.cloud.tools.appengine.operations.cloudsdk.process.ProcessHandler; import com.google.cloud.tools.gradle.appengine.util.NullSafe; import java.io.File; import org.gradle.api.logging.Logger; diff --git a/src/main/java/com/google/cloud/tools/gradle/appengine/core/ConfigReader.java b/src/main/java/com/google/cloud/tools/gradle/appengine/core/ConfigReader.java index e5cdfa25..abcb0c20 100644 --- a/src/main/java/com/google/cloud/tools/gradle/appengine/core/ConfigReader.java +++ b/src/main/java/com/google/cloud/tools/gradle/appengine/core/ConfigReader.java @@ -17,12 +17,12 @@ package com.google.cloud.tools.gradle.appengine.core; import com.google.cloud.tools.appengine.AppEngineDescriptor; -import com.google.cloud.tools.appengine.api.AppEngineException; -import com.google.cloud.tools.appengine.cloudsdk.CloudSdkNotFoundException; -import com.google.cloud.tools.appengine.cloudsdk.CloudSdkOutOfDateException; -import com.google.cloud.tools.appengine.cloudsdk.CloudSdkVersionFileException; -import com.google.cloud.tools.appengine.cloudsdk.Gcloud; -import com.google.cloud.tools.appengine.cloudsdk.process.ProcessHandlerException; +import com.google.cloud.tools.appengine.AppEngineException; +import com.google.cloud.tools.appengine.operations.Gcloud; +import com.google.cloud.tools.appengine.operations.cloudsdk.CloudSdkNotFoundException; +import com.google.cloud.tools.appengine.operations.cloudsdk.CloudSdkOutOfDateException; +import com.google.cloud.tools.appengine.operations.cloudsdk.CloudSdkVersionFileException; +import com.google.cloud.tools.appengine.operations.cloudsdk.process.ProcessHandlerException; import java.io.File; import java.io.FileInputStream; import java.io.IOException; diff --git a/src/main/java/com/google/cloud/tools/gradle/appengine/core/DeployAllTask.java b/src/main/java/com/google/cloud/tools/gradle/appengine/core/DeployAllTask.java index 5c1e381a..9e08c490 100644 --- a/src/main/java/com/google/cloud/tools/gradle/appengine/core/DeployAllTask.java +++ b/src/main/java/com/google/cloud/tools/gradle/appengine/core/DeployAllTask.java @@ -16,10 +16,10 @@ package com.google.cloud.tools.gradle.appengine.core; -import com.google.cloud.tools.appengine.api.AppEngineException; -import com.google.cloud.tools.appengine.api.deploy.AppEngineDeployment; -import com.google.cloud.tools.appengine.api.deploy.DeployConfiguration; -import com.google.cloud.tools.appengine.cloudsdk.Gcloud; +import com.google.cloud.tools.appengine.AppEngineException; +import com.google.cloud.tools.appengine.configuration.DeployConfiguration; +import com.google.cloud.tools.appengine.operations.Deployment; +import com.google.cloud.tools.appengine.operations.Gcloud; import java.io.File; import java.nio.file.Files; import java.nio.file.Path; @@ -68,8 +68,7 @@ public void deployAllAction() throws AppEngineException { } // Deploy - AppEngineDeployment deploy = - gcloud.newDeployment(CloudSdkOperations.getDefaultHandler(getLogger())); + Deployment deploy = gcloud.newDeployment(CloudSdkOperations.getDefaultHandler(getLogger())); DeployConfiguration deployConfig = deployExtension.toDeployConfiguration(deployables); deploy.deploy(deployConfig); diff --git a/src/main/java/com/google/cloud/tools/gradle/appengine/core/DeployCronTask.java b/src/main/java/com/google/cloud/tools/gradle/appengine/core/DeployCronTask.java index ed7abb32..4052afef 100644 --- a/src/main/java/com/google/cloud/tools/gradle/appengine/core/DeployCronTask.java +++ b/src/main/java/com/google/cloud/tools/gradle/appengine/core/DeployCronTask.java @@ -17,8 +17,8 @@ package com.google.cloud.tools.gradle.appengine.core; -import com.google.cloud.tools.appengine.api.AppEngineException; -import com.google.cloud.tools.appengine.cloudsdk.Gcloud; +import com.google.cloud.tools.appengine.AppEngineException; +import com.google.cloud.tools.appengine.operations.Gcloud; import org.gradle.api.tasks.TaskAction; /** Task to deploy cron configuration. */ diff --git a/src/main/java/com/google/cloud/tools/gradle/appengine/core/DeployDispatchTask.java b/src/main/java/com/google/cloud/tools/gradle/appengine/core/DeployDispatchTask.java index e2da2f00..16b4a152 100644 --- a/src/main/java/com/google/cloud/tools/gradle/appengine/core/DeployDispatchTask.java +++ b/src/main/java/com/google/cloud/tools/gradle/appengine/core/DeployDispatchTask.java @@ -17,8 +17,8 @@ package com.google.cloud.tools.gradle.appengine.core; -import com.google.cloud.tools.appengine.api.AppEngineException; -import com.google.cloud.tools.appengine.cloudsdk.Gcloud; +import com.google.cloud.tools.appengine.AppEngineException; +import com.google.cloud.tools.appengine.operations.Gcloud; import org.gradle.api.tasks.TaskAction; /** Task to deploy dispatch configuration. */ diff --git a/src/main/java/com/google/cloud/tools/gradle/appengine/core/DeployDosTask.java b/src/main/java/com/google/cloud/tools/gradle/appengine/core/DeployDosTask.java index f1fa58bd..81ab2255 100644 --- a/src/main/java/com/google/cloud/tools/gradle/appengine/core/DeployDosTask.java +++ b/src/main/java/com/google/cloud/tools/gradle/appengine/core/DeployDosTask.java @@ -17,8 +17,8 @@ package com.google.cloud.tools.gradle.appengine.core; -import com.google.cloud.tools.appengine.api.AppEngineException; -import com.google.cloud.tools.appengine.cloudsdk.Gcloud; +import com.google.cloud.tools.appengine.AppEngineException; +import com.google.cloud.tools.appengine.operations.Gcloud; import org.gradle.api.tasks.TaskAction; /** Task to deploy dos configuration. */ diff --git a/src/main/java/com/google/cloud/tools/gradle/appengine/core/DeployExtension.java b/src/main/java/com/google/cloud/tools/gradle/appengine/core/DeployExtension.java index d19f587f..68dc63ee 100644 --- a/src/main/java/com/google/cloud/tools/gradle/appengine/core/DeployExtension.java +++ b/src/main/java/com/google/cloud/tools/gradle/appengine/core/DeployExtension.java @@ -17,8 +17,8 @@ package com.google.cloud.tools.gradle.appengine.core; -import com.google.cloud.tools.appengine.api.deploy.DeployConfiguration; -import com.google.cloud.tools.appengine.api.deploy.DeployProjectConfigurationConfiguration; +import com.google.cloud.tools.appengine.configuration.DeployConfiguration; +import com.google.cloud.tools.appengine.configuration.DeployProjectConfigurationConfiguration; import java.io.File; import java.nio.file.Path; import java.util.List; diff --git a/src/main/java/com/google/cloud/tools/gradle/appengine/core/DeployIndexTask.java b/src/main/java/com/google/cloud/tools/gradle/appengine/core/DeployIndexTask.java index 6c8955cd..dcdd4ecc 100644 --- a/src/main/java/com/google/cloud/tools/gradle/appengine/core/DeployIndexTask.java +++ b/src/main/java/com/google/cloud/tools/gradle/appengine/core/DeployIndexTask.java @@ -17,8 +17,8 @@ package com.google.cloud.tools.gradle.appengine.core; -import com.google.cloud.tools.appengine.api.AppEngineException; -import com.google.cloud.tools.appengine.cloudsdk.Gcloud; +import com.google.cloud.tools.appengine.AppEngineException; +import com.google.cloud.tools.appengine.operations.Gcloud; import org.gradle.api.tasks.TaskAction; /** Task to deploy datastore index configuration. */ diff --git a/src/main/java/com/google/cloud/tools/gradle/appengine/core/DeployQueueTask.java b/src/main/java/com/google/cloud/tools/gradle/appengine/core/DeployQueueTask.java index bc9fcb1d..bed4c706 100644 --- a/src/main/java/com/google/cloud/tools/gradle/appengine/core/DeployQueueTask.java +++ b/src/main/java/com/google/cloud/tools/gradle/appengine/core/DeployQueueTask.java @@ -17,8 +17,8 @@ package com.google.cloud.tools.gradle.appengine.core; -import com.google.cloud.tools.appengine.api.AppEngineException; -import com.google.cloud.tools.appengine.cloudsdk.Gcloud; +import com.google.cloud.tools.appengine.AppEngineException; +import com.google.cloud.tools.appengine.operations.Gcloud; import org.gradle.api.tasks.TaskAction; /** Task to deploy queue configuration. */ diff --git a/src/main/java/com/google/cloud/tools/gradle/appengine/core/DeployTask.java b/src/main/java/com/google/cloud/tools/gradle/appengine/core/DeployTask.java index f36d30a2..abc5e4db 100644 --- a/src/main/java/com/google/cloud/tools/gradle/appengine/core/DeployTask.java +++ b/src/main/java/com/google/cloud/tools/gradle/appengine/core/DeployTask.java @@ -17,9 +17,9 @@ package com.google.cloud.tools.gradle.appengine.core; -import com.google.cloud.tools.appengine.api.AppEngineException; -import com.google.cloud.tools.appengine.api.deploy.DeployConfiguration; -import com.google.cloud.tools.appengine.cloudsdk.Gcloud; +import com.google.cloud.tools.appengine.AppEngineException; +import com.google.cloud.tools.appengine.configuration.DeployConfiguration; +import com.google.cloud.tools.appengine.operations.Gcloud; import com.google.common.collect.ImmutableList; import java.nio.file.Path; import org.gradle.api.tasks.TaskAction; diff --git a/src/main/java/com/google/cloud/tools/gradle/appengine/core/GcloudTask.java b/src/main/java/com/google/cloud/tools/gradle/appengine/core/GcloudTask.java index f91275f2..d673cfb2 100644 --- a/src/main/java/com/google/cloud/tools/gradle/appengine/core/GcloudTask.java +++ b/src/main/java/com/google/cloud/tools/gradle/appengine/core/GcloudTask.java @@ -17,7 +17,7 @@ package com.google.cloud.tools.gradle.appengine.core; -import com.google.cloud.tools.appengine.cloudsdk.Gcloud; +import com.google.cloud.tools.appengine.operations.Gcloud; import org.gradle.api.DefaultTask; public abstract class GcloudTask extends DefaultTask { diff --git a/src/main/java/com/google/cloud/tools/gradle/appengine/sourcecontext/GenRepoInfoFileExtension.java b/src/main/java/com/google/cloud/tools/gradle/appengine/sourcecontext/GenRepoInfoFileExtension.java index addfb6f0..a63ea813 100644 --- a/src/main/java/com/google/cloud/tools/gradle/appengine/sourcecontext/GenRepoInfoFileExtension.java +++ b/src/main/java/com/google/cloud/tools/gradle/appengine/sourcecontext/GenRepoInfoFileExtension.java @@ -17,7 +17,7 @@ package com.google.cloud.tools.gradle.appengine.sourcecontext; -import com.google.cloud.tools.appengine.api.debug.GenRepoInfoFileConfiguration; +import com.google.cloud.tools.appengine.configuration.GenRepoInfoFileConfiguration; import com.google.cloud.tools.gradle.appengine.util.NullSafe; import java.io.File; import org.gradle.api.Project; diff --git a/src/main/java/com/google/cloud/tools/gradle/appengine/sourcecontext/GenRepoInfoFileTask.java b/src/main/java/com/google/cloud/tools/gradle/appengine/sourcecontext/GenRepoInfoFileTask.java index 25b38699..d5c2330e 100644 --- a/src/main/java/com/google/cloud/tools/gradle/appengine/sourcecontext/GenRepoInfoFileTask.java +++ b/src/main/java/com/google/cloud/tools/gradle/appengine/sourcecontext/GenRepoInfoFileTask.java @@ -17,8 +17,8 @@ package com.google.cloud.tools.gradle.appengine.sourcecontext; -import com.google.cloud.tools.appengine.api.AppEngineException; -import com.google.cloud.tools.appengine.cloudsdk.Gcloud; +import com.google.cloud.tools.appengine.AppEngineException; +import com.google.cloud.tools.appengine.operations.Gcloud; import com.google.cloud.tools.gradle.appengine.core.CloudSdkOperations; import org.gradle.api.DefaultTask; import org.gradle.api.tasks.Nested; diff --git a/src/main/java/com/google/cloud/tools/gradle/appengine/sourcecontext/SourceContextPlugin.java b/src/main/java/com/google/cloud/tools/gradle/appengine/sourcecontext/SourceContextPlugin.java index 6962f948..03a00df0 100644 --- a/src/main/java/com/google/cloud/tools/gradle/appengine/sourcecontext/SourceContextPlugin.java +++ b/src/main/java/com/google/cloud/tools/gradle/appengine/sourcecontext/SourceContextPlugin.java @@ -17,7 +17,7 @@ package com.google.cloud.tools.gradle.appengine.sourcecontext; -import com.google.cloud.tools.appengine.cloudsdk.CloudSdkNotFoundException; +import com.google.cloud.tools.appengine.operations.cloudsdk.CloudSdkNotFoundException; import com.google.cloud.tools.gradle.appengine.core.AppEngineCoreExtensionProperties; import com.google.cloud.tools.gradle.appengine.core.CloudSdkOperations; import com.google.cloud.tools.gradle.appengine.core.ToolsExtension; diff --git a/src/main/java/com/google/cloud/tools/gradle/appengine/standard/AppEngineStandardPlugin.java b/src/main/java/com/google/cloud/tools/gradle/appengine/standard/AppEngineStandardPlugin.java index 507ac9a8..52dd857b 100644 --- a/src/main/java/com/google/cloud/tools/gradle/appengine/standard/AppEngineStandardPlugin.java +++ b/src/main/java/com/google/cloud/tools/gradle/appengine/standard/AppEngineStandardPlugin.java @@ -20,7 +20,7 @@ import static com.google.cloud.tools.gradle.appengine.core.ConfigReader.APPENGINE_CONFIG; import static com.google.cloud.tools.gradle.appengine.core.ConfigReader.GCLOUD_CONFIG; -import com.google.cloud.tools.appengine.cloudsdk.CloudSdkNotFoundException; +import com.google.cloud.tools.appengine.operations.cloudsdk.CloudSdkNotFoundException; import com.google.cloud.tools.gradle.appengine.core.AppEngineCorePluginConfiguration; import com.google.cloud.tools.gradle.appengine.core.CloudSdkOperations; import com.google.cloud.tools.gradle.appengine.core.ConfigReader; diff --git a/src/main/java/com/google/cloud/tools/gradle/appengine/standard/DevAppServerHelper.java b/src/main/java/com/google/cloud/tools/gradle/appengine/standard/DevAppServerHelper.java index e7ee8bfc..44242b2c 100644 --- a/src/main/java/com/google/cloud/tools/gradle/appengine/standard/DevAppServerHelper.java +++ b/src/main/java/com/google/cloud/tools/gradle/appengine/standard/DevAppServerHelper.java @@ -17,10 +17,10 @@ package com.google.cloud.tools.gradle.appengine.standard; -import com.google.cloud.tools.appengine.api.devserver.AppEngineDevServer; -import com.google.cloud.tools.appengine.api.devserver.StopConfiguration; -import com.google.cloud.tools.appengine.cloudsdk.LocalRun; -import com.google.cloud.tools.appengine.cloudsdk.process.ProcessHandler; +import com.google.cloud.tools.appengine.configuration.StopConfiguration; +import com.google.cloud.tools.appengine.operations.DevServer; +import com.google.cloud.tools.appengine.operations.LocalRun; +import com.google.cloud.tools.appengine.operations.cloudsdk.process.ProcessHandler; import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableList; import java.util.List; @@ -39,7 +39,7 @@ public class DevAppServerHelper { private Validator validator = new Validator(); /** Return an appserver based on serverVersion. */ - public AppEngineDevServer getAppServer( + public DevServer getAppServer( LocalRun localRun, RunExtension run, ProcessHandler processHandler) { String serverVersion = run.getServerVersion(); diff --git a/src/main/java/com/google/cloud/tools/gradle/appengine/standard/DevAppServerRunTask.java b/src/main/java/com/google/cloud/tools/gradle/appengine/standard/DevAppServerRunTask.java index 0833718b..747d097d 100644 --- a/src/main/java/com/google/cloud/tools/gradle/appengine/standard/DevAppServerRunTask.java +++ b/src/main/java/com/google/cloud/tools/gradle/appengine/standard/DevAppServerRunTask.java @@ -17,8 +17,8 @@ package com.google.cloud.tools.gradle.appengine.standard; -import com.google.cloud.tools.appengine.api.AppEngineException; -import com.google.cloud.tools.appengine.cloudsdk.LocalRun; +import com.google.cloud.tools.appengine.AppEngineException; +import com.google.cloud.tools.appengine.operations.LocalRun; import com.google.cloud.tools.gradle.appengine.core.CloudSdkOperations; import org.gradle.api.DefaultTask; import org.gradle.api.ProjectConfigurationException; diff --git a/src/main/java/com/google/cloud/tools/gradle/appengine/standard/DevAppServerStartTask.java b/src/main/java/com/google/cloud/tools/gradle/appengine/standard/DevAppServerStartTask.java index bf295425..a1d3a422 100644 --- a/src/main/java/com/google/cloud/tools/gradle/appengine/standard/DevAppServerStartTask.java +++ b/src/main/java/com/google/cloud/tools/gradle/appengine/standard/DevAppServerStartTask.java @@ -17,11 +17,11 @@ package com.google.cloud.tools.gradle.appengine.standard; -import com.google.cloud.tools.appengine.api.AppEngineException; -import com.google.cloud.tools.appengine.cloudsdk.LocalRun; -import com.google.cloud.tools.appengine.cloudsdk.process.LegacyProcessHandler; -import com.google.cloud.tools.appengine.cloudsdk.process.NonZeroExceptionExitListener; -import com.google.cloud.tools.appengine.cloudsdk.process.ProcessHandler; +import com.google.cloud.tools.appengine.AppEngineException; +import com.google.cloud.tools.appengine.operations.LocalRun; +import com.google.cloud.tools.appengine.operations.cloudsdk.process.LegacyProcessHandler; +import com.google.cloud.tools.appengine.operations.cloudsdk.process.NonZeroExceptionExitListener; +import com.google.cloud.tools.appengine.operations.cloudsdk.process.ProcessHandler; import com.google.cloud.tools.gradle.appengine.util.io.FileOutputLineListener; import java.io.File; import java.io.IOException; diff --git a/src/main/java/com/google/cloud/tools/gradle/appengine/standard/DevAppServerStopTask.java b/src/main/java/com/google/cloud/tools/gradle/appengine/standard/DevAppServerStopTask.java index a000828e..e470d77c 100644 --- a/src/main/java/com/google/cloud/tools/gradle/appengine/standard/DevAppServerStopTask.java +++ b/src/main/java/com/google/cloud/tools/gradle/appengine/standard/DevAppServerStopTask.java @@ -17,10 +17,10 @@ package com.google.cloud.tools.gradle.appengine.standard; -import com.google.cloud.tools.appengine.api.AppEngineException; -import com.google.cloud.tools.appengine.api.devserver.AppEngineDevServer; -import com.google.cloud.tools.appengine.cloudsdk.CloudSdkNotFoundException; -import com.google.cloud.tools.appengine.cloudsdk.LocalRun; +import com.google.cloud.tools.appengine.AppEngineException; +import com.google.cloud.tools.appengine.operations.DevServer; +import com.google.cloud.tools.appengine.operations.LocalRun; +import com.google.cloud.tools.appengine.operations.cloudsdk.CloudSdkNotFoundException; import com.google.cloud.tools.gradle.appengine.core.CloudSdkOperations; import org.gradle.api.DefaultTask; import org.gradle.api.tasks.TaskAction; @@ -43,7 +43,7 @@ public void setLocalRun(LocalRun localRun) { /** Task entrypoint : Stop the dev appserver (get StopConfiguration from helper). */ @TaskAction public void stopAction() throws CloudSdkNotFoundException { - AppEngineDevServer server = + DevServer server = serverHelper.getAppServer( localRun, runConfig, CloudSdkOperations.getDefaultHandler(getLogger())); try { diff --git a/src/main/java/com/google/cloud/tools/gradle/appengine/standard/RunExtension.java b/src/main/java/com/google/cloud/tools/gradle/appengine/standard/RunExtension.java index 3955aaa4..305ed18b 100644 --- a/src/main/java/com/google/cloud/tools/gradle/appengine/standard/RunExtension.java +++ b/src/main/java/com/google/cloud/tools/gradle/appengine/standard/RunExtension.java @@ -17,7 +17,7 @@ package com.google.cloud.tools.gradle.appengine.standard; -import com.google.cloud.tools.appengine.api.devserver.RunConfiguration; +import com.google.cloud.tools.appengine.configuration.RunConfiguration; import com.google.cloud.tools.gradle.appengine.util.NullSafe; import com.google.common.collect.ImmutableList; import java.io.File; diff --git a/src/main/java/com/google/cloud/tools/gradle/appengine/standard/StageStandardExtension.java b/src/main/java/com/google/cloud/tools/gradle/appengine/standard/StageStandardExtension.java index d1b08a64..ed47ac0d 100644 --- a/src/main/java/com/google/cloud/tools/gradle/appengine/standard/StageStandardExtension.java +++ b/src/main/java/com/google/cloud/tools/gradle/appengine/standard/StageStandardExtension.java @@ -17,7 +17,7 @@ package com.google.cloud.tools.gradle.appengine.standard; -import com.google.cloud.tools.appengine.api.deploy.StageStandardConfiguration; +import com.google.cloud.tools.appengine.configuration.AppEngineWebXmlProjectStageConfiguration; import com.google.cloud.tools.gradle.appengine.util.NullSafe; import java.io.File; import org.gradle.api.Project; @@ -167,8 +167,9 @@ public void setRuntime(String runtime) { this.runtime = runtime; } - StageStandardConfiguration toStageStandardConfiguration() { - return StageStandardConfiguration.builder(sourceDirectory.toPath(), stagingDirectory.toPath()) + AppEngineWebXmlProjectStageConfiguration toStageStandardConfiguration() { + return AppEngineWebXmlProjectStageConfiguration.builder( + sourceDirectory.toPath(), stagingDirectory.toPath()) .compileEncoding(compileEncoding) .deleteJsps(deleteJsps) .disableJarJsps(disableJarJsps) diff --git a/src/main/java/com/google/cloud/tools/gradle/appengine/standard/StageStandardTask.java b/src/main/java/com/google/cloud/tools/gradle/appengine/standard/StageStandardTask.java index ee93f9e1..fd43ff95 100644 --- a/src/main/java/com/google/cloud/tools/gradle/appengine/standard/StageStandardTask.java +++ b/src/main/java/com/google/cloud/tools/gradle/appengine/standard/StageStandardTask.java @@ -17,8 +17,8 @@ package com.google.cloud.tools.gradle.appengine.standard; -import com.google.cloud.tools.appengine.api.AppEngineException; -import com.google.cloud.tools.appengine.cloudsdk.AppCfg; +import com.google.cloud.tools.appengine.AppEngineException; +import com.google.cloud.tools.appengine.operations.AppCfg; import com.google.cloud.tools.gradle.appengine.core.CloudSdkOperations; import org.gradle.api.DefaultTask; import org.gradle.api.tasks.Nested; diff --git a/src/main/java/com/google/cloud/tools/gradle/appengine/standard/StandardDeployTargetResolver.java b/src/main/java/com/google/cloud/tools/gradle/appengine/standard/StandardDeployTargetResolver.java index ef2249f5..7a598587 100644 --- a/src/main/java/com/google/cloud/tools/gradle/appengine/standard/StandardDeployTargetResolver.java +++ b/src/main/java/com/google/cloud/tools/gradle/appengine/standard/StandardDeployTargetResolver.java @@ -20,7 +20,7 @@ import static com.google.cloud.tools.gradle.appengine.core.ConfigReader.APPENGINE_CONFIG; import static com.google.cloud.tools.gradle.appengine.core.ConfigReader.GCLOUD_CONFIG; -import com.google.cloud.tools.appengine.cloudsdk.Gcloud; +import com.google.cloud.tools.appengine.operations.Gcloud; import com.google.cloud.tools.gradle.appengine.core.ConfigReader; import java.io.File; import org.gradle.api.GradleException; diff --git a/src/main/java/com/google/cloud/tools/gradle/appengine/util/io/FileOutputLineListener.java b/src/main/java/com/google/cloud/tools/gradle/appengine/util/io/FileOutputLineListener.java index 8a60c7d7..d5faf77e 100644 --- a/src/main/java/com/google/cloud/tools/gradle/appengine/util/io/FileOutputLineListener.java +++ b/src/main/java/com/google/cloud/tools/gradle/appengine/util/io/FileOutputLineListener.java @@ -17,7 +17,7 @@ package com.google.cloud.tools.gradle.appengine.util.io; -import com.google.cloud.tools.appengine.cloudsdk.process.ProcessOutputLineListener; +import com.google.cloud.tools.appengine.operations.cloudsdk.process.ProcessOutputLineListener; import java.io.File; import java.io.IOException; import java.io.PrintStream; diff --git a/src/main/java/com/google/cloud/tools/gradle/appengine/util/io/GradleLoggerOutputListener.java b/src/main/java/com/google/cloud/tools/gradle/appengine/util/io/GradleLoggerOutputListener.java index a2ed9a3e..ce4681a4 100644 --- a/src/main/java/com/google/cloud/tools/gradle/appengine/util/io/GradleLoggerOutputListener.java +++ b/src/main/java/com/google/cloud/tools/gradle/appengine/util/io/GradleLoggerOutputListener.java @@ -17,7 +17,7 @@ package com.google.cloud.tools.gradle.appengine.util.io; -import com.google.cloud.tools.appengine.cloudsdk.process.ProcessOutputLineListener; +import com.google.cloud.tools.appengine.operations.cloudsdk.process.ProcessOutputLineListener; import org.gradle.api.logging.LogLevel; import org.gradle.api.logging.Logger; diff --git a/src/test/java/com/google/cloud/tools/gradle/appengine/AppEnginePluginTest.java b/src/test/java/com/google/cloud/tools/gradle/appengine/AppEnginePluginTest.java index ef7381f4..014acc5c 100644 --- a/src/test/java/com/google/cloud/tools/gradle/appengine/AppEnginePluginTest.java +++ b/src/test/java/com/google/cloud/tools/gradle/appengine/AppEnginePluginTest.java @@ -27,6 +27,7 @@ import com.google.cloud.tools.gradle.appengine.core.AppEngineCorePluginConfiguration; import com.google.cloud.tools.gradle.appengine.standard.AppEngineStandardPlugin; import java.io.IOException; +import org.gradle.api.JavaVersion; import org.gradle.api.Project; import org.gradle.testkit.runner.BuildResult; import org.gradle.testkit.runner.UnexpectedBuildFailure; @@ -61,6 +62,7 @@ public void testCheckGradleVersion_fail() throws IOException { + AppEngineCorePluginConfiguration.GRADLE_MIN_VERSION + " or higher.")); } + JavaVersion.current().isJava9Compatible(); } @Test diff --git a/src/test/java/com/google/cloud/tools/gradle/appengine/appyaml/AppYamlDeployTargetResolverTest.java b/src/test/java/com/google/cloud/tools/gradle/appengine/appyaml/AppYamlDeployTargetResolverTest.java index 4adaa3bb..1073d11e 100644 --- a/src/test/java/com/google/cloud/tools/gradle/appengine/appyaml/AppYamlDeployTargetResolverTest.java +++ b/src/test/java/com/google/cloud/tools/gradle/appengine/appyaml/AppYamlDeployTargetResolverTest.java @@ -17,12 +17,12 @@ package com.google.cloud.tools.gradle.appengine.appyaml; -import com.google.cloud.tools.appengine.cloudsdk.CloudSdkNotFoundException; -import com.google.cloud.tools.appengine.cloudsdk.CloudSdkOutOfDateException; -import com.google.cloud.tools.appengine.cloudsdk.CloudSdkVersionFileException; -import com.google.cloud.tools.appengine.cloudsdk.Gcloud; -import com.google.cloud.tools.appengine.cloudsdk.process.ProcessHandlerException; -import com.google.cloud.tools.appengine.cloudsdk.serialization.CloudSdkConfig; +import com.google.cloud.tools.appengine.operations.Gcloud; +import com.google.cloud.tools.appengine.operations.cloudsdk.CloudSdkNotFoundException; +import com.google.cloud.tools.appengine.operations.cloudsdk.CloudSdkOutOfDateException; +import com.google.cloud.tools.appengine.operations.cloudsdk.CloudSdkVersionFileException; +import com.google.cloud.tools.appengine.operations.cloudsdk.process.ProcessHandlerException; +import com.google.cloud.tools.appengine.operations.cloudsdk.serialization.CloudSdkConfig; import com.google.cloud.tools.gradle.appengine.core.ConfigReader; import java.io.IOException; import org.gradle.api.GradleException; diff --git a/src/test/java/com/google/cloud/tools/gradle/appengine/core/CheckCloudSdkTaskTest.java b/src/test/java/com/google/cloud/tools/gradle/appengine/core/CheckCloudSdkTaskTest.java index d123c061..5b0a762b 100644 --- a/src/test/java/com/google/cloud/tools/gradle/appengine/core/CheckCloudSdkTaskTest.java +++ b/src/test/java/com/google/cloud/tools/gradle/appengine/core/CheckCloudSdkTaskTest.java @@ -19,13 +19,13 @@ import static org.mockito.Mockito.when; -import com.google.cloud.tools.appengine.cloudsdk.AppEngineJavaComponentsNotInstalledException; -import com.google.cloud.tools.appengine.cloudsdk.CloudSdk; -import com.google.cloud.tools.appengine.cloudsdk.CloudSdkNotFoundException; -import com.google.cloud.tools.appengine.cloudsdk.CloudSdkOutOfDateException; -import com.google.cloud.tools.appengine.cloudsdk.CloudSdkVersionFileException; -import com.google.cloud.tools.appengine.cloudsdk.InvalidJavaSdkException; -import com.google.cloud.tools.appengine.cloudsdk.serialization.CloudSdkVersion; +import com.google.cloud.tools.appengine.operations.CloudSdk; +import com.google.cloud.tools.appengine.operations.cloudsdk.AppEngineJavaComponentsNotInstalledException; +import com.google.cloud.tools.appengine.operations.cloudsdk.CloudSdkNotFoundException; +import com.google.cloud.tools.appengine.operations.cloudsdk.CloudSdkOutOfDateException; +import com.google.cloud.tools.appengine.operations.cloudsdk.CloudSdkVersionFileException; +import com.google.cloud.tools.appengine.operations.cloudsdk.InvalidJavaSdkException; +import com.google.cloud.tools.appengine.operations.cloudsdk.serialization.CloudSdkVersion; import org.gradle.api.GradleException; import org.gradle.api.Project; import org.gradle.testfixtures.ProjectBuilder; diff --git a/src/test/java/com/google/cloud/tools/gradle/appengine/core/DeployAllTaskTest.java b/src/test/java/com/google/cloud/tools/gradle/appengine/core/DeployAllTaskTest.java index b27bc0e8..3c15af67 100644 --- a/src/test/java/com/google/cloud/tools/gradle/appengine/core/DeployAllTaskTest.java +++ b/src/test/java/com/google/cloud/tools/gradle/appengine/core/DeployAllTaskTest.java @@ -21,11 +21,11 @@ import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -import com.google.cloud.tools.appengine.api.AppEngineException; -import com.google.cloud.tools.appengine.api.deploy.DeployConfiguration; -import com.google.cloud.tools.appengine.cloudsdk.CloudSdkAppEngineDeployment; -import com.google.cloud.tools.appengine.cloudsdk.Gcloud; -import com.google.cloud.tools.appengine.cloudsdk.process.ProcessHandler; +import com.google.cloud.tools.appengine.AppEngineException; +import com.google.cloud.tools.appengine.configuration.DeployConfiguration; +import com.google.cloud.tools.appengine.operations.Deployment; +import com.google.cloud.tools.appengine.operations.Gcloud; +import com.google.cloud.tools.appengine.operations.cloudsdk.process.ProcessHandler; import java.io.File; import java.io.IOException; import java.nio.file.Path; @@ -47,7 +47,7 @@ public class DeployAllTaskTest { @Rule public TemporaryFolder tempFolder = new TemporaryFolder(); @Mock private Gcloud gcloud; - @Mock private CloudSdkAppEngineDeployment deploy; + @Mock private Deployment deploy; private DeployExtension deployConfig; private ArgumentCaptor deployCapture; diff --git a/src/test/java/com/google/cloud/tools/gradle/appengine/standard/DevAppServerHelperTest.java b/src/test/java/com/google/cloud/tools/gradle/appengine/standard/DevAppServerHelperTest.java index fbe46958..2254feb1 100644 --- a/src/test/java/com/google/cloud/tools/gradle/appengine/standard/DevAppServerHelperTest.java +++ b/src/test/java/com/google/cloud/tools/gradle/appengine/standard/DevAppServerHelperTest.java @@ -22,11 +22,11 @@ import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -import com.google.cloud.tools.appengine.api.devserver.AppEngineDevServer; -import com.google.cloud.tools.appengine.api.devserver.StopConfiguration; -import com.google.cloud.tools.appengine.cloudsdk.CloudSdk; -import com.google.cloud.tools.appengine.cloudsdk.LocalRun; -import com.google.cloud.tools.appengine.cloudsdk.process.ProcessHandler; +import com.google.cloud.tools.appengine.configuration.StopConfiguration; +import com.google.cloud.tools.appengine.operations.CloudSdk; +import com.google.cloud.tools.appengine.operations.DevServer; +import com.google.cloud.tools.appengine.operations.LocalRun; +import com.google.cloud.tools.appengine.operations.cloudsdk.process.ProcessHandler; import com.google.cloud.tools.gradle.appengine.standard.DevAppServerHelper.Validator; import org.gradle.api.ProjectConfigurationException; import org.junit.Assert; @@ -48,8 +48,8 @@ public class DevAppServerHelperTest { @Mock private RunExtension run; @Spy private Validator validator; - @Mock private AppEngineDevServer v1Server; - @Mock private AppEngineDevServer v2Server; + @Mock private DevServer v1Server; + @Mock private DevServer v2Server; @InjectMocks private DevAppServerHelper helper = new DevAppServerHelper(); diff --git a/src/test/java/com/google/cloud/tools/gradle/appengine/standard/StandardDeployTargetResolverTest.java b/src/test/java/com/google/cloud/tools/gradle/appengine/standard/StandardDeployTargetResolverTest.java index e5860e8a..c367e821 100644 --- a/src/test/java/com/google/cloud/tools/gradle/appengine/standard/StandardDeployTargetResolverTest.java +++ b/src/test/java/com/google/cloud/tools/gradle/appengine/standard/StandardDeployTargetResolverTest.java @@ -17,12 +17,12 @@ package com.google.cloud.tools.gradle.appengine.standard; -import com.google.cloud.tools.appengine.cloudsdk.CloudSdkNotFoundException; -import com.google.cloud.tools.appengine.cloudsdk.CloudSdkOutOfDateException; -import com.google.cloud.tools.appengine.cloudsdk.CloudSdkVersionFileException; -import com.google.cloud.tools.appengine.cloudsdk.Gcloud; -import com.google.cloud.tools.appengine.cloudsdk.process.ProcessHandlerException; -import com.google.cloud.tools.appengine.cloudsdk.serialization.CloudSdkConfig; +import com.google.cloud.tools.appengine.operations.Gcloud; +import com.google.cloud.tools.appengine.operations.cloudsdk.CloudSdkNotFoundException; +import com.google.cloud.tools.appengine.operations.cloudsdk.CloudSdkOutOfDateException; +import com.google.cloud.tools.appengine.operations.cloudsdk.CloudSdkVersionFileException; +import com.google.cloud.tools.appengine.operations.cloudsdk.process.ProcessHandlerException; +import com.google.cloud.tools.appengine.operations.cloudsdk.serialization.CloudSdkConfig; import com.google.cloud.tools.gradle.appengine.core.ConfigReader; import com.google.common.base.Charsets; import com.google.common.io.Files; From 64a08213d12a330ef96b50bd808a775ab0b438bd Mon Sep 17 00:00:00 2001 From: Appu Goundan Date: Wed, 2 Jan 2019 14:22:22 -0500 Subject: [PATCH 2/3] oops --- .../google/cloud/tools/gradle/appengine/AppEnginePluginTest.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/test/java/com/google/cloud/tools/gradle/appengine/AppEnginePluginTest.java b/src/test/java/com/google/cloud/tools/gradle/appengine/AppEnginePluginTest.java index 014acc5c..8b3fd1d6 100644 --- a/src/test/java/com/google/cloud/tools/gradle/appengine/AppEnginePluginTest.java +++ b/src/test/java/com/google/cloud/tools/gradle/appengine/AppEnginePluginTest.java @@ -62,7 +62,6 @@ public void testCheckGradleVersion_fail() throws IOException { + AppEngineCorePluginConfiguration.GRADLE_MIN_VERSION + " or higher.")); } - JavaVersion.current().isJava9Compatible(); } @Test From d8f68237feeca1e6683319a8cfe3e2a72e9cd985 Mon Sep 17 00:00:00 2001 From: Appu Goundan Date: Wed, 2 Jan 2019 14:30:44 -0500 Subject: [PATCH 3/3] format --- .../google/cloud/tools/gradle/appengine/AppEnginePluginTest.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/test/java/com/google/cloud/tools/gradle/appengine/AppEnginePluginTest.java b/src/test/java/com/google/cloud/tools/gradle/appengine/AppEnginePluginTest.java index 8b3fd1d6..ef7381f4 100644 --- a/src/test/java/com/google/cloud/tools/gradle/appengine/AppEnginePluginTest.java +++ b/src/test/java/com/google/cloud/tools/gradle/appengine/AppEnginePluginTest.java @@ -27,7 +27,6 @@ import com.google.cloud.tools.gradle.appengine.core.AppEngineCorePluginConfiguration; import com.google.cloud.tools.gradle.appengine.standard.AppEngineStandardPlugin; import java.io.IOException; -import org.gradle.api.JavaVersion; import org.gradle.api.Project; import org.gradle.testkit.runner.BuildResult; import org.gradle.testkit.runner.UnexpectedBuildFailure;