Created
December 21, 2015 17:03
-
-
Save der3k/4e79c3f26bdb4939fb58 to your computer and use it in GitHub Desktop.
Flyway Gradle build
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plugins { | |
id 'java' | |
id 'org.flywaydb.flyway' version '3.2' | |
} | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
compile 'postgresql:postgresql:9.1-901.jdbc4' | |
} | |
flyway { | |
url = System.getenv()['SIS_JDBC_URL'] | |
user = System.getenv()['SIS_JDBC_USER'] | |
password = System.getenv()['SIS_JDBC_PASSWORD'] | |
sqlMigrationPrefix = 'v' | |
locations = ['filesystem:src/main/resources/db/migrations'] | |
if (project.hasProperty('env') && env == 'test') { | |
locations += 'filesystem:src/test/resources/db/migrations' | |
} | |
} | |
task wrapper(type: Wrapper) { | |
gradleVersion = '2.4' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment