diff options
author | Raphael <raphael@google.com> | 2009-06-10 21:33:38 -0700 |
---|---|---|
committer | Raphael <raphael@google.com> | 2009-06-10 21:33:38 -0700 |
commit | 55f40e2537ab3809e6d10588f3d46b4c11b0ad64 (patch) | |
tree | 9a33a5301ef09f7fc7a8eebd18b86dc131d46bfa | |
parent | 6842384c2fcfb5d868033a1cce4f54d1a65fd122 (diff) | |
download | sdk-55f40e2537ab3809e6d10588f3d46b4c11b0ad64.zip sdk-55f40e2537ab3809e6d10588f3d46b4c11b0ad64.tar.gz sdk-55f40e2537ab3809e6d10588f3d46b4c11b0ad64.tar.bz2 |
ADT #1909458: fix 'android update project': "build.xml is too old"
-rw-r--r-- | sdkmanager/libs/sdklib/src/com/android/sdklib/internal/project/ProjectCreator.java | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/sdkmanager/libs/sdklib/src/com/android/sdklib/internal/project/ProjectCreator.java b/sdkmanager/libs/sdklib/src/com/android/sdklib/internal/project/ProjectCreator.java index 29dac83..1e16a83 100644 --- a/sdkmanager/libs/sdklib/src/com/android/sdklib/internal/project/ProjectCreator.java +++ b/sdkmanager/libs/sdklib/src/com/android/sdklib/internal/project/ProjectCreator.java @@ -391,13 +391,18 @@ public class ProjectCreator { File buildXml = new File(projectFolder, SdkConstants.FN_BUILD_XML); boolean needsBuildXml = projectName != null || !buildXml.exists(); if (!needsBuildXml) { - // Note that "<androidinit" must be followed by either a whitespace, a "/" (for the + // Look for for a classname="com.android.ant.SetupTask" attribute + needsBuildXml = !checkFileContainsRegexp(buildXml, + "classname=\"com.android.ant.SetupTask\""); //$NON-NLS-1$ + } + if (!needsBuildXml) { + // Note that "<setup" must be followed by either a whitespace, a "/" (for the // XML /> closing tag) or an end-of-line. This way we know the XML tag is really this // one and later we will be able to use an "androidinit2" tag or such as necessary. - needsBuildXml = !checkFileContainsRegexp(buildXml, "<androidinit(?:\\s|/|$)"); - if (needsBuildXml) { - println("File %1$s is too old and needs to be updated.", SdkConstants.FN_BUILD_XML); - } + needsBuildXml = !checkFileContainsRegexp(buildXml, "<setup(?:\\s|/|$)"); //$NON-NLS-1$ + } + if (needsBuildXml) { + println("File %1$s is too old and needs to be updated.", SdkConstants.FN_BUILD_XML); } if (needsBuildXml) { |