-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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(manager/gradle): add support for apply from statements #16030
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment, i've prepared a commit to use async io (5min of work)
# Conflicts: # lib/modules/manager/gradle/extract.spec.ts # lib/modules/manager/gradle/extract.ts # lib/modules/manager/gradle/parser.spec.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm convinced by your reasoning and the implementation, looks good to me 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see @zharinov
comments
Co-authored-by: Sergei Zharinov <zharinov@users.noreply.github.com>
Co-authored-by: Sergei Zharinov <zharinov@users.noreply.github.com>
Co-authored-by: Sergei Zharinov <zharinov@users.noreply.github.com>
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
🎉 This PR is included in version 32.104.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Changes
apply from: 'somefile.gradle'
statementsNo existing tests were changed/rewritten, therefore I don't expect any breaking changes.
Test repository: https://github.com/Churro/renovate-applyfrom/pulls
Implementation Notes
extract.ts
:apply from
do not necessarily have to be *.gradle, so they may not exist inpackageFiles
and are dynamically added, if missing.parser.ts
:readLocalFileSync()
but I really don't see a reasonable way how to do this async.apply from
happens, not afterwards.packageFiles
at least twice and then selectively merge parsed infos. This step would need to be done in any case, also if noapply from
is used in any file.recursionDepth
check ensures this cannot happen, as it prevents "nestedapply from
" statements. If there is good reason, this could be increased to 1, 2, etc. and would still do no harm, but in any case the check remains a threshold to prevent cyclic includes.Known Limitations
apply(from = "${rootDir.path}/gradle/publish/publishJvm.gradle")
Context
apply from
is very commonly used (1, 2, 3, ...) with gradle and should therefore be supportedDocumentation (please check one with an [x])
How I've tested my work (please tick one)
I have verified these changes via: