Index: build/android/devil/env/android_sdk_config.py |
diff --git a/build/android/devil/env/android_sdk_config.py b/build/android/devil/env/android_sdk_config.py |
new file mode 100644 |
index 0000000000000000000000000000000000000000..ac6f8caa06cc08814f4978c37bba6c412fa029da |
--- /dev/null |
+++ b/build/android/devil/env/android_sdk_config.py |
@@ -0,0 +1,31 @@ |
+# Copyright 2015 The Chromium Authors. All rights reserved. |
+# Use of this source code is governed by a BSD-style license that can be |
+# found in the LICENSE file. |
+ |
+import os |
+ |
+from devil.env import env_config |
+ |
+DEFAULT_BUILD_TOOLS_VERSION = '23.0.0' |
+DEVIL_ANDROID_SDK_ROOT = 'DEVIL_ANDROID_SDK_ROOT' |
perezju
2015/09/10 09:45:48
nit: it's not clear from the name if this is the _
jbudorick
2015/09/12 02:31:04
obsolete
|
+ |
+ |
+class AndroidSdkConfig(env_config.EnvConfig): |
+ |
+ @property |
+ def root_path(self): |
+ return (self._configured.get('root_path') |
aiolos (Not reviewing)
2015/09/10 12:25:50
You could use the dependency_manager instead. You
jbudorick
2015/09/12 02:31:05
Done, and the current dependency on telemetry/cata
|
+ or os.environ.get(DEVIL_ANDROID_SDK_ROOT)) |
mikecase (-- gone --)
2015/09/10 00:54:16
I think this could be a little confusing since the
perezju
2015/09/10 09:45:48
+1 to raising an exception. Either that or providi
jbudorick
2015/09/12 02:31:05
need to verify how the new dependency_manager impl
|
+ |
+ @property |
+ def adb_path(self): |
+ return (self._configured.get('adb_path') |
+ or os.path.join(self.root_path, 'platform-tools', 'adb')) |
+ |
+ @property |
+ def build_tools_path(self): |
+ return os.path.join( |
+ self.root_path, 'build-tools', |
+ self._configured.get('build_tools_version', |
+ DEFAULT_BUILD_TOOLS_VERSION)) |
+ |