Skip to content

Commit

Permalink
Ref #12: add automatic lint check
Browse files Browse the repository at this point in the history
  • Loading branch information
dkazakov committed Mar 1, 2024
1 parent fc1c9f9 commit c99b046
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions mobile/app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import com.android.build.gradle.internal.tasks.factory.dependsOn
import java.util.Locale

plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
Expand Down Expand Up @@ -30,6 +33,17 @@ android {
kotlinOptions {
jvmTarget = libs.versions.jvmTarget.get().toString()
}
lint {
abortOnError = true
// disable 'ContentDescription'
}
applicationVariants.configureEach {
val variantName =
name.replaceFirstChar { if (it.isLowerCase()) it.titlecase(Locale.ENGLISH) else it.toString() }
val lintTaskName = "lint$variantName"
val lintTask = tasks.named("lint$variantName")
assembleProvider.dependsOn(lintTask, tasks.named(lintTaskName))
}
}

dependencies {
Expand Down

0 comments on commit c99b046

Please sign in to comment.