Luca Nicoletti
06/30/2023, 1:10 PMlintBaseline, following the docs, I should use:
lint {
baseline file("lint-baseline.xml")
}
But this give me this error:
* What went wrong:
'void com.android.build.api.dsl.Lint.baseline(java.io.File)'
While using
lint {
baseline(file("lint-baseline.xml"))
}
Give me this error:
Unable to find method ''void com.android.build.api.dsl.Lint.baseline(java.io.File)''
'void com.android.build.api.dsl.Lint.baseline(java.io.File)'
Anyone know how to solve this? Which is the correct(current) syntax for a .gradle.kts file?
Thread in Slack ConversationVampire
06/30/2023, 1:38 PMLuca Nicoletti
06/30/2023, 1:39 PMandroid {} in my build.gradle.kts fileVampire
06/30/2023, 1:39 PMandroid {
lint {
baseline = file("lint-baseline.xml")
}
}Luca Nicoletti
06/30/2023, 1:39 PMVampire
06/30/2023, 1:40 PMLuca Nicoletti
06/30/2023, 1:40 PMVampire
06/30/2023, 1:40 PMLuca Nicoletti
06/30/2023, 1:41 PMbuild.gradle.kts:25:9: Function invocation 'baseline(...)' expectedVampire
06/30/2023, 1:42 PM--scan that you can share?Luca Nicoletti
06/30/2023, 1:43 PM* What went wrong:
Script compilation errors:
Line 25: baseline = file("lint-baseline.xml")
^ Function invocation 'baseline(...)' expected
Line 25: baseline = file("lint-baseline.xml")
^ None of the following functions can be called with the arguments supplied:
public abstract fun baseline(baselineFile: File): Unit defined in com.android.build.api.dsl.Lint
public abstract fun baseline(baseline: String): Unit defined in com.android.build.api.dsl.Lint
2 errorsVampire
06/30/2023, 1:46 PMCan it produce a buildthat you can share?--scan
Luca Nicoletti
06/30/2023, 1:47 PM./gradlew build --scanVampire
06/30/2023, 1:47 PMCtrl+Click the baseline, where do you end up?Vampire
06/30/2023, 1:48 PMbaseline = file("") works fine as baseline is a File property of LintVampire
06/30/2023, 1:59 PM