Skip to content

Port consistentResolution functionality from 'org.gradlex.java-module-dependencies' to 'org.gradlex.jvm-ecosystem-conflict-resolution' #102

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

Closed
jjohannes opened this issue Apr 2, 2024 · 3 comments · Fixed by #138
Assignees
Labels
a:enhancement New feature or request in:capability-conflict Things related to capability conflicts
Milestone

Comments

@jjohannes
Copy link
Member

jjohannes commented Apr 2, 2024

Make it part of the 'jvmDependencyConflicts' extension:

jvmDependencyConflicts {
    // Move this here from the 'org.gradlex.java-module-dependencies' plugin
    consistentResolution {
         providesVersions(":path-to-main-app-project") 
         platform(":path-to-platform-project")
    }
}
@jjohannes jjohannes added this to the 2.1 milestone Apr 2, 2024
@jjohannes jjohannes added the a:enhancement New feature or request label Apr 2, 2024
@Vampire
Copy link
Contributor

Vampire commented Apr 17, 2024

Is this something you only have on your disk, or is it called differently in the other plugin?
Searching for "consistentResolution" in the complete org only brings up this issue.

@britter britter changed the title Port consistenResolution functionality from 'org.gradlex.java-module-dependencies' to 'org.gradlex.jvm-ecosystem-conflict-resolution' Port consistentResolution functionality from 'org.gradlex.java-module-dependencies' to 'org.gradlex.jvm-ecosystem-conflict-resolution' Apr 17, 2024
@jjohannes
Copy link
Member Author

It's currently undocumented and called a bit differently. You can add something like this to a convention plugin for all Modules:

javaModuleDependencies {
    versionsFromPlatformAndConsistentResolution(":versions", ":app")
}

This means: Consistently resolve this project with the runtime classpath of :app and add a internal platform dependency pointing at :versions.

Source code:
https://github.com/gradlex-org/java-module-dependencies/blob/main/src/main/java/org/gradlex/javamodule/dependencies/JavaModuleDependenciesExtension.java#L373-L434

@Vampire
Copy link
Contributor

Vampire commented Apr 17, 2024

Ah, I was trapped by your typo :-)
I copied to not mistype, but your example misses a t.
Searching for "consistentResolution" instead of "consistenResolution" finds the other feature. :-)

@jjohannes jjohannes self-assigned this Apr 24, 2024
@jjohannes jjohannes added the in:capability-conflict Things related to capability conflicts label May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:enhancement New feature or request in:capability-conflict Things related to capability conflicts
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants