Hello :wave::skin-tone-3: I’m trying to set a `lin...
# android
l
Hello 👋🏼 I’m trying to set a
lintBaseline
, following the docs, I should use:
Copy code
lint {
   baseline file("lint-baseline.xml")
}
But this give me this error:
Copy code
* What went wrong:
'void com.android.build.api.dsl.Lint.baseline(java.io.File)'
While using
Copy code
lint {
   baseline(file("lint-baseline.xml"))
}
Give me this error:
Copy code
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?
not kotlin but kotlin colored 3
m
I believe it should be:
Copy code
lint {
   baseline = file("lint-baseline.xml")
}
because baseline is a property not a method. Also, there is a dedicated channel for this type of questions #gradle, it is off-topic here.
l
😞
m
weird 🤨 what AGP version are you on?
l
8.0.2
m
There is no function called
baseline
in AGP's
Lint
API 8.0.2. try to gradle sync & see if it helps.
l
I tried sync already
m
what if you tried to provide the string path "lint-baseline.xml" directly as a parameter?
Copy code
baseline("lint-baseline.xml")
l
Copy code
Unable to find method ''void com.android.build.api.dsl.Lint.baseline(java.lang.String)''
'void com.android.build.api.dsl.Lint.baseline(java.lang.String)'
m
looks weird! the error message was suggesting that, my last advice is posting this question in #gradle you might get helpful answers there.