Skip to content

Commit

Permalink
Merge pull request #44 from bigdavedev/master
Browse files Browse the repository at this point in the history
[FIXED JENKINS-23134] Replace File.separator with "/".

Fixes inability to launch Android tools on Unix slaves from a Windows master.
  • Loading branch information
orrc committed Jan 22, 2015
2 parents a0589ce + 28f76bb commit 98d2a53
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Expand Up @@ -4,6 +4,6 @@

public class DefaultToolLocator implements ToolLocator {
public String findInSdk(AndroidSdk androidSdk, Tool tool) {
return File.separator + "tools" + File.separator;
return "/tools/";
}
}
Expand Up @@ -4,7 +4,7 @@
import java.io.File;

public class PlatformToolLocator implements ToolLocator {
private static final String BUILD_TOOLS_PATH = File.separator + "build-tools" + File.separator;
private static final String BUILD_TOOLS_PATH = "/build-tools/";

public String findInSdk(AndroidSdk androidSdk, Tool tool) throws SdkInstallationException {
if (tool == Tool.AAPT) {
Expand All @@ -15,14 +15,14 @@ public String findInSdk(AndroidSdk androidSdk, Tool tool) throws SdkInstallation
return getFirstInstalledBuildToolsDir(subDirs);
}
}
return File.separator + "platform-tools" + File.separator;
return "/platform-tools/";

}

private String getFirstInstalledBuildToolsDir(String[] buildToolsDirs) throws SdkInstallationException {
if (buildToolsDirs.length == 0) {
throw new SdkInstallationException("Please install at least one set of build-tools.");
}
return BUILD_TOOLS_PATH + buildToolsDirs[0] + File.separator;
return BUILD_TOOLS_PATH + buildToolsDirs[0] + "/";
}
}

0 comments on commit 98d2a53

Please sign in to comment.