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

Support for Gradle composite builds #9410

Open
zharinov opened this issue Apr 6, 2021 · 8 comments
Open

Support for Gradle composite builds #9410

zharinov opened this issue Apr 6, 2021 · 8 comments
Labels
manager:gradle Gradle package manager priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others type:feature Feature (new functionality)

Comments

@zharinov
Copy link
Collaborator

zharinov commented Apr 6, 2021

What would you like Renovate to be able to do?

https://docs.gradle.org/current/userguide/composite_builds.html#composite_build_intro

Did you already have any implementation ideas?

  • Recognition pattern may look like this: [a-zA-Z][a-zA-Z0-9]([vV]ersions|[dD]eps|...)\.kt
  • Files should be processed after gradle.properties, but before build.gradle.kts
  • Currently we use globally scoped variables, now we have to support multi-level scoping, e.g. Versions.Plugins.NODEJS
  • Variables should be available for immediate string interpolation
  • Dependency strings ("foo:bar:1.2.3") should be extracted as well, though evaluation should occur in the build.gradle.kts context
    • In future, this should help to deal with complex scoped user-defined repository rules
      (i.e. determine a valid registryUrl sequence)
    • When done for Versions.kt files, this mechanism should be applied for deps defined in gradle.properties as well

Example files:

More examples:

@zharinov zharinov added type:feature Feature (new functionality) status:requirements Full requirements are not yet known, so implementation should not be started priority-5-triage labels Apr 6, 2021
@rarkins
Copy link
Collaborator

rarkins commented Apr 6, 2021

Do we need to discover these files using fileMatch or will the build.gradle reference them?

@rarkins
Copy link
Collaborator

rarkins commented Apr 6, 2021

Also, is this the same as #8692 ?

@zharinov
Copy link
Collaborator Author

zharinov commented Apr 6, 2021

Oh, I forgot about it. Yes, it is.

@rarkins
Copy link
Collaborator

rarkins commented Apr 6, 2021

Maybe close this as a duplicate and copy over the links from here

@HonkingGoose HonkingGoose added duplicate This issue is closed as a duplicate of another issue and removed priority-5-triage status:requirements Full requirements are not yet known, so implementation should not be started type:feature Feature (new functionality) labels Apr 6, 2021
@HonkingGoose

This comment has been minimized.

@HonkingGoose HonkingGoose marked this as a duplicate of #8692 Apr 6, 2021
@zharinov zharinov changed the title Support for Versions.kt, Deps.kt, etc Support for Gradle composite builds Apr 8, 2021
@zharinov zharinov reopened this Apr 8, 2021
@zharinov
Copy link
Collaborator Author

zharinov commented Apr 8, 2021

Desired functionality turned to be a part of another feature

@zharinov zharinov added manager:gradle-lite type:feature Feature (new functionality) and removed duplicate This issue is closed as a duplicate of another issue labels Apr 8, 2021
@zharinov
Copy link
Collaborator Author

zharinov commented Apr 8, 2021

Probably should be done before #8692

@HonkingGoose HonkingGoose added priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others and removed priority-5-triage labels Apr 9, 2021
@HonkingGoose HonkingGoose marked this as not a duplicate of #8692 Apr 9, 2021
@HonkingGoose HonkingGoose added the status:requirements Full requirements are not yet known, so implementation should not be started label Apr 22, 2021
@rarkins rarkins added manager:gradle Gradle package manager and removed manager:gradle-lite labels Aug 25, 2021
@Churro
Copy link
Collaborator

Churro commented Apr 29, 2023

PR #21892 introduces parsing support for Kotlin source files with object declarations like object X { ... } and single variable assignments, such as val dep = "..."

As of now, renovate doesn't recognize composite plugins explicitly and if you place e.g. a Deps.kt into a composite plugin outside of buildSrc, renovate wouldn't capture it. However, with the parsing support added with #21892, .kt files of composite plugins can be parsed in an opt-in fashion.

E.g., the following renovate config would match a file like includedBuild/dependencies/src/main/kotlin/com/badoo/reaktive/dependencies/Deps.kt (ex. here):

{
  "gradle": {
    "fileMatch": ["^includedBuild/.+\\.kt$"]
  }
}

@rarkins rarkins removed the status:requirements Full requirements are not yet known, so implementation should not be started label Oct 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
manager:gradle Gradle package manager priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others type:feature Feature (new functionality)
Projects
None yet
Development

No branches or pull requests

4 participants