Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(gradle): gradle plugin dependency versions in variables (#6063) #6064

Merged

Conversation

Jnosh
Copy link
Contributor

@Jnosh Jnosh commented Apr 27, 2020

Adds support for gradle plugin dependency versions specified as variables.
Plugin versions can be set using variables inside a pluginManagement block in settings.gradle[.kts].

Example (kotlin script):

pluginManagement {
    plugins {
        val myPluginVersion = "1.0.0"
        id("my.plugin.group") version myPluginVersion 
    }
}

I've essentially just added new matchers based on the existing support for plugin versions specified as strings and the version variable support for non-plugin dependencies.

Notes:

  • I've had to adjust the regex created by moduleStringVersionFormatMatch to not allow " in version names to prevent it from matching """$versionVar""" constructs.
  • The regexes for matching the version variables require whitespace, a ; or a } after the variable name since the variable name can occur without any other clear end marker. Since these expressions should occur inside of a plugins block, there should always be whitespace, a line terminator or the end brace of the plugin block after a valid definition.

Closes #6063

@CLAassistant
Copy link

CLAassistant commented Apr 27, 2020

CLA assistant check
All committers have signed the CLA.

@Jnosh Jnosh force-pushed the feat/gradle-plugin-variable-versions branch from 951dcfe to dbd8b2d Compare April 29, 2020 11:26
@Jnosh Jnosh force-pushed the feat/gradle-plugin-variable-versions branch from dbd8b2d to d2cd74a Compare April 29, 2020 12:25
@rarkins rarkins requested a review from viceice April 29, 2020 14:43
@JamieMagee JamieMagee merged commit 324ce13 into renovatebot:master Apr 29, 2020
@Jnosh Jnosh deleted the feat/gradle-plugin-variable-versions branch April 29, 2020 20:50
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 19.223.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gradle: Support gradle plugin dependencies using variables to specify the plugin version
6 participants