Add support for building test apps.
authorXavier Ducrohet <xav@android.com>
Mon, 27 Aug 2012 21:02:11 +0000 (14:02 -0700)
committerXavier Ducrohet <xav@android.com>
Tue, 28 Aug 2012 02:28:53 +0000 (19:28 -0700)
commit205868b51d6a5f91765a0ccafa35bb161d777db2
treedcd01d17c86f3e776bbcc664ebbe6280ae2f9e4c
parent161b1d5a67e03d5b042d433f649d9c1e953185cc
Add support for building test apps.

Support for test apps testing apps only. Not support
for library projects yet. Lots of bug fixes to get here.

Renamed 'basic' to 'dependencies'. This will still need
to be refactored.

'basic' and 'flavored' are two new projects with that are
very simple and meant to test the build variant mechanism
which is tested by the test apks.

This also adds uninstall tasks as well as runTests tasks,
and creates top level install tasks.

Change-Id: I11bf62b236a4df6752b4195fd1989da3f93e29bd
63 files changed:
builder/build.gradle
builder/src/main/java/com/android/builder/AndroidBuilder.java
builder/src/main/java/com/android/builder/TemplateProcessor.java
builder/src/main/java/com/android/builder/TestManifestGenerator.java
builder/src/main/java/com/android/builder/VariantConfiguration.java
builder/src/main/resources/com/android/builder/AndroidManifest.template
gradle/src/main/groovy/com/android/build/gradle/AndroidBasePlugin.groovy
gradle/src/main/groovy/com/android/build/gradle/AndroidLogger.groovy
gradle/src/main/groovy/com/android/build/gradle/AndroidPlugin.groovy
gradle/src/main/groovy/com/android/build/gradle/InstallApplication.groovy
gradle/src/main/groovy/com/android/build/gradle/ProcessManifest.groovy [copied from gradle/src/main/groovy/com/android/build/gradle/MergeManifest.groovy with 87% similarity]
gradle/src/main/groovy/com/android/build/gradle/RunTestsTask.groovy [moved from gradle/src/main/groovy/com/android/build/gradle/GenerateTestManifest.groovy with 56% similarity]
gradle/src/main/groovy/com/android/build/gradle/UninstallApplication.groovy [moved from gradle/src/main/groovy/com/android/build/gradle/MergeManifest.groovy with 66% similarity]
gradle/src/main/groovy/com/android/build/gradle/internal/AndroidManifest.groovy [deleted file]
gradle/src/main/groovy/com/android/build/gradle/internal/AndroidSourceSet.groovy
gradle/src/main/groovy/com/android/build/gradle/internal/ApplicationVariant.groovy
gradle/src/main/groovy/com/android/build/gradle/internal/BuildTypeData.groovy
gradle/src/main/groovy/com/android/build/gradle/internal/ProductFlavorData.groovy
gradle/src/main/groovy/com/android/build/gradle/internal/ProductionAppVariant.groovy
gradle/src/main/groovy/com/android/build/gradle/internal/TestAppVariant.groovy
testapps/basic/AllTests.java [new file with mode: 0644]
testapps/basic/build.gradle
testapps/basic/src/main/AndroidManifest.xml
testapps/basic/src/main/java/com/android/tests/basic/Main.java [new file with mode: 0644]
testapps/basic/src/main/res/drawable/icon.png [new file with mode: 0644]
testapps/basic/src/main/res/layout/main.xml
testapps/basic/src/main/res/values/strings.xml
testapps/basic/src/release/res/values/strings.xml [new file with mode: 0644]
testapps/basic/src/test/java/com/android/tests/basic/MainTest.java [new file with mode: 0644]
testapps/dependencies/build.gradle [new file with mode: 0644]
testapps/dependencies/debug.keystore [new file with mode: 0644]
testapps/dependencies/src/main/AndroidManifest.xml [new file with mode: 0644]
testapps/dependencies/src/main/java/org/gradle/sample/BuildType.java [moved from testapps/basic/src/main/java/org/gradle/sample/BuildType.java with 100% similarity]
testapps/dependencies/src/main/java/org/gradle/sample/MainActivity.java [moved from testapps/basic/src/main/java/org/gradle/sample/MainActivity.java with 100% similarity]
testapps/dependencies/src/main/java/org/gradle/sample/Person.java [moved from testapps/basic/src/main/java/org/gradle/sample/Person.java with 100% similarity]
testapps/dependencies/src/main/java/org/gradle/sample/ShowPeopleActivity.java [moved from testapps/basic/src/main/java/org/gradle/sample/ShowPeopleActivity.java with 100% similarity]
testapps/dependencies/src/main/res/drawable-hdpi/ic_launcher.png [moved from testapps/basic/src/main/res/drawable-hdpi/ic_launcher.png with 100% similarity]
testapps/dependencies/src/main/res/drawable-ldpi/ic_launcher.png [moved from testapps/basic/src/main/res/drawable-ldpi/ic_launcher.png with 100% similarity]
testapps/dependencies/src/main/res/drawable-mdpi/ic_launcher.png [moved from testapps/basic/src/main/res/drawable-mdpi/ic_launcher.png with 100% similarity]
testapps/dependencies/src/main/res/drawable-xhdpi/ic_launcher.png [moved from testapps/basic/src/main/res/drawable-xhdpi/ic_launcher.png with 100% similarity]
testapps/dependencies/src/main/res/layout/main.xml [new file with mode: 0644]
testapps/dependencies/src/main/res/values/strings.xml [new file with mode: 0644]
testapps/flavored/build.gradle
testapps/flavored/src/f1/res/values/strings.xml [new file with mode: 0644]
testapps/flavored/src/f2/AndroidManifest.xml [new file with mode: 0644]
testapps/flavored/src/f2/java/com/android/tests/flavored/OtherActivity.java [new file with mode: 0644]
testapps/flavored/src/f2/res/layout/main2.xml [new file with mode: 0644]
testapps/flavored/src/f2/res/values/strings.xml [new file with mode: 0644]
testapps/flavored/src/main/AndroidManifest.xml
testapps/flavored/src/main/java/com/android/tests/flavored/Main.java [new file with mode: 0644]
testapps/flavored/src/main/java/org/gradle/sample/BuildType.java [deleted file]
testapps/flavored/src/main/java/org/gradle/sample/MainActivity.java [deleted file]
testapps/flavored/src/main/java/org/gradle/sample/Person.java [deleted file]
testapps/flavored/src/main/java/org/gradle/sample/ShowPeopleActivity.java [deleted file]
testapps/flavored/src/main/res/drawable-hdpi/ic_launcher.png [deleted file]
testapps/flavored/src/main/res/drawable-ldpi/ic_launcher.png [deleted file]
testapps/flavored/src/main/res/drawable-mdpi/ic_launcher.png [deleted file]
testapps/flavored/src/main/res/drawable-xhdpi/ic_launcher.png [deleted file]
testapps/flavored/src/main/res/drawable/icon.png [new file with mode: 0644]
testapps/flavored/src/main/res/layout/main.xml
testapps/flavored/src/main/res/values/strings.xml
testapps/flavored/src/test/java/com/android/tests/flavored/MainTest.java [new file with mode: 0644]
testapps/flavored/src/testF2/java/com/android/tests/flavored/OtherActivityTest.java [new file with mode: 0644]