Skip to content

Commit

Permalink
Use servicetalk-dependencies for tests (#2219)
Browse files Browse the repository at this point in the history
Motivation:
Some of the dependencies imported for tests can use the
`servicetalk-dependencies` BOM introduced in #2210.
Modifications:
Import `servicetalk-dependencies` for test configurations
Result:
Better management of test dependencies.
  • Loading branch information
bondolo authored May 24, 2022
1 parent ed9d360 commit cda273e
Show file tree
Hide file tree
Showing 13 changed files with 39 additions and 28 deletions.
10 changes: 6 additions & 4 deletions servicetalk-concurrent-api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ apply plugin: "io.servicetalk.servicetalk-gradle-plugin-internal-library"

dependencies {
api platform(project(":servicetalk-dependencies"))
testImplementation enforcedPlatform(project(":servicetalk-dependencies"))
testImplementation enforcedPlatform("org.junit:junit-bom:$junit5Version")
testFixturesImplementation platform(project(":servicetalk-dependencies"))
testFixturesImplementation platform("org.junit:junit-bom:$junit5Version")

api project(":servicetalk-concurrent")
Expand All @@ -35,15 +37,15 @@ dependencies {
testImplementation project(":servicetalk-test-resources")
testImplementation "org.junit.jupiter:junit-jupiter-api"
testImplementation "org.junit.jupiter:junit-jupiter-params"
testImplementation "org.hamcrest:hamcrest:$hamcrestVersion"
testImplementation "org.hamcrest:hamcrest"
testImplementation "org.mockito:mockito-core:$mockitoCoreVersion"

testFixturesImplementation testFixtures(project(":servicetalk-concurrent-internal"))
testFixturesImplementation project(":servicetalk-utils-internal")
testFixturesImplementation project(":servicetalk-concurrent-test-internal")
testFixturesImplementation "com.google.code.findbugs:jsr305:$jsr305Version"
testFixturesImplementation "com.google.code.findbugs:jsr305"
testFixturesImplementation "org.junit.jupiter:junit-jupiter-api"
testFixturesImplementation "org.hamcrest:hamcrest:$hamcrestVersion"
testFixturesImplementation "org.hamcrest:hamcrest"
testFixturesImplementation "org.mockito:mockito-core:$mockitoCoreVersion"
testFixturesImplementation "org.slf4j:slf4j-api:$slf4jVersion"
testFixturesImplementation "org.slf4j:slf4j-api"
}
5 changes: 3 additions & 2 deletions servicetalk-concurrent-internal/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ apply plugin: "io.servicetalk.servicetalk-gradle-plugin-internal-library"
dependencies {
implementation platform(project(":servicetalk-dependencies"))
testImplementation enforcedPlatform("org.junit:junit-bom:$junit5Version")
testFixturesImplementation platform(project(":servicetalk-dependencies"))
testFixturesImplementation platform("org.junit:junit-bom:$junit5Version")

api project(":servicetalk-concurrent")
Expand All @@ -36,6 +37,6 @@ dependencies {

testFixturesImplementation project(":servicetalk-annotations")
testFixturesImplementation "org.junit.jupiter:junit-jupiter-api"
testFixturesImplementation "com.google.code.findbugs:jsr305:$jsr305Version"
testFixturesImplementation "org.slf4j:slf4j-api:$slf4jVersion"
testFixturesImplementation "com.google.code.findbugs:jsr305"
testFixturesImplementation "org.slf4j:slf4j-api"
}
2 changes: 1 addition & 1 deletion servicetalk-concurrent-reactivestreams/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ dependencies {
testImplementation enforcedPlatform("org.junit:junit-bom:$junit5Version")

api project(":servicetalk-concurrent-api")
api "org.reactivestreams:reactive-streams:$reactiveStreamsVersion"
api "org.reactivestreams:reactive-streams"

implementation project(":servicetalk-annotations")
implementation project(":servicetalk-serializer-utils")
Expand Down
3 changes: 2 additions & 1 deletion servicetalk-http-api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ apply plugin: "io.servicetalk.servicetalk-gradle-plugin-internal-library"
dependencies {
implementation platform(project(":servicetalk-dependencies"))
testImplementation enforcedPlatform("org.junit:junit-bom:$junit5Version")
testFixturesImplementation platform(project(":servicetalk-dependencies"))
testFixturesImplementation platform("org.junit:junit-bom:$junit5Version")

api project(":servicetalk-buffer-api")
Expand Down Expand Up @@ -59,7 +60,7 @@ dependencies {
testFixturesImplementation testFixtures(project(":servicetalk-concurrent-internal"))
testFixturesImplementation testFixtures(project(":servicetalk-transport-netty-internal"))
testFixturesImplementation project(":servicetalk-buffer-netty")
testFixturesImplementation "com.google.code.findbugs:jsr305:$jsr305Version"
testFixturesImplementation "com.google.code.findbugs:jsr305"
testFixturesImplementation "org.junit.jupiter:junit-jupiter-api"
testFixturesImplementation "org.junit.jupiter:junit-jupiter-params"
testFixturesImplementation "org.hamcrest:hamcrest:$hamcrestVersion"
Expand Down
3 changes: 2 additions & 1 deletion servicetalk-http-netty/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ apply plugin: "io.servicetalk.servicetalk-gradle-plugin-internal-library"

dependencies {
implementation platform(project(":servicetalk-dependencies"))
implementation platform("io.netty:netty-bom:$nettyVersion")
testImplementation enforcedPlatform(project(":servicetalk-dependencies"))
testImplementation enforcedPlatform("org.junit:junit-bom:$junit5Version")
testFixturesImplementation platform(project(":servicetalk-dependencies"))

api project(":servicetalk-concurrent-api")
api project(":servicetalk-logging-api")
Expand Down
2 changes: 1 addition & 1 deletion servicetalk-http-router-jersey/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ apply plugin: "io.servicetalk.servicetalk-gradle-plugin-internal-library"

dependencies {
api platform(project(":servicetalk-dependencies"))
testFixturesImplementation platform("org.glassfish.jersey:jersey-bom:$jerseyVersion")
testImplementation enforcedPlatform("org.junit:junit-bom:$junit5Version")
testFixturesImplementation platform(project(":servicetalk-dependencies"))
testFixturesImplementation platform("org.junit:junit-bom:$junit5Version")

api project(":servicetalk-http-api")
Expand Down
9 changes: 5 additions & 4 deletions servicetalk-log4j2-mdc-utils/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ apply plugin: "io.servicetalk.servicetalk-gradle-plugin-internal-library"

dependencies {
api platform(project(":servicetalk-dependencies"))
testImplementation enforcedPlatform(project(":servicetalk-dependencies"))
testImplementation enforcedPlatform("org.junit:junit-bom:$junit5Version")
testFixturesImplementation enforcedPlatform(project(":servicetalk-dependencies"))
testFixturesImplementation platform(project(":servicetalk-dependencies"))

api "org.apache.logging.log4j:log4j-api"

Expand All @@ -31,13 +32,13 @@ dependencies {

testImplementation project(":servicetalk-test-resources")
testImplementation "org.junit.jupiter:junit-jupiter-api"
testImplementation "org.slf4j:slf4j-api:$slf4jVersion"
testImplementation "org.hamcrest:hamcrest:$hamcrestVersion"
testImplementation "org.slf4j:slf4j-api"
testImplementation "org.hamcrest:hamcrest"

testFixturesImplementation "com.google.code.findbugs:jsr305"
testFixturesImplementation "org.apache.logging.log4j:log4j-core"
testFixturesImplementation "org.hamcrest:hamcrest"
testFixturesImplementation "org.slf4j:slf4j-api:$slf4jVersion"
testFixturesImplementation "org.slf4j:slf4j-api"
testFixturesRuntimeOnly "org.apache.logging.log4j:log4j-slf4j-impl"
}

Expand Down
5 changes: 3 additions & 2 deletions servicetalk-opentracing-asynccontext/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ apply plugin: "io.servicetalk.servicetalk-gradle-plugin-internal-library"

dependencies {
implementation platform(project(":servicetalk-dependencies"))
testImplementation enforcedPlatform(project(":servicetalk-dependencies"))
testImplementation enforcedPlatform("org.junit:junit-bom:$junit5Version")

api project(":servicetalk-opentracing-inmemory")
Expand All @@ -28,8 +29,8 @@ dependencies {

testImplementation project(":servicetalk-test-resources")
testImplementation "org.junit.jupiter:junit-jupiter-api"
testImplementation "org.slf4j:slf4j-api:$slf4jVersion"
testImplementation "org.hamcrest:hamcrest:$hamcrestVersion"
testImplementation "org.slf4j:slf4j-api"
testImplementation "org.hamcrest:hamcrest"
testImplementation "org.mockito:mockito-core:$mockitoCoreVersion"
testImplementation "org.mockito:mockito-junit-jupiter:$mockitoCoreVersion"
}
6 changes: 4 additions & 2 deletions servicetalk-opentracing-http/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ apply plugin: "io.servicetalk.servicetalk-gradle-plugin-internal-library"

dependencies {
api platform(project(":servicetalk-dependencies"))
testImplementation enforcedPlatform(project(":servicetalk-dependencies"))
testImplementation enforcedPlatform("org.junit:junit-bom:$junit5Version")
testRuntimeOnly enforcedPlatform(project(":servicetalk-dependencies"))

api project(":servicetalk-http-api")
api "io.opentracing:opentracing-api"
Expand All @@ -42,10 +44,10 @@ dependencies {
testImplementation project(":servicetalk-opentracing-asynccontext")
testImplementation project(":servicetalk-test-resources")
testImplementation project(":servicetalk-opentracing-log4j2")
testImplementation "org.apache.logging.log4j:log4j-core:$log4jVersion"
testImplementation "org.apache.logging.log4j:log4j-core"
testImplementation "org.hamcrest:hamcrest:$hamcrestVersion"
testImplementation "org.junit.jupiter:junit-jupiter-api"
testImplementation "org.mockito:mockito-core:$mockitoCoreVersion"
testImplementation "org.mockito:mockito-junit-jupiter:$mockitoCoreVersion"
testRuntimeOnly "org.apache.logging.log4j:log4j-slf4j-impl:$log4jVersion"
testRuntimeOnly "org.apache.logging.log4j:log4j-slf4j-impl"
}
7 changes: 4 additions & 3 deletions servicetalk-opentracing-log4j2/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ apply plugin: "io.servicetalk.servicetalk-gradle-plugin-internal-library"

dependencies {
implementation platform(project(":servicetalk-dependencies"))
testImplementation enforcedPlatform(project(":servicetalk-dependencies"))
testImplementation enforcedPlatform("org.junit:junit-bom:$junit5Version")

api project(":servicetalk-log4j2-mdc-utils")
Expand All @@ -33,7 +34,7 @@ dependencies {

testImplementation testFixtures(project(":servicetalk-log4j2-mdc-utils"))
testImplementation "org.junit.jupiter:junit-jupiter-api"
testImplementation "org.hamcrest:hamcrest:$hamcrestVersion"
testImplementation "org.apache.logging.log4j:log4j-slf4j-impl:$log4jVersion"
testImplementation "org.apache.logging.log4j:log4j-core:$log4jVersion"
testImplementation "org.hamcrest:hamcrest"
testImplementation "org.apache.logging.log4j:log4j-core"
testImplementation "org.apache.logging.log4j:log4j-slf4j-impl"
}
4 changes: 2 additions & 2 deletions servicetalk-serializer-utils/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ dependencies {
testImplementation testFixtures(project(":servicetalk-concurrent-internal"))
testImplementation project(":servicetalk-concurrent-test-internal")
testImplementation project(":servicetalk-buffer-netty")
testImplementation "com.google.protobuf:protobuf-java:$protobufVersion"
testImplementation "com.google.protobuf:protobuf-java"
testImplementation "org.junit.jupiter:junit-jupiter-api"
testImplementation "org.junit.jupiter:junit-jupiter-params"
testImplementation "org.hamcrest:hamcrest:$hamcrestVersion"
testImplementation "org.hamcrest:hamcrest"
testImplementation "org.mockito:mockito-core:$mockitoCoreVersion"
}
8 changes: 4 additions & 4 deletions servicetalk-tcp-netty-internal/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ apply plugin: "io.servicetalk.servicetalk-gradle-plugin-internal-library"
dependencies {
implementation platform(project(":servicetalk-dependencies"))

testImplementation enforcedPlatform("io.netty:netty-bom:$nettyVersion")
testImplementation enforcedPlatform(project(":servicetalk-dependencies"))
testImplementation enforcedPlatform("org.junit:junit-bom:$junit5Version")
testFixturesImplementation platform("io.netty:netty-bom:$nettyVersion")
testFixturesImplementation platform(project(":servicetalk-dependencies"))
testFixturesImplementation platform("org.junit:junit-bom:$junit5Version")

api project(":servicetalk-client-api")
Expand All @@ -48,7 +48,7 @@ dependencies {

testFixturesImplementation testFixtures(project(":servicetalk-concurrent-api"))
testFixturesImplementation testFixtures(project(":servicetalk-transport-netty-internal"))
testFixturesImplementation "com.google.code.findbugs:jsr305:$jsr305Version"
testFixturesImplementation "com.google.code.findbugs:jsr305"
testFixturesImplementation "io.netty:netty-transport-native-epoll"
testFixturesRuntimeOnly( group:"io.netty", name:"netty-transport-native-epoll", classifier:"linux-x86_64")
testFixturesRuntimeOnly( group:"io.netty", name:"netty-transport-native-epoll", classifier:"linux-aarch_64")
Expand All @@ -58,5 +58,5 @@ dependencies {
testFixturesImplementation "org.junit.jupiter:junit-jupiter-api"
testFixturesImplementation "org.hamcrest:hamcrest:$hamcrestVersion"
testFixturesImplementation "org.mockito:mockito-core:$mockitoCoreVersion"
testFixturesImplementation "org.slf4j:slf4j-api:$slf4jVersion"
testFixturesImplementation "org.slf4j:slf4j-api"
}
3 changes: 2 additions & 1 deletion servicetalk-transport-netty-internal/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ apply plugin: "io.servicetalk.servicetalk-gradle-plugin-internal-library"
dependencies {
api platform(project(":servicetalk-dependencies"))
testImplementation enforcedPlatform("org.junit:junit-bom:$junit5Version")
testFixturesImplementation platform(project(":servicetalk-dependencies"))
testFixturesImplementation platform("org.junit:junit-bom:$junit5Version")

api project(":servicetalk-buffer-netty")
Expand Down Expand Up @@ -61,7 +62,7 @@ dependencies {

testFixturesImplementation project(":servicetalk-utils-internal")
testFixturesImplementation "io.netty.incubator:netty-incubator-transport-native-io_uring:$nettyIoUringVersion"
testFixturesImplementation "com.google.code.findbugs:jsr305:$jsr305Version"
testFixturesImplementation "com.google.code.findbugs:jsr305"
testFixturesImplementation "org.junit.jupiter:junit-jupiter-api"
testFixturesImplementation "org.hamcrest:hamcrest:$hamcrestVersion"
testFixturesImplementation "org.mockito:mockito-core:$mockitoCoreVersion"
Expand Down

0 comments on commit cda273e

Please sign in to comment.