aboutsummaryrefslogtreecommitdiff
path: root/tests/api
diff options
context:
space:
mode:
authorXavier Ducrohet <xav@android.com>2013-05-23 14:20:47 -0700
committerXavier Ducrohet <xav@android.com>2013-05-23 14:42:38 -0700
commitc070dfca4fc6133f1f612f8dec79399edbfbb8a5 (patch)
tree3233a2df1db186422a97f9f0277c891c775e6b10 /tests/api
parent5811c6adb891bfbb3a73b7018f3f17cbdee4ef08 (diff)
downloadbuild-c070dfca4fc6133f1f612f8dec79399edbfbb8a5.tar.gz
Fix package scope.
- rename all package scopes to apk since "package" is a reserved keyword in Java/Groovy and build.gradle files are Groovy files! - actually implement support for package-only dependencies. Change-Id: I6c887320a2d70cf8fdd2d5bca64cbef3ff80e85d
Diffstat (limited to 'tests/api')
-rw-r--r--tests/api/app/build.gradle8
-rw-r--r--tests/api/lib/build.gradle6
2 files changed, 13 insertions, 1 deletions
diff --git a/tests/api/app/build.gradle b/tests/api/app/build.gradle
index 0cf9a85..3917685 100644
--- a/tests/api/app/build.gradle
+++ b/tests/api/app/build.gradle
@@ -22,4 +22,12 @@ android.applicationVariants.each { variant ->
// now make the dex task depend on it and use its output
variant.dex.dependsOn jarTask
variant.dex.sourceFiles = files(jarTask.archivePath).files
+}
+
+if (android.applicationVariants.size() != 2) {
+ throw new GradleException("Wrong number of app variants!")
+}
+
+if (android.testVariants.size() != 1) {
+ throw new GradleException("Wrong number of test variants!")
} \ No newline at end of file
diff --git a/tests/api/lib/build.gradle b/tests/api/lib/build.gradle
index a354f5b..38791d2 100644
--- a/tests/api/lib/build.gradle
+++ b/tests/api/lib/build.gradle
@@ -15,4 +15,8 @@ android.libraryVariants.each { variant ->
// now make the package task depend on it
variant.packageLibrary.dependsOn copyBlahTask
-} \ No newline at end of file
+}
+
+if (android.libraryVariants.size() != 2) {
+ throw new GradleException("Wrong number of app variants!")
+}