I’m new in the Gradle world and I’m writing my personal plugin for Gradle.
And I have some problem with using my plugin into another project when I run the task of my personal plugin I have this error
vincenzo@vincenzo ~/Desktop/guide-gradle-intro/tmp $ gradle createDatabase
:createDatabase FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':createDatabase'.
> Resolving configuration 'apiElements' directly is not allowed
I think that the error is for my dependency in the build.gradle the plugin, but I do not find the error.
At the very least, you should check to see if a configuration can be resolved before you try to resolve it if you didn’t create it. However, forcing all configurations to be resolved just to find a jar with a name is not good practice. It would be much more acceptable to provide a configuration that you must add the driver dependency to so that you can only resolve exactly what you need.