前提
- 『FlywayのGroovy MigrationをGradleで試す』を読んでいること
手順
『FlywayのGroovy MigrationをGradleで試す』のbuild.gradleを、以下のように書き換える。
This file contains 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
apply plugin: 'groovy' | |
apply plugin: 'flyway' | |
repositories { mavenCentral() } | |
dependencies { | |
compile localGroovy() | |
compile 'com.googlecode.flyway:flyway-core:2.1.1' | |
} | |
buildscript { | |
repositories { mavenCentral() } | |
dependencies { | |
classpath 'com.h2database:h2:1.3.171' | |
classpath 'com.github.ben-manes:gradle-flyway-plugin:0.6' | |
} | |
} | |
flyway { | |
dependsOnTasks(compileGroovy) | |
databases { | |
main { | |
url = "jdbc:h2:file:sampledb" | |
driver = 'org.h2.Driver' | |
user = 'SA' | |
password = '' | |
locations = [ | |
'classpath:db.migration', | |
"filesystem:${projectDir}/build/classes/main" | |
] | |
} | |
} | |
} | |
task wrapper(type: Wrapper) { gradleVersion = '1.6' } |
flywayタスクの設定で、Groovy Migrationに使用するGroovyクラスのパッケージ名(29行目)、およびGroovyクラスのクラスパス(30行目)を指定するのがポイント。
このbuild.gradleにより、
flywayMigrate
など、Gradle Flyway Pluginで提供されているタスクが実行できる。使用可能なタスクは、gradle tasks
で確認できる。
Best New Bet No Deposit Promos | Casino News 2021 - DrMCD
返信削除No Deposit Casino Bonuses. It is important 충청북도 출장마사지 to remember that no 서울특별 출장샵 deposit bonus is an incentive that gives you a 삼척 출장샵 chance to play 김천 출장샵 slots, table games, 김포 출장마사지 and live