chiark / gitweb /
Maintiain android update project behaviour in new platform tools
authorCiaran Gultnieks <ciaran@ciarang.com>
Wed, 4 Jan 2012 22:58:37 +0000 (22:58 +0000)
committerCiaran Gultnieks <ciaran@ciarang.com>
Wed, 4 Jan 2012 22:58:37 +0000 (22:58 +0000)
common.py

index 052122bf37c2bc1d6a038bc11a8037c67a02c0c7..326975b7ab06b6a7c776034eb1fcb2f2583ffede 100644 (file)
--- a/common.py
+++ b/common.py
@@ -427,6 +427,13 @@ def prepare_source(vcs, app, build, build_dir, sdk_path, ndk_path, javacc_path,
         if build.has_key('target'):
             parms.append('-t')
             parms.append(build['target'])
+            # Newer versions of the platform tools don't replace the build.xml
+            # file as they always did previously, they spew out a nanny-like
+            # warning and tell you to do it manually. The following emulates
+            # the original behaviour...
+            buildxml = os.path.join(root_dir, 'build.xml')
+            if os.path.exists(buildxml):
+                os.remove(buildxml)
         if subprocess.call(parms, cwd=root_dir) != 0:
             raise BuildException("Failed to update project")