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

ES-1755: Allow use of TOML file in settings.gradle to leverage version catalog and thus dependabot updates #1416

Conversation

ronanbrowne
Copy link
Contributor

@ronanbrowne ronanbrowne commented Dec 18, 2023

This change provides a workaround for some limitations of the Gradle version catalog, namely that it is not natively readable from settings.gradle due to the order of resolution by Gradle's builds life cycle when evaluating settings.gradle and the TOML file in the gradle directory.

To get around this, We manually parse the TOML file, using standard Groovy means, to return the version in question, using a Regex pattern to parse the file, then return the version e.g. for an entry in the TOML file like gradleEnterpriseVersion = "3.14.1" just 3.14.1 would be returned and then passed as the plugin parameter.

This allows us to continue to leverage the version catalogue for items which must be declared in settings.gradle.

Further reading is available here on Gradles forums, where a solution similar to this is suggested by one of their engineers regarding using the Gradle Enterprise plugins with a version catalog.

Copy link

sonarcloud bot commented Dec 18, 2023

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@ronanbrowne ronanbrowne changed the title ES-1755: Allow use of TOML file in settings.gradle ES-1755: Allow use of TOML file in settings.gradle to leveage version catalog and thus dependabot updates Dec 18, 2023
@ronanbrowne ronanbrowne marked this pull request as ready for review December 18, 2023 19:45
@ronanbrowne ronanbrowne requested review from a team as code owners December 18, 2023 19:45
@corda-jenkins-ci02
Copy link
Contributor

Scanning for breaking API changes introduced by this PR

Scan Succeeded

@corda-jenkins-ci02
Copy link
Contributor

corda-jenkins-ci02 bot commented Dec 18, 2023

Jenkins build for PR 1416 build 2

Build Successful:
Jar artifact version produced by this PR: 5.2.0.17-alpha-1702928548577

Copy link
Member

@driessamyn driessamyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@mcgovc mcgovc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ronanbrowne ronanbrowne changed the title ES-1755: Allow use of TOML file in settings.gradle to leveage version catalog and thus dependabot updates ES-1755: Allow use of TOML file in settings.gradle to leverage version catalog and thus dependabot updates Dec 19, 2023
@ronanbrowne ronanbrowne merged commit d0c3d69 into release/os/5.2 Dec 19, 2023
10 checks passed
@ronanbrowne ronanbrowne deleted the ronanb/ES-1755/workaround-version-catalog-limitations branch December 19, 2023 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants