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
30 lines
774 B
Groovy
30 lines
774 B
Groovy
/**
|
|
* This self.gradle build file is only run when built in ub-setupwizard-* branches.
|
|
*/
|
|
|
|
apply plugin: 'dist'
|
|
|
|
apply from: 'build.gradle'
|
|
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')
|
|
if (distTask) {
|
|
android.testVariants.all { variant ->
|
|
// Make the dist task depend on the test variant, so the test APK will be built
|
|
distTask.dependsOn variant.assemble
|
|
// TODO: remap the different test variants to different file names
|
|
}
|
|
}
|