dependabot-core
dependabot-core copied to clipboard
[Gradle] Handle plugin version variables without string interpolation
Fixes #4127
This change allows direct variables in place of versions to be used in Gradle Plugins scope without the need to redundantly interpolate them in a string.
This PR addresses the following issue:
Does not work - versions are ignored by Dependabot:
plugins {
val kotlinVersion = "1.7.0"
kotlin("jvm") version kotlinVersion
kotlin("plugin.spring") version kotlinVersion
}
Works as a workaround - versions are picked up correctly:
plugins {
val kotlinVersion = "1.7.0"
kotlin("jvm") version "$kotlinVersion"
kotlin("plugin.spring") version "$kotlinVersion"
}
@brrygrdn any chance to get some eyes on this one? 🙏
Done @jeffwidman ✅
Thanks! Looks like tests are still failing though?
Also, can you explain why the tests need the length changed? I assumed originally that was related to a regex change capturing an additional character which gets parsed out, but since it's no longer doing that, makes me realize I don't know why the length change is/isn't needed?
Yeah I see that, I'll take a look later and try and fix it. It's been a few months so my memory is a bit hazy.
I assumed originally that was related to a regex change capturing an additional character which gets parsed out
That was exactly the intention at the time. I'll have to dig in and check why it's not working anymore.
Hey @jeffwidman, finally had some time to look into it. Turns out I messed up on the rebase and had a question mark in the wrong place for the regex.
Should be good to go now 👌
@jeffwidman @bdragon any chance for another review 🙏🏻 The MR had to be updated with master again.
Sorry @Flexicon I was offline the past few days. Looks like @Nishnha has you covered though!