diff --git a/build.gradle b/build.gradle index e8f7a8c68..b552283e0 100644 --- a/build.gradle +++ b/build.gradle @@ -14,6 +14,8 @@ * limitations under the License. */ +import com.typesafe.config.ConfigFactory + buildscript { apply from: file('gradle/buildscript.gradle'), to: buildscript } @@ -107,4 +109,17 @@ jar { 'Main-Class': 'com.nike.cerberus.Main' ) } +} + +def config = ConfigFactory.parseFile(new File("${project.getRootDir().absolutePath}${File.separator}src${File.separator}main${File.separator}resources${File.separator}cms-local-overrides.conf")) + +project.ext { + flyway.user = config.getString('JDBC.username') + flyway.password = config.getString('JDBC.password') + flyway.url = config.getString('JDBC.url') +} + +flyway { + schemas = ["cms"] + locations = ["classpath:com/nike/cerberus/migration"] } \ No newline at end of file diff --git a/gradle/buildscript.gradle b/gradle/buildscript.gradle index d67f23c72..eadc28bd1 100644 --- a/gradle/buildscript.gradle +++ b/gradle/buildscript.gradle @@ -23,4 +23,5 @@ dependencies { classpath "net.saliman:gradle-cobertura-plugin:2.3.2" classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.6.3' classpath 'com.github.ksoichiro:gradle-console-reporter:0.4.0' + classpath group: 'com.typesafe', name: 'config', version: '1.3.1' } \ No newline at end of file