Same lint config for all modules
This commit is contained in:
parent
dcfd0bad6b
commit
a6ee025eda
5 changed files with 12 additions and 10 deletions
|
|
@ -109,12 +109,6 @@ android {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
lint {
|
|
||||||
lintConfig = file("../tools/lint/lint.xml")
|
|
||||||
checkDependencies = true
|
|
||||||
abortOnError = true
|
|
||||||
}
|
|
||||||
|
|
||||||
// See https://github.com/JLLeitschuh/ktlint-gradle#configuration
|
// See https://github.com/JLLeitschuh/ktlint-gradle#configuration
|
||||||
configure<org.jlleitschuh.gradle.ktlint.KtlintExtension> {
|
configure<org.jlleitschuh.gradle.ktlint.KtlintExtension> {
|
||||||
// See https://github.com/pinterest/ktlint/releases/
|
// See https://github.com/pinterest/ktlint/releases/
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,10 @@ package extension
|
||||||
|
|
||||||
import Versions
|
import Versions
|
||||||
import com.android.build.api.dsl.CommonExtension
|
import com.android.build.api.dsl.CommonExtension
|
||||||
|
import org.gradle.api.Project
|
||||||
|
import java.io.File
|
||||||
|
|
||||||
fun CommonExtension<*, *, *, *>.androidConfig() {
|
fun CommonExtension<*, *, *, *>.androidConfig(project: Project) {
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
compileSdk = Versions.compileSdk
|
compileSdk = Versions.compileSdk
|
||||||
minSdk = Versions.minSdk
|
minSdk = Versions.minSdk
|
||||||
|
|
@ -17,6 +19,12 @@ fun CommonExtension<*, *, *, *>.androidConfig() {
|
||||||
testOptions {
|
testOptions {
|
||||||
unitTests.isReturnDefaultValues = true
|
unitTests.isReturnDefaultValues = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
lint {
|
||||||
|
lintConfig = File("${project.rootDir}/tools/lint/lint.xml")
|
||||||
|
checkDependencies = true
|
||||||
|
abortOnError = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun CommonExtension<*, *, *, *>.composeConfig() {
|
fun CommonExtension<*, *, *, *>.composeConfig() {
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ plugins {
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
androidConfig()
|
androidConfig(project)
|
||||||
composeConfig()
|
composeConfig()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ plugins {
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
androidConfig()
|
androidConfig(project)
|
||||||
composeConfig()
|
composeConfig()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,5 +6,5 @@ plugins {
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
androidConfig()
|
androidConfig(project)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue