Support compile config for flavors and build types.
authorXavier Ducrohet <xav@android.com>
Fri, 5 Oct 2012 17:56:03 +0000 (10:56 -0700)
committerXavier Ducrohet <xav@android.com>
Sat, 6 Oct 2012 00:59:45 +0000 (17:59 -0700)
commitdc71ab2627ac4f4f8843dd0d5a1d84ac0f04662d
tree77c79f6230302df67176b79f4d616a1c3e9f449b
parentd14ea2c706561925d45feb30a1b57732bcefc383
Support compile config for flavors and build types.

Read dependency graph and create list of JarDependency
and AndroidDependency for each configuration.

Set Jars and AndroidDependency on each VariantConfig
object.

Add a AndroidDependency report task (called androidDependency)

The prepareDependenciesTask will prepare the same artifact
multiple time if it's used by different variants and they
are all built. This will be fixed in the next patch.

Change-Id: I4f11565c3629a54f022ecc82f81d4900ef2bd0c9
64 files changed:
.gitignore
builder/src/main/java/com/android/builder/AndroidBuilder.java
builder/src/main/java/com/android/builder/BundleDependency.java
builder/src/main/java/com/android/builder/VariantConfiguration.java
gradle/src/main/groovy/com/android/build/gradle/AndroidDependencyTask.groovy [new file with mode: 0644]
gradle/src/main/groovy/com/android/build/gradle/AppPlugin.groovy
gradle/src/main/groovy/com/android/build/gradle/BasePlugin.groovy
gradle/src/main/groovy/com/android/build/gradle/DependencyChecker.groovy
gradle/src/main/groovy/com/android/build/gradle/LibraryPlugin.groovy
gradle/src/main/groovy/com/android/build/gradle/PrepareDependenciesTask.groovy
gradle/src/main/groovy/com/android/build/gradle/internal/AndroidAsciiReportRenderer.java [new file with mode: 0644]
gradle/src/main/groovy/com/android/build/gradle/internal/AndroidDependencyImpl.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/ConfigurationDependencies.groovy [new file with mode: 0644]
gradle/src/main/groovy/com/android/build/gradle/internal/ProductFlavorData.groovy
testapps/flavorlib/app/build.gradle [new file with mode: 0644]
testapps/flavorlib/app/proguard-project.txt [new file with mode: 0644]
testapps/flavorlib/app/src/flavor1/res/values/strings.xml [new file with mode: 0644]
testapps/flavorlib/app/src/flavor2/res/values/strings.xml [new file with mode: 0644]
testapps/flavorlib/app/src/main/AndroidManifest.xml [new file with mode: 0644]
testapps/flavorlib/app/src/main/java/com/android/tests/flavorlib/app/App.java [new file with mode: 0644]
testapps/flavorlib/app/src/main/java/com/android/tests/flavorlib/app/MainActivity.java [new file with mode: 0644]
testapps/flavorlib/app/src/main/res/drawable-hdpi/icon.png [new file with mode: 0644]
testapps/flavorlib/app/src/main/res/drawable-ldpi/icon.png [new file with mode: 0644]
testapps/flavorlib/app/src/main/res/drawable-mdpi/icon.png [new file with mode: 0644]
testapps/flavorlib/app/src/main/res/layout/main.xml [new file with mode: 0644]
testapps/flavorlib/app/src/main/res/values/strings.xml [new file with mode: 0644]
testapps/flavorlib/app/src/main/resources/com/android/tests/flavorlib/app/App.txt [new file with mode: 0644]
testapps/flavorlib/app/src/test/java/com/android/tests/flavorlib/app/MainActivityTest.java [new file with mode: 0644]
testapps/flavorlib/app/src/testFlavor1/java/com/android/tests/flavorlib/app/MainActivityFlavorTest.java [new file with mode: 0644]
testapps/flavorlib/app/src/testFlavor2/java/com/android/tests/flavorlib/app/MainActivityFlavorTest.java [new file with mode: 0644]
testapps/flavorlib/build.gradle [new file with mode: 0644]
testapps/flavorlib/lib1/build.gradle [new file with mode: 0644]
testapps/flavorlib/lib1/proguard-project.txt [new file with mode: 0644]
testapps/flavorlib/lib1/src/main/AndroidManifest.xml [new file with mode: 0644]
testapps/flavorlib/lib1/src/main/java/com/android/tests/flavorlib/lib/Lib.java [new file with mode: 0644]
testapps/flavorlib/lib1/src/main/java/com/android/tests/flavorlib/lib/MainActivity.java [new file with mode: 0644]
testapps/flavorlib/lib1/src/main/res/drawable-hdpi/ic_launcher.png [new file with mode: 0644]
testapps/flavorlib/lib1/src/main/res/drawable-ldpi/ic_launcher.png [new file with mode: 0644]
testapps/flavorlib/lib1/src/main/res/drawable-mdpi/ic_launcher.png [new file with mode: 0644]
testapps/flavorlib/lib1/src/main/res/layout/lib_main.xml [new file with mode: 0644]
testapps/flavorlib/lib1/src/main/res/values/strings.xml [new file with mode: 0644]
testapps/flavorlib/lib1/src/main/resources/com/android/tests/flavorlib/lib/Lib.txt [new file with mode: 0644]
testapps/flavorlib/lib1/src/test/java/com/android/tests/flavorlib/lib/MainActivityTest.java [new file with mode: 0644]
testapps/flavorlib/lib2/build.gradle [new file with mode: 0644]
testapps/flavorlib/lib2/proguard-project.txt [new file with mode: 0644]
testapps/flavorlib/lib2/src/main/AndroidManifest.xml [new file with mode: 0644]
testapps/flavorlib/lib2/src/main/java/com/android/tests/flavorlib/lib/Lib.java [new file with mode: 0644]
testapps/flavorlib/lib2/src/main/java/com/android/tests/flavorlib/lib/MainActivity.java [new file with mode: 0644]
testapps/flavorlib/lib2/src/main/res/drawable-hdpi/ic_launcher.png [new file with mode: 0644]
testapps/flavorlib/lib2/src/main/res/drawable-ldpi/ic_launcher.png [new file with mode: 0644]
testapps/flavorlib/lib2/src/main/res/drawable-mdpi/ic_launcher.png [new file with mode: 0644]
testapps/flavorlib/lib2/src/main/res/layout/lib_main.xml [new file with mode: 0644]
testapps/flavorlib/lib2/src/main/res/values/strings.xml [new file with mode: 0644]
testapps/flavorlib/lib2/src/main/resources/com/android/tests/flavorlib/lib/Lib.txt [new file with mode: 0644]
testapps/flavorlib/lib2/src/test/java/com/android/tests/flavorlib/lib/MainActivityTest.java [new file with mode: 0644]
testapps/flavorlib/settings.gradle [new file with mode: 0644]
testapps/multiproject/build.gradle
testapps/repo/.gitignore [new file with mode: 0644]
testapps/repo/app/build.gradle
testapps/repo/baseLibrary/build.gradle
testapps/repo/library/build.gradle
testapps/repo/util/build.gradle