From 2968aa302061af725e26e69eb3e88d746d9b7a0d Mon Sep 17 00:00:00 2001 From: Piotr Gurgul Date: Mon, 24 Aug 2009 23:06:56 -0700 Subject: [PATCH] Ant properties names changed application-package to application.package sdk-location to sdk.dir android-jar to android.jar android-aidl to android.aidl in order to make their names compliant with the ant standards and rest of the property names. Properties names in alias rules deliberately ommited in this CL. Some minor style changes introduced. --- .../src/com/android/ant/SetupTask.java | 4 +- tools/scripts/android_rules.xml | 52 +++++++++---------- tools/scripts/build.template | 16 +++--- .../internal/project/ProjectProperties.java | 6 +-- 4 files changed, 39 insertions(+), 39 deletions(-) diff --git a/tools/anttasks/src/com/android/ant/SetupTask.java b/tools/anttasks/src/com/android/ant/SetupTask.java index 04afba7c5..e25d5846f 100644 --- a/tools/anttasks/src/com/android/ant/SetupTask.java +++ b/tools/anttasks/src/com/android/ant/SetupTask.java @@ -60,9 +60,9 @@ public final class SetupTask extends ImportTask { private final static String ANDROID_RULES = "android_rules.xml"; // ant property with the path to the android.jar - private final static String PROPERTY_ANDROID_JAR = "android-jar"; + private final static String PROPERTY_ANDROID_JAR = "android.jar"; // ant property with the path to the framework.jar - private final static String PROPERTY_ANDROID_AIDL = "android-aidl"; + private final static String PROPERTY_ANDROID_AIDL = "android.aidl"; // ant property with the path to the aapt tool private final static String PROPERTY_AAPT = "aapt"; // ant property with the path to the aidl tool diff --git a/tools/scripts/android_rules.xml b/tools/scripts/android_rules.xml index b8a53806d..4d41cae3c 100644 --- a/tools/scripts/android_rules.xml +++ b/tools/scripts/android_rules.xml @@ -6,7 +6,7 @@ com.android.ant.AndroidInitTask The following properties are put in place by the importing task: - android-jar, android-aidl, aapt, aidl, and dx + android.jar, android.aidl, aapt, aidl, and dx Additionnaly, the task sets up the following classpath reference: android.target.classpath @@ -16,15 +16,15 @@ + classpathref="android.antlibs" /> + classpathref="android.antlibs" /> - + @@ -45,22 +45,22 @@ - + - - - - - + + + + + - - + + @@ -88,7 +88,7 @@ - + @@ -96,11 +96,11 @@ Compiling aidl files into Java classes... - + - + @@ -114,8 +114,8 @@ - - + + @@ -127,7 +127,7 @@ - + @@ -143,7 +143,7 @@ manifest="AndroidManifest.xml" resources="${resource.dir}" assets="${asset.dir}" - androidjar="${android-jar}" + androidjar="${android.jar}" outfolder="${out.dir}" basename="${ant.project.name}" /> @@ -207,10 +207,10 @@ + addproperty="key.store.password" /> + addproperty="key.alias.password" /> Signing final apk... @@ -220,7 +220,7 @@ keystore="${key.store}" storepass="${key.store.password}" alias="${key.alias}" - keypass="${key.alias.password}"/> + keypass="${key.alias.password}" /> Running zip align on final apk... @@ -255,19 +255,19 @@ - + - Unable to run 'ant uninstall', application-package is not defined in build.properties + Unable to run 'ant uninstall', application.package is not defined in build.properties - Uninstalling ${application-package} from the default emulator or device... + Uninstalling ${application.package} from the default emulator or device... - + diff --git a/tools/scripts/build.template b/tools/scripts/build.template index 8a9ea7326..ca1595416 100644 --- a/tools/scripts/build.template +++ b/tools/scripts/build.template @@ -11,7 +11,7 @@ used by the Ant rules. Here are some properties you may want to change/update: - application-package + application.package the name of your application package as defined in the manifest. Used by the 'uninstall' rule. source.dir @@ -29,7 +29,7 @@ @@ -37,11 +37,11 @@ - - - - - + + + + + from android_rules.xml - paste it in this build.xml below the task. - disable the import by changing the setup task below to - + This will ensure that the properties are setup correctly but that your customized build steps are used. --> diff --git a/tools/sdkmanager/libs/sdklib/src/com/android/sdklib/internal/project/ProjectProperties.java b/tools/sdkmanager/libs/sdklib/src/com/android/sdklib/internal/project/ProjectProperties.java index f2b73c09e..8ab7fcb82 100644 --- a/tools/sdkmanager/libs/sdklib/src/com/android/sdklib/internal/project/ProjectProperties.java +++ b/tools/sdkmanager/libs/sdklib/src/com/android/sdklib/internal/project/ProjectProperties.java @@ -35,9 +35,9 @@ import java.util.Map.Entry; public final class ProjectProperties { /** The property name for the project target */ public final static String PROPERTY_TARGET = "target"; - public final static String PROPERTY_APK_CONFIGS = "apk-configurations"; - public final static String PROPERTY_SDK = "sdk-location"; - public final static String PROPERTY_APP_PACKAGE = "application-package"; + public final static String PROPERTY_APK_CONFIGS = "apk.configurations"; + public final static String PROPERTY_SDK = "sdk.dir"; + public final static String PROPERTY_APP_PACKAGE = "application.package"; public static enum PropertyType { BUILD("build.properties", BUILD_HEADER),