On 24.03.19 15:32, [email protected] wrote:
Dear Groovy Dev Mailing List,When I follow Gradle recommendations in terms of dependency scopes of my Groovy Library, in the end it produces errors when loaded via Grapes from Groovy Console/Groovy Shell: groovy.lang.GroovyRuntimeException: Conflicting module versions. Module [groovy-xml is loaded in version 2.5.6 and you are trying to load version 2.5.4 The build.gradle contains nothing more than the below in terms of dependencies: .. dependencies { compile 'org.codehaus.groovy:groovy-all:2.5.4' .. } .. Question: the Gradle documentation has to be fixed, or there is bug in Grapes? Gradle documentation in question: https://guides.gradle.org/building-groovy-libraries/?_ga=2.99509400.76686785.1553433006-920887584.1535023978
setting a compile dependency should not be done with Grapes. And afaik it is not done like that in Gradle. You have a class loader that tries to init the Groovy system for 2.5.4, while version 2.5.6 modules are visible and chosen by the class loading. In a "normal" Gradle setup this is not the case. I have used this in dozens of projects and it was never a problem because Gradle internally prevents this from happening. So first of all... What gradle version and is 2.5.6 the groovy version in that gradle? If not where does it come from? If you do not even have a Groovy on your classpath and your build file contains only that dependencies declaration (plus a bit), then this sounds like a bug in gradle. But maybe, if you explain a bit more, we can find out if that is really the case or not bye Jochen bye Jochen
