I have a custom task in buildSrc
class MyTask extends DefaultTask {
@TaskAction
void runTask() {
project.ant.taskdef(..., classpath: projects.configurations.myConfig.asPath)
}
}
This works if myConfig is a configuration on the project using the task, not on buildSrc. That makes sense.
Is there a way to only define this configuration once in build.gradle for buildSrc and make it available to the projects using this task? Or do I need to define it for all of the projects that use this task?