You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
Currently "FlywayMigrateTask" depends on hard coded "project.flyway" property and it is really difficult to use gradle plugin when you need to migrate multiple different database instance schemas.
a la requirement: gradle build should be able to migrate 2 different (database instance) schemas before application/tests are run
so you could ./gradlew flywayMigrateA flywayMigrateB
It is curretly not possible so I changed org.flywaydb.gradle.task.AbstractFlywayTask extension property from private to protected.
privateFlywayExtension extension
to
protectedFlywayExtension extension
Now you'll be able to override extension from your custom tasks. There is probably nicer ways to to this but I'm not that good at Gradle/Groovy and this seems simple small change.
p.s. maybe it would be also good addition to change "prop" method from private to protected so if you need your own logic to get properties you do not need to reimplement almost all AbstractFlywayTask class as "createFlyway" method does not see your extended class prop method.
The text was updated successfully, but these errors were encountered:
aldas
changed the title
Allow gladle plugin to create multiple migrate targets for different (database) schemas
Allow gladle plugin to create multiple migrate tasks for different (database) schemas
Aug 28, 2014
aldas
changed the title
Allow gladle plugin to create multiple migrate tasks for different (database) schemas
Allow gradle plugin to create multiple migrate tasks for different (database) schemas
Aug 28, 2014
Currently "FlywayMigrateTask" depends on hard coded "project.flyway" property and it is really difficult to use gradle plugin when you need to migrate multiple different database instance schemas.
a la requirement: gradle build should be able to migrate 2 different (database instance) schemas before application/tests are run
so you could
./gradlew flywayMigrateA flywayMigrateB
It is curretly not possible so I changed
org.flywaydb.gradle.task.AbstractFlywayTask
extension property from private to protected.to
Now you'll be able to override extension from your custom tasks. There is probably nicer ways to to this but I'm not that good at Gradle/Groovy and this seems simple small change.
p.s. maybe it would be also good addition to change "prop" method from private to protected so if you need your own logic to get properties you do not need to reimplement almost all AbstractFlywayTask class as "createFlyway" method does not see your extended class prop method.
The text was updated successfully, but these errors were encountered: