11import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
2-
32import java.util.regex.Matcher
43
54plugins {
@@ -11,10 +10,12 @@ ext {
1110 ossrhUsername = project. findProperty(' ossrh.username' )
1211 ossrhPassword = project. findProperty(' ossrh.password' )
1312
14- flywayCoreVersions = [' 3.0' , ' 3.1' , ' 3.2.1' , ' 4.0.3' , ' 4.1.2' ]
15- flywayTestExtensionsVersions = [' 3.0.1' , ' 3.1' , ' 3.2.1.1' , ' 4.0.1' , ' 4.1.0' ]
13+ flywayCoreVersions = [' 3.0' , ' 3.1' , ' 3.2.1' , ' 4.0.3' , ' 4.1.2' , ' 4.2.0 ' , ' 5.0.7 ' ]
14+ flywayTestExtensionsVersions = [' 3.0.1' , ' 3.1' , ' 3.2.1.1' , ' 4.0.1' , ' 4.1.0' , ' 4.2.0.2 ' , ' 5.0.0 ' ]
1615 embeddedPostgresVersions = [' 9.3.23' , ' 9.4.18' , ' 9.5.13' , ' 9.6.9' , ' 10.4.0' ]
1716
17+ flywayCoreVersion = flywayCoreVersions. last()
18+ flywayTestVersion = flywayTestExtensionsVersions. last()
1819 postgresVersion = embeddedPostgresVersions. last()
1920}
2021
@@ -143,7 +144,8 @@ project(':embedded-database-spring-test') {
143144 compile project(' :embedded-database-spring-test-autoconfigure' )
144145 compile ' org.springframework:spring-context:4.3.10.RELEASE'
145146 compile ' org.springframework:spring-test:4.3.10.RELEASE'
146- compile ' org.flywaydb.flyway-test-extensions:flyway-spring-test:4.2.0.2'
147+ compile " org.flywaydb:flyway-core:$flywayCoreVersion "
148+ compile " org.flywaydb.flyway-test-extensions:flyway-spring-test:$flywayTestVersion "
147149 compile ' com.google.guava:guava:23.0'
148150 compile ' org.tukaani:xz:1.8'
149151
@@ -191,7 +193,7 @@ project(':embedded-database-spring-test') {
191193 }
192194
193195 configurations {
194- for (version in flywayCoreVersions) {
196+ flywayCoreVersions. init() . each { version ->
195197 " testRuntimeWithFlywayCore$version " {
196198 extendsFrom testRuntime
197199 resolutionStrategy {
@@ -204,7 +206,7 @@ project(':embedded-database-spring-test') {
204206 }
205207 }
206208
207- for (version in flywayTestExtensionsVersions) {
209+ flywayTestExtensionsVersions. init() . each { version ->
208210 " testRuntimeWithFlywayTestExtensions$version " {
209211 extendsFrom testRuntime
210212 resolutionStrategy {
@@ -231,7 +233,7 @@ project(':embedded-database-spring-test') {
231233 }
232234 }
233235
234- for (version in flywayCoreVersions) {
236+ flywayCoreVersions. init() . each { version ->
235237 task " testWithFlywayCore$version " (type : Test ) {
236238 dependsOn jar
237239
@@ -246,7 +248,7 @@ project(':embedded-database-spring-test') {
246248 check. dependsOn(" testWithFlywayCore$version " )
247249 }
248250
249- for (version in flywayTestExtensionsVersions) {
251+ flywayTestExtensionsVersions. init() . each { version ->
250252 task " testWithFlywayTestExtensions$version " (type : Test ) {
251253 dependsOn jar
252254
@@ -257,7 +259,6 @@ project(':embedded-database-spring-test') {
257259 includeCategories ' io.zonky.test.category.FlywayIntegrationTests'
258260
259261 if (VersionNumber . withPatchNumber(). parse(version) >= VersionNumber . withPatchNumber(). parse(" 4.2.0.1" )) {
260- println " MultiFlywayIntegrationTests category has been applied!!! - $version "
261262 includeCategories ' io.zonky.test.category.MultiFlywayIntegrationTests'
262263 }
263264 }
0 commit comments