mirror of
https://github.com/ankidroid/Anki-Android.git
synced 2024-09-20 03:52:15 +02:00
c6fd9a0664
> If I understand it correctly based on the text provided in the > output, is not actionable by us - it is an upstream issue. > I've taken it upon myself to PR upstream lots of times for things > that affect AnkiDroid (in requery, doing google-analytics-java, > google libraries etc) but this seems like it will be recurring > and upstream, and for me that's just upstream responsibility, > no action for me. So not worth seeing Documented in #6211
35 lines
1.7 KiB
Groovy
35 lines
1.7 KiB
Groovy
tasks.whenTaskAdded { task ->
|
|
if (task.name.startsWith("lint")) {
|
|
if (task.name.toLowerCase().endsWith("release")) {
|
|
task.doFirst {
|
|
android.lintOptions.abortOnError = true
|
|
android.lintOptions.warningsAsErrors true
|
|
android.lintOptions.check 'NewApi', 'InlinedApi'
|
|
}
|
|
} else {
|
|
task.doFirst {
|
|
// move the baseline by deleting api/baseline.xml and AnkiDroid/baseline.xml then ./gradlew lintDebug
|
|
android.lintOptions.baseline file('./lint-baseline.xml')
|
|
// # SyntheticAccessor
|
|
// See discussion on #6205 - we should fix these for performance, but low priority
|
|
// compared to other more significant warnings.
|
|
|
|
// # ObsoleteLintCustomCheck
|
|
// Requested in #6211 - not actionable by us - upstream issue
|
|
// Sample:
|
|
// > Warning: Lint found an issue registry
|
|
// > (androidx.appcompat.AppCompatIssueRegistry) which requires a newer API level.
|
|
// > That means that the custom lint checks are intended for a newer lint version;
|
|
// > please upgrade
|
|
android.lintOptions.disable 'SyntheticAccessor', 'ObsoleteLintCustomCheck'
|
|
android.lintOptions.abortOnError true
|
|
android.lintOptions.checkAllWarnings true
|
|
android.lintOptions.warningsAsErrors true
|
|
android.lintOptions.showAll true
|
|
android.lintOptions.textReport true
|
|
android.lintOptions.textOutput 'stdout'
|
|
android.lintOptions.htmlReport true
|
|
}
|
|
}
|
|
}
|
|
} |