Hi,
I’m trying to specify the following dependency inside of my custom task definition, which in its turn is a part of the custom plugin:
project.buildscript.dependencies {
classpath "org.apache.commons:commons-io:1.3.2"
}
The above does not take effect. I’m getting java.lang.NoClassDefFoundError when trying to reference class from the above library in my plugin. I also tried various variations of the above, such as:
project.dependencies {
classpath "org.apache.commons:commons-io:1.3.2"
}
and
project.dependencies {
runtime "org.apache.commons:commons-io:1.3.2"
}
But nothing seems to work. It does work, however, if I specify this dependency in my external build.gradle script that applies my plugin, but the whole point is to have all the dependencies, which plugin depends on, to be encapsulated inside of the plugin itself.
I also found this link on this topic, but I’m still having problems:
Can anyone please provide any specific example on how to do this?
Thank you! Dmitriy.