I am doing a project in Spring MVC 4.1 + Gradle + FlywayDB as for db migration.
I am using the flyway Gradle plugin to configure db migration before running the application. For example: Id runs the following command before deployment
gradle flywayMigrate
I use several yaml files - these are project properties files, for example db configurations and other project-specific configurations. (Several files, since each environment uses its own configuration file names like application-dev.yml, application-live. Yml, etc.) The specific problem I encountered here, I need to configure 1 db configuration inside my build build .gradle for the flyway db configuration, and for the application I need to do the same configuration in the application.yml file.
Is there a way with Gradle so that I can combine these properties from the same file, and not configure them again in the build Gradle file or in the gradle.properties file. I can do some Gradle scripts to read my configuration files and do some hacks ... But rather, there is some kind of proper Gradle plugin or some other proven tools that use ... Please let me know .... Or if there is any other better solution ... Please share if you don't mind.
source
share