Skip to content

Commit

Permalink
Remove spring2-test, Fix spring versions in test projects
Browse files Browse the repository at this point in the history
Co-authored-by: Marc Philipp <mail@marcphilipp.de>
  • Loading branch information
leonard84 and marcphilipp committed Oct 31, 2019
1 parent bc297f7 commit 884bb9a
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 68 deletions.
12 changes: 3 additions & 9 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ include "spock-core"
include "spock-specs"
include "spock-specs:mock-integration"
include "spock-spring"
include "spock-spring:spring2-test"
include "spock-spring:spring3-test"
include "spock-guice"
include "spock-junit4"
Expand All @@ -18,14 +17,9 @@ if (JavaVersion.current().isJava8()) {
include "spock-unitils"
include "spock-gradle"

if (JavaVersion.current().java7Compatible) {
include "spock-spring:boot-test"
}

if (JavaVersion.current().java8Compatible) {
include "spock-spring:boot2-test"
include "spock-spring:spring5-test"
}
include "spock-spring:boot-test"
include "spock-spring:boot2-test"
include "spock-spring:spring5-test"

rootProject.name = "spock"
nameBuildScriptsAfterProjectNames(rootProject.children)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,19 @@

package org.spockframework.gradle

import org.gradle.api.*

import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.tasks.testing.Test

class SpockBasePlugin implements Plugin<Project> {
void apply(Project project) {
project.tasks.withType(Test) { task ->
project.tasks.withType(Test) { Test task ->
def taskName = task.name.capitalize()
def configFile = project.file("Spock${taskName}Config.groovy")
if (configFile.exists()) {
systemProperty "spock.configuration", configFile
task.systemProperty "spock.configuration", configFile
}
}
}
}
}
12 changes: 0 additions & 12 deletions spock-spring/spring2-test/spring2-test.gradle

This file was deleted.

This file was deleted.

This file was deleted.

14 changes: 11 additions & 3 deletions spock-spring/spring3-test/spring3-test.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
def springVersion = "3.2.16.RELEASE"

dependencies {
compile "org.springframework:spring-core:$springVersion"
compile "org.springframework:spring-core"

testCompile project(":spock-core")
testCompile "org.springframework:spring-context:$springVersion"
testCompile ("org.springframework:spring-test:$springVersion") { force = true }
testCompile "org.springframework:spring-context"
testCompile ("org.springframework:spring-test")

testRuntime project(":spock-spring")
}


configurations.all {
resolutionStrategy.eachDependency {
if (requested.group == "org.springframework" ) {
useVersion(springVersion)
}
}
}
14 changes: 11 additions & 3 deletions spock-spring/spring5-test/spring5-test.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
def springVersion = "5.0.2.RELEASE"

dependencies {
compile "org.springframework:spring-core:$springVersion"
compile "org.springframework:spring-core"

testCompile project(":spock-core")
testCompile project(":spock-spring")
testCompile "org.springframework:spring-context:$springVersion"
testCompile ("org.springframework:spring-test:$springVersion") { force = true }
testCompile "org.springframework:spring-context"
testCompile ("org.springframework:spring-test")

}


configurations.all {
resolutionStrategy.eachDependency {
if (requested.group == "org.springframework" ) {
useVersion(springVersion)
}
}
}

0 comments on commit 884bb9a

Please sign in to comment.