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
dependency conflicts showing in gradle #318
Comments
I'd suggest using the standard Gradle mechanism for selecting/forcing a particular dependency version. To be honest I have not been keeping up with Gradle since they upgraded their dependency management mechanism in early 6. I prefer to use the enforcer-gradle-plugjn and the ForceDependencies rule to achieve the same goal https://kordamp.org/enforcer-gradle-plugin/#_forcedependencies Be aware that forcing dependencies in this way is frowned upon by the Gradle team, thus your 1st option should be to find out how Gradle 6.x or 7.x prefers to handle dependency conflicts. |
Looks like a better option might be switch to maven. What I am trying to accomplish is to upgrade an existing project from Griffon 2.15.0 to 2.16.0 and along the way switch from Groovy to Java and from JavaFX to Swing. The reason is that Java post 1.8 has become much more difficult for novices to navigate unless they are pure Java (Groovy has all those nasty looking reflection mechanisms, and JavaFX has become tricky to setup, partly because it no longer comes as part of Java). I can correctly build my project with Maven (but only as a seperate entity). But Griffon is only a sub-part of my project (another part is AsciiDoc, provinding the help screens and documentation). As a Gradle project it was easy to set up a project structure with the Griffon sub-part. Doing the same in Griffon is much more difficult. Setting the parent-pom for griffon is something I'm not sure how to do correctly. |
That did not work: |
You must apply the |
A clean project (after modifications to allow for Java 11) shows dependency problems with either JDK8 or 11:
Execution failed for task ':dependencies'.
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
when run with dependencyInsight:
junit:junit:4.13.2
variant "compile" [
org.gradle.status = release (not requested)
org.gradle.usage = java-api
org.gradle.libraryelements = jar (compatible with: classes+resources)
org.gradle.category = library
]
Selection reasons:
- By conflict resolution : between versions 4.13.2, 4.3.1 and 4.5
junit:junit:4.13.2
--- org.codehaus.griffon:griffon-core-test:2.16.0
+--- testCompileClasspath
--- org.codehaus.griffon:griffon-fest-test:2.16.0
--- testCompileClasspath
junit:junit:4.3.1 -> 4.13.2
--- org.easytesting:fest-swing-junit:1.2.1
+--- org.codehaus.griffon:griffon-fest-test:2.16.0
| --- testCompileClasspath
--- org.easytesting:fest-swing-junit-4.5:1.2.1
--- org.codehaus.griffon:griffon-fest-test:2.16.0 (*)
junit:junit:4.5 -> 4.13.2
--- org.easytesting:fest-swing-junit-4.5:1.2.1
--- org.codehaus.griffon:griffon-fest-test:2.16.0
--- testCompileClasspath
org.junit:junit-bom:5.7.2
variant "platform-compile" [
org.gradle.status = release (not requested)
org.gradle.usage = java-api
org.gradle.category = platform
]
org.junit:junit-bom:5.7.2
+--- org.junit.platform:junit-platform-commons:1.7.2
| +--- org.junit.platform:junit-platform-engine:1.7.2
| | +--- org.spockframework:spock-core:2.0-groovy-2.5 (requested org.junit.platform:junit-platform-engine)
| | | --- testCompileClasspath
| | +--- org.junit.platform:junit-platform-launcher:1.7.2
| | | +--- org.junit.platform:junit-platform-testkit:1.7.2
| | | | +--- org.spockframework:spock-core:2.0-groovy-2.5 (requested org.junit.platform:junit-platform-testkit) ()
| | | | --- org.junit:junit-bom:5.7.2 ()
| | | --- org.junit:junit-bom:5.7.2 ()
| | --- org.junit:junit-bom:5.7.2 ()
| --- org.junit:junit-bom:5.7.2 ()
+--- org.junit.platform:junit-platform-engine:1.7.2 ()
+--- org.junit.platform:junit-platform-launcher:1.7.2 ()
+--- org.junit.platform:junit-platform-testkit:1.7.2 ()
+--- org.spockframework:spock-core:2.0-groovy-2.5 ()
--- org.spockframework:spock-groovy2-compat:2.0-groovy-2.5
--- org.spockframework:spock-core:2.0-groovy-2.5 ()
(*) - dependencies omitted (listed previously)
Can you suggest the best resolution?
The text was updated successfully, but these errors were encountered: