Skip to content

Commit

Permalink
Temporarily disable Spring Cloud Stream test util on Gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
snicoll committed Dec 7, 2020
1 parent ae03e63 commit 1097016
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import io.spring.initializr.generator.buildsystem.Build;
import io.spring.initializr.generator.buildsystem.Dependency;
import io.spring.initializr.generator.buildsystem.DependencyScope;
import io.spring.initializr.generator.buildsystem.maven.MavenBuild;
import io.spring.initializr.generator.spring.build.BuildCustomizer;

/**
Expand Down Expand Up @@ -53,9 +54,12 @@ public void customize(Build build) {
build.dependencies().add("cloud-stream-binder-kafka-streams", "org.springframework.cloud",
"spring-cloud-stream-binder-kafka-streams", DependencyScope.COMPILE);
}
build.dependencies().add("cloud-stream-test",
Dependency.withCoordinates("org.springframework.cloud", "spring-cloud-stream")
.classifier("test-binder").type("test-jar").scope(DependencyScope.TEST_COMPILE));
// TODO: https://github.com/spring-io/initializr/issues/1159
if (build instanceof MavenBuild) {
build.dependencies().add("cloud-stream-test",
Dependency.withCoordinates("org.springframework.cloud", "spring-cloud-stream")
.classifier("test-binder").type("test-jar").scope(DependencyScope.TEST_COMPILE));
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,12 @@ void springCloudTurbineStreamWithAllBinders() {
.hasDependenciesSize(9);
}

@Test
void springCloudStreamWithGradleBuildDoesNotAddTestDependency() {
ProjectRequest request = createProjectRequest("cloud-stream", "amqp");
assertThat(gradleBuild(request)).doesNotContain("test-binder");
}

private static Dependency springCloudStreamTestDependency() {
Dependency scsTest = Dependency.withId("cloud-stream-test", "org.springframework.cloud", "spring-cloud-stream",
null, Dependency.SCOPE_TEST);
Expand Down

0 comments on commit 1097016

Please sign in to comment.