Open snimavat opened 2 years ago
You can configure the dbm* tasks in build.gradle to skip execution in your other modules:
// To prevent database migration tasks running against each plugin and run against the main app only
gradle.taskGraph.whenReady {graph ->
graph.getAllTasks().each {Task task ->
// Database migration plugin ignore these tasks, else it will fail
def isPluginDbm = (task.path =~ /:+.+:+dbm/)
if (isPluginDbm) {
task.enabled = false
}
}
}
In a multiproject build - dbm-gorm-diff - fails
When dbm-gorm-diff is run in application Grails tries to run dbm-gorm in plugin also, and fails
> Task :my-plugin:dbmGormDiff FAILED
Will fail to generate diff