From 3d3c3c3a3e4e05f7ae7a0dff440fe500f90b785c Mon Sep 17 00:00:00 2001 From: Xavier Ducrohet Date: Tue, 31 Aug 2010 10:21:29 -0700 Subject: ADT: Make release and debug builds really different. Release export should not be debug builds that are stripped of their signature and (optionnaly) resigned. Instead they should actually build the apk in "release" mode. Refactor PostCompilerHelper to be easier to use for export feature (moved all error handling into the actual IncrementalBuilder since we don't want the helper to put error/warning marker during release export). Update the API of ApkBuilder and PostCompilerHelper to deal better with signing key: - option to package with a "sign with debug" flag. - new option to package/sign with given keys. Debug build (through incremental builder) use the new aapt option --debug-mode that automatically insert debuggable=true in the manifest. This allows for the same source code to generate debug and release builds. Currently, only the "export unsigned release apk" action use the new "release" build. Need to update the export wizard. Also need to add support for this in Ant. New folder in sdk.git/testapps for test projects to be used in upcoming automated build tests. Simple "basicProject" to start with. Change-Id: I3041312bc817153603656de2aa355f8fcaf00b5b --- testapps/.gitignore | 3 + testapps/README.txt | 6 ++ testapps/basicProject/.classpath | 7 ++ testapps/basicProject/.project | 33 ++++++++ testapps/basicProject/AndroidManifest.xml | 16 ++++ testapps/basicProject/build.properties | 17 +++++ testapps/basicProject/build.xml | 84 +++++++++++++++++++++ testapps/basicProject/default.properties | 11 +++ testapps/basicProject/res/drawable-hdpi/icon.png | Bin 0 -> 4147 bytes testapps/basicProject/res/drawable-ldpi/icon.png | Bin 0 -> 1723 bytes testapps/basicProject/res/drawable-mdpi/icon.png | Bin 0 -> 2574 bytes testapps/basicProject/res/layout/main.xml | 13 ++++ testapps/basicProject/res/values/strings.xml | 4 + .../src/com/android/tests/basicproject/Main.java | 15 ++++ 14 files changed, 209 insertions(+) create mode 100644 testapps/.gitignore create mode 100644 testapps/README.txt create mode 100644 testapps/basicProject/.classpath create mode 100644 testapps/basicProject/.project create mode 100644 testapps/basicProject/AndroidManifest.xml create mode 100644 testapps/basicProject/build.properties create mode 100644 testapps/basicProject/build.xml create mode 100644 testapps/basicProject/default.properties create mode 100644 testapps/basicProject/res/drawable-hdpi/icon.png create mode 100644 testapps/basicProject/res/drawable-ldpi/icon.png create mode 100644 testapps/basicProject/res/drawable-mdpi/icon.png create mode 100644 testapps/basicProject/res/layout/main.xml create mode 100644 testapps/basicProject/res/values/strings.xml create mode 100644 testapps/basicProject/src/com/android/tests/basicproject/Main.java (limited to 'testapps') diff --git a/testapps/.gitignore b/testapps/.gitignore new file mode 100644 index 000000000..0c75cfd48 --- /dev/null +++ b/testapps/.gitignore @@ -0,0 +1,3 @@ +*/bin +*/local.properties +*/gen diff --git a/testapps/README.txt b/testapps/README.txt new file mode 100644 index 000000000..e76bc4de2 --- /dev/null +++ b/testapps/README.txt @@ -0,0 +1,6 @@ +This repository contains test applications used by the SDK automated tests. + +These are not meant to be packaged with the SDK. + +Each project represents a different test case. For more information, read +the readme file located in the project directory. \ No newline at end of file diff --git a/testapps/basicProject/.classpath b/testapps/basicProject/.classpath new file mode 100644 index 000000000..609aa00eb --- /dev/null +++ b/testapps/basicProject/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/testapps/basicProject/.project b/testapps/basicProject/.project new file mode 100644 index 000000000..2bf35ceee --- /dev/null +++ b/testapps/basicProject/.project @@ -0,0 +1,33 @@ + + + BasicProject + + + + + + com.android.ide.eclipse.adt.ResourceManagerBuilder + + + + + com.android.ide.eclipse.adt.PreCompilerBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.android.ide.eclipse.adt.ApkBuilder + + + + + + com.android.ide.eclipse.adt.AndroidNature + org.eclipse.jdt.core.javanature + + diff --git a/testapps/basicProject/AndroidManifest.xml b/testapps/basicProject/AndroidManifest.xml new file mode 100644 index 000000000..978c71ead --- /dev/null +++ b/testapps/basicProject/AndroidManifest.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + diff --git a/testapps/basicProject/build.properties b/testapps/basicProject/build.properties new file mode 100644 index 000000000..edc7f2305 --- /dev/null +++ b/testapps/basicProject/build.properties @@ -0,0 +1,17 @@ +# This file is used to override default values used by the Ant build system. +# +# This file must be checked in Version Control Systems, as it is +# integral to the build system of your project. + +# This file is only used by the Ant script. + +# You can use this to override default values such as +# 'source.dir' for the location of your java source folder and +# 'out.dir' for the location of your output folder. + +# You can also use it define how the release builds are signed by declaring +# the following properties: +# 'key.store' for the location of your keystore and +# 'key.alias' for the name of the key to use. +# The password will be asked during the build when you use the 'release' target. + diff --git a/testapps/basicProject/build.xml b/testapps/basicProject/build.xml new file mode 100644 index 000000000..9ac802ced --- /dev/null +++ b/testapps/basicProject/build.xml @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/testapps/basicProject/default.properties b/testapps/basicProject/default.properties new file mode 100644 index 000000000..640d5d42d --- /dev/null +++ b/testapps/basicProject/default.properties @@ -0,0 +1,11 @@ +# This file is automatically generated by Android Tools. +# Do not modify this file -- YOUR CHANGES WILL BE ERASED! +# +# This file must be checked in Version Control Systems. +# +# To customize properties used by the Ant build system use, +# "build.properties", and override values to adapt the script to your +# project structure. + +# Project target. +target=android-AOSP diff --git a/testapps/basicProject/res/drawable-hdpi/icon.png b/testapps/basicProject/res/drawable-hdpi/icon.png new file mode 100644 index 000000000..8074c4c57 Binary files /dev/null and b/testapps/basicProject/res/drawable-hdpi/icon.png differ diff --git a/testapps/basicProject/res/drawable-ldpi/icon.png b/testapps/basicProject/res/drawable-ldpi/icon.png new file mode 100644 index 000000000..1095584ec Binary files /dev/null and b/testapps/basicProject/res/drawable-ldpi/icon.png differ diff --git a/testapps/basicProject/res/drawable-mdpi/icon.png b/testapps/basicProject/res/drawable-mdpi/icon.png new file mode 100644 index 000000000..a07c69fa5 Binary files /dev/null and b/testapps/basicProject/res/drawable-mdpi/icon.png differ diff --git a/testapps/basicProject/res/layout/main.xml b/testapps/basicProject/res/layout/main.xml new file mode 100644 index 000000000..829994ccf --- /dev/null +++ b/testapps/basicProject/res/layout/main.xml @@ -0,0 +1,13 @@ + + + + + diff --git a/testapps/basicProject/res/values/strings.xml b/testapps/basicProject/res/values/strings.xml new file mode 100644 index 000000000..549e4ea50 --- /dev/null +++ b/testapps/basicProject/res/values/strings.xml @@ -0,0 +1,4 @@ + + + Main + diff --git a/testapps/basicProject/src/com/android/tests/basicproject/Main.java b/testapps/basicProject/src/com/android/tests/basicproject/Main.java new file mode 100644 index 000000000..124055646 --- /dev/null +++ b/testapps/basicProject/src/com/android/tests/basicproject/Main.java @@ -0,0 +1,15 @@ +package com.android.tests.basicproject; + +import android.app.Activity; +import android.os.Bundle; + +public class Main extends Activity +{ + /** Called when the activity is first created. */ + @Override + public void onCreate(Bundle savedInstanceState) + { + super.onCreate(savedInstanceState); + setContentView(R.layout.main); + } +} -- cgit v1.2.3