pachli-android/checks/build.gradle
sanao 4b7eb2419e
refactor: Use com.google.android.material.appbar.MaterialToolbar
The previous code used `androidx.appcompat.widget.Toolbar` in a several
places.

It's better to use `MaterialToolbar` as that plays better with other
Material components.

Update the usage throughout the project.

In addition, implement a lint check that will prevent any future use
from creeping back in.

Fixes #28
2023-11-05 13:51:37 +01:00

37 lines
1.0 KiB
Groovy

plugins {
id "java-library"
id "kotlin"
id "com.android.lint"
}
lintOptions {
htmlReport(true)
htmlOutput(file("lint-report.html"))
textReport(true)
absolutePaths(false)
ignoreTestSources(true)
}
jar {
manifest {
attributes("Lint-Registry-v2": "app.pachli.lint.checks.LintRegistry")
}
}
dependencies {
compileOnly("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.61")
// Derived from the AGP version. If the AGP version is X.Y.Z the version
// here must by X+23.Y.Z.
// See https://github.com/googlesamples/android-custom-lint-rules#lint-version
def lintVersion = "31.1.2" // = AGP 8.1.2
// For a description of the below dependencies, see the main project README
compileOnly("com.android.tools.lint:lint-api:$lintVersion")
compileOnly("com.android.tools.lint:lint-checks:$lintVersion")
testImplementation("com.android.tools.lint:lint:$lintVersion")
testImplementation("com.android.tools.lint:lint-tests:$lintVersion")
testImplementation("junit:junit:4.13.2")
}