False positive Maven dependency lookup for buildConfigField in Android build.gradle.kts
#42117
Unanswered
wxxsfxyzm
asked this question in
Request Help
Replies: 1 comment 3 replies
-
|
A possible workaround has been described here -> #26039 |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
How are you running Renovate?
A Mend.io-hosted app
Which platform you running Renovate on?
GitHub.com
Which version of Renovate are you using?
43.66.4
Please tell us more about your question or problem
Hi team,
I'm running into a false positive warning on my Dependency Dashboard and wanted to check if there's a recommended configuration to fix this, or if it's a bug with the Gradle regex manager.
When using
buildConfigFieldin an Android project'sbuild.gradle.kts, Renovate seems to incorrectly parse the adjacent string arguments as a Maven dependency (groupId:artifactId), resulting in a "Failed to look up maven package" warning.Reproduction
In my
app/build.gradle.kts, I have the following standard Android configuration:productFlavors { create("Stable") { dimension = "level" buildConfigField("int", "BUILD_LEVEL", "2") buildConfigField("boolean", "INTERNET_ACCESS_ENABLED", "true") } }The Dependency Dashboard throws the following warning:
Renovate failed to look up the following dependencies: Failed to look up maven package int:BUILD_LEVEL.What I've tried
I attempted to bypass this lookup entirely by using
ignoreDepsin myrenovate.json:{ "ignoreDeps": [ "int:BUILD_LEVEL", "boolean:INTERNET_ACCESS_ENABLED" ] }However, the warning persists on the Dashboard. It seems the extraction phase fails and throws the warning before the
ignoreDepsrules can filter them out.Currently, the only working workaround to silence the warning is to extract the type into a variable to intentionally break the regex matcher:
Is there a better way to configure
renovate.jsonto ignore these false positives, or does the Gradle parser need an update to ignorebuildConfigFielddeclarations?Thanks!
Logs (if relevant)
Logs
Beta Was this translation helpful? Give feedback.
All reactions