-
Notifications
You must be signed in to change notification settings - Fork 22
Introduce getProductDependenciesTransformers to ConjureProductDependenciesExtension to help unblock configuration cache
#1657
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
base: develop
Are you sure you want to change the base?
Conversation
Generate changelog in
|
...e-api/src/main/java/com/palantir/gradle/conjure/api/ConjureProductDependenciesExtension.java
Outdated
Show resolved
Hide resolved
getProductDependenciesTransformers to ConjureProductDependenciesExtension to help unblock configuration cache
| - code: "java.annotation.removed" | ||
| old: "method void com.palantir.gradle.conjure.api.ConjureProductDependenciesExtension::<init>(org.gradle.api.Project)" | ||
| new: "method void com.palantir.gradle.conjure.api.ConjureProductDependenciesExtension::<init>()" | ||
| justification: "ConjureProductDependenciesExtension has been modernised to use\ |
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.
Is this a good enough justification? should I do a separate one for each break?
...njure/src/test/java/com/palantir/gradle/conjure/ConjureProductDependenciesExtensionTest.java
Outdated
Show resolved
Hide resolved
…ir/gradle-conjure into finlayw/fix-minimum-version-issue
|
This PR has been automatically marked as stale because it has not been touched in the last 14 days. If you'd like to keep it open, please leave a comment or add the 'long-lived' label, otherwise it'll be closed in 7 days. |
Before this PR
Previously there was no mechanism for other plugins to safely modify the
ConjureProductDependenciesExtension.getProductDependenciesthis resulted in other plugins just modifying the state ofgetProductDependencieson the extension directly. This used to work from dumb luck but now we are rolling configuration cache out theconvertDependenciesmethod is called before other plugins have a change to modify the stateAfter this PR
Fundamentally this is meant to be a light touch PR we want to unblock configuration cache without having to do a massive re-write of
gradle-conjureat some point we will be force to comeback and make a lot of changes but for now I'm trying to keep it minimalIf we where to build this from the ground up we should have used the
NamedDomainContainerbut this forces you to change the was you setserviceDependenciesin yourbuild.gradleso instead we settled on adding agetProductDependenciesTransformersmethod on the extension that allows other plugins to add methods that modify theServiceDependencyas late as possible==COMMIT_MSG==
==COMMIT_MSG==
Possible downsides?
I couldn't figure out how to get a test working in the
IntegrationSpecso I've added a small java test for the extension this can be a FLUP if it is criticalThis does introduce a few breaks!
getProductDependenciesandgetEndpointVersionsare nowSetPropertiesConjureProductDependenciesExtensionis abstractThis should not be much of a problem we only seriously use this extension in one internal plugin -> https://pl.ntr/2v9 a PR to fix this there will follow soon