Let's say I have:
- project A containing a build.gradle script which applies another script build-A.gradle containing a bunch of tasks
- project B where I want to use tasks from build-A.gradle
build-A.gradle looks like this:
task someTask << {
// do stuff
}
It seems that solution is to create a standalone custom Gradle plugin, so I've created project C for that. It contains copypasted build-A.gradle script and MyPlugin class extending Plugin with apply(Project project) method.
- Is there any way to refer to tasks declared in my build-A.gradle from MyPlugin?
- If not, how can I "convert" my script into task classes? E.g. how can get hold of the properties like
configurations,ant, etc. from the classes?