summaryrefslogtreecommitdiff
path: root/library/self.gradle
diff options
context:
space:
mode:
authorMaurice Lam <yukl@google.com>2015-08-07 12:55:23 -0700
committerMaurice Lam <yukl@google.com>2015-08-18 10:11:28 -0700
commit3fa6e08ea0e8b2a9deff3096893cfa49761e2ac7 (patch)
tree40b4a202f3a8b4739d823e9055c36547112e31be /library/self.gradle
parentc4ca2b141d5a26450a769edb108fb37cf43a0ce3 (diff)
downloadsetupwizard-3fa6e08ea0e8b2a9deff3096893cfa49761e2ac7.tar.gz
[SuwLib] Enable lint for setup wizard library
Fix existing lint issues and enforce lint in all builds done in the ub-setupwizard-* tree. Lint will not be run or enforced in included builds (e.g. GMS core builds which builds setup wizard library from source using build.gradle file) Change-Id: I7c1f8e2dce38d455ff5b635f80255e09baea1263
Diffstat (limited to 'library/self.gradle')
-rw-r--r--library/self.gradle11
1 files changed, 10 insertions, 1 deletions
diff --git a/library/self.gradle b/library/self.gradle
index e809b51..b41b696 100644
--- a/library/self.gradle
+++ b/library/self.gradle
@@ -9,8 +9,17 @@ apply from: '../tools/gradle/docs.gradle'
task docs(dependsOn: 'javadocPlatformRelease')
+android.lintOptions {
+ abortOnError true
+}
+
+// Run lint for all variants
+android.libraryVariants.all { variant ->
+ variant.assemble.dependsOn(tasks.findByName('lint'))
+}
+
// Output all test APKs to the distribution folder
-def distTask = tasks.findByName('dist');
+def distTask = tasks.findByName('dist')
if (distTask) {
android.testVariants.all { variant ->
// Make the dist task depend on the test variant, so the test APK will be built