Hi there,
Here’s my situation:
- I have a multi-project build - One of these projects builds a custom gradle plugin that should be used by other teams in the company later - This custom gradle plugin has some transitive dependencies (e.g. apache velocity to generate code)
Now the tricky part: one of the plugin-project’s sibling projects should use the plugin at build time. In that other project’s build.gradle, I have the following:
buildscript {
repositories { mavenRepo ... }
dependencies {
classpath (
//
[group: 'commons-lang', name: 'commons-lang', version: '2.6'],
//
[group: 'velocity', name: 'velocity', version: '1.4'],
//
[group: 'log4j', name: 'log4j', version: '1.2.16'],
//
[group: 'commons-io', name: 'commons-io', version: '1.2'],
project(':custom-gradle-plugin')
)
}
}
The commented out dependencies are also present in the custom-gradle-plugin’s dependencies, but somehow, they’re not in the resulting classpath when the plugin calls:
getProject().getBuildscript().getConfigurations().getByName("classpath").getAsPath()
What I want is to define these third party dependencies in the custom-plugin project and not have to worry about them when using the plugin in other projects (well, transitive dependencies ;))
What am I missing?!
Thanks in advance, Mike Meessen