Skip to content

Commit

Permalink
Make getSdkPath public for testing.
Browse files Browse the repository at this point in the history
  • Loading branch information
joaoandremartins committed Jul 13, 2016
1 parent ae3d7a1 commit d19a956
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import com.google.cloud.tools.appengine.cloudsdk.process.ProcessExitListener;
import com.google.cloud.tools.appengine.cloudsdk.process.ProcessOutputLineListener;
import com.google.cloud.tools.appengine.cloudsdk.process.ProcessStartListener;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Joiner;
import com.google.common.collect.Maps;

Expand Down Expand Up @@ -174,7 +175,7 @@ private void logCommand(List<String> command) {
logger.info("submitting command: " + WHITESPACE_JOINER.join(command));
}

private Path getSdkPath() {
@VisibleForTesting public Path getSdkPath() {
return sdkPath;
}

Expand All @@ -194,7 +195,7 @@ public Path getJavaAppEngineSdkPath() {
return getSdkPath().resolve(JAVA_APPENGINE_SDK_PATH);
}

private Path getJavaToolsJar() {
public Path getJavaToolsJar() {
return getJavaAppEngineSdkPath().resolve(JAVA_TOOLS_JAR);
}

Expand Down Expand Up @@ -252,9 +253,9 @@ public static class Builder {
* The home directory of Google Cloud SDK. If not set, will attempt to look for the SDK in known
* install locations.
*/
public Builder sdkPath(File sdkPathFile) {
public Builder sdkPath(Path sdkPathFile) {
if (sdkPathFile != null) {
this.sdkPath = sdkPathFile.toPath();
this.sdkPath = sdkPathFile;
}
return this;
}
Expand Down

0 comments on commit d19a956

Please sign in to comment.