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

fix(manager/gradle): only accept known format for optional classifiers #18525

Merged
merged 1 commit into from Oct 25, 2022

Conversation

Churro
Copy link
Collaborator

@Churro Churro commented Oct 24, 2022

Changes

Fixes a regression introduced by allowing optional dependency classifiers with PR #18469.

Unfortunately, there is no strict format on how a valid classifier should look like. According to Maven, it's an arbitrary string. Gradle parses any string, if only the number of separators matches.

The check added in this PR restricts possible classifiers to "reasonable" values, i.e., analogous to how artifactId or groupId look like. This filters obviously invalid classifiers like URLs. The rationale here is: better allow only classifiers with good confidence, than not to extract dependency definitions with classifiers at all.

Context

Closes #18513

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please tick one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

Test repo: renovate-demo/18513-renovate-gradle-properties-bug#1

@viceice viceice requested a review from zharinov October 24, 2022 19:25
@rarkins rarkins merged commit 58c9b15 into renovatebot:main Oct 25, 2022
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 33.2.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 25, 2022
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.

URL in Gradle properties file is being identified as a Gradle dependency
4 participants