Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Commit

Permalink
Configure fly plugin to load props from local-overrides so that devel…
Browse files Browse the repository at this point in the history
…opers can clean the db and do other stuff
  • Loading branch information
fieldju committed Dec 11, 2016
1 parent 8d0089b commit 929b6ce
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
15 changes: 15 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
* limitations under the License.
*/

import com.typesafe.config.ConfigFactory

buildscript {
apply from: file('gradle/buildscript.gradle'), to: buildscript
}
Expand Down Expand Up @@ -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"]
}
1 change: 1 addition & 0 deletions gradle/buildscript.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}

0 comments on commit 929b6ce

Please sign in to comment.