Since upgrading to Grails 4, the migration scripts do not appear to be getting loaded from where they are configured. This results in the following error;
liquibase.exception.ChangeLogParseException: java.lang.IllegalArgumentException: Script text to compile cannot be null!
Up to now, I had only specified the location on gradle config;
sourceSets {
main {
resources {
srcDir 'grails-app/migrations'
}
}
}
I have since added the additional config provided by the plugin but to no avail;
grails.plugin.databasemigration.changelogLocation = 'grails-app/migrations'
Through debugging, I can see that the grails-app/migrations
path does not appear to be added to the list of locations but also discovered that grails-app/conf
is, so I temporarily dropped them all in there and voilà... the application fired up.
Anyone know if this is a know issue with the plugin or some missing config?
As indicated in the github issue comment here, the sourceSets
declaration in the gradle config file must be above the dependencies
declaration.