Skip to content

Commit 88d6053

Browse files
committed
use command-line tools naming
1 parent 1043bc9 commit 88d6053

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

mode/src/processing/mode/android/AndroidSDK.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@ class AndroidSDK {
5858
final static private int TEXT_MARGIN = Toolkit.zoom(8);
5959
final static private int TEXT_WIDTH = Toolkit.zoom(300);
6060

61-
private final File folder;
62-
private final File tools;
61+
private final File folder;
6362
private final File platforms;
6463
private final File highestPlatform;
6564
private final File androidJar;
6665
private final File platformTools;
6766
private final File buildTools;
67+
private final File cmdlineTools;
6868
private final File avdManager;
6969
private final File sdkManager;
7070
private final File emulator;
@@ -99,8 +99,8 @@ public AndroidSDK(File folder) throws BadSDKException, IOException {
9999
throw new BadSDKException(AndroidMode.getTextString("android_sdk.error.missing_sdk_folder", folder));
100100
}
101101

102-
tools = new File(folder, "tools");
103-
if (!tools.exists()) {
102+
cmdlineTools = new File(folder, "cmdline-tools");
103+
if (!cmdlineTools.exists()) {
104104
throw new BadSDKException(AndroidMode.getTextString("android_sdk.error.missing_tools_folder", folder));
105105
}
106106

@@ -141,23 +141,23 @@ public AndroidSDK(File folder) throws BadSDKException, IOException {
141141
AndroidBuild.TARGET_SDK, highestPlatform.getAbsolutePath()));
142142
}
143143

144-
avdManager = findCliTool(new File(tools, "bin"), "avdmanager");
145-
sdkManager = findCliTool(new File(tools, "bin"), "sdkmanager");
144+
avdManager = findCliTool(new File(cmdlineTools, "bin"), "avdmanager");
145+
sdkManager = findCliTool(new File(cmdlineTools, "bin"), "sdkmanager");
146146

147147
File emuFolder = new File(folder, "emulator");
148148
if (emuFolder.exists()) {
149149
// First try the new location of the emulator inside its own folder
150150
emulator = findCliTool(emuFolder, "emulator");
151151
} else {
152152
// If not found, use old location inside tools
153-
emulator = findCliTool(tools, "emulator");
153+
emulator = findCliTool(cmdlineTools, "emulator");
154154
}
155155

156156
String path = Platform.getenv("PATH");
157157

158158
Platform.setenv("ANDROID_SDK", folder.getCanonicalPath());
159159
path = platformTools.getCanonicalPath() + File.pathSeparator +
160-
tools.getCanonicalPath() + File.pathSeparator + path;
160+
cmdlineTools.getCanonicalPath() + File.pathSeparator + path;
161161

162162
String javaHomeProp = System.getProperty("java.home");
163163
File javaHome = new File(javaHomeProp).getCanonicalFile();
@@ -243,8 +243,8 @@ public File getAndroidJarPath() {
243243
}
244244

245245

246-
public File getToolsFolder() {
247-
return tools;
246+
public File getCommandLineToolsFolder() {
247+
return cmdlineTools;
248248
}
249249

250250

0 commit comments

Comments
 (0)