Skip to content

Commit bfb2bfe

Browse files
committed
juni4mock
1 parent 74d2171 commit bfb2bfe

File tree

42 files changed

+49
-6
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+49
-6
lines changed

build.gradle

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,11 +132,6 @@ subprojects {
132132

133133
dependencies {
134134
testImplementation 'ch.qos.logback:logback-classic:1.3.14'
135-
136-
if (project.path != ':testcontainers') {
137-
// for compiling classes which extend GenericContainer, etc
138-
compileOnly 'junit:junit:4.13.2'
139-
}
140135
}
141136

142137
checkstyle {

core/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ configurations.all {
6969
}
7070

7171
dependencies {
72-
implementation 'junit:junit:4.13.2' // originally had api scope
72+
// originally was api scope, but that's problematic for projects using junit 5
73+
implementation libs.juni4
7374
api 'org.slf4j:slf4j-api:1.7.36'
7475
compileOnly 'org.jetbrains:annotations:24.1.0'
7576
testCompileOnly 'org.jetbrains:annotations:24.1.0'

gradle/libs.versions.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[libraries]
2+
juni4 = { group = "junit", name = "junit", version = "4.13.2" }
3+
juni4mock = { group = "io.quarkus", name = "quarkus-junit4-mock", version = "3.23.0" }

gradle/publishing.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ publishing {
6060
def apiDeps= project.configurations.api.resolvedConfiguration.firstLevelModuleDependencies
6161
def providedDeps = project.configurations.provided.resolvedConfiguration.firstLevelModuleDependencies
6262
def newApiDeps = apiDeps - providedDeps
63+
def shaded = project.configurations.shaded.resolvedConfiguration.firstLevelModuleDependencies
64+
def runtimeDeps = project.configurations.runtimeClasspath.resolvedConfiguration.firstLevelModuleDependencies - apiDeps - providedDeps - shaded
65+
println runtimeDeps
6366

6467
def addDependencies = { Set<ResolvedDependency> resolvedDependencies, scope ->
6568
for (dependency in resolvedDependencies) {
@@ -90,6 +93,7 @@ publishing {
9093
}
9194
addDependencies(newApiDeps, 'compile')
9295
addDependencies(providedDeps, 'provided')
96+
addDependencies(runtimeDeps, 'runtime')
9397
}
9498
}
9599
}

modules/activemq/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ description = "Testcontainers :: ActiveMQ"
22

33
dependencies {
44
api project(':testcontainers')
5+
compileOnly libs.juni4mock
56

67
testImplementation 'org.assertj:assertj-core:3.26.3'
78
testImplementation "org.apache.activemq:activemq-client:6.1.2"

modules/azure/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ description = "Testcontainers :: Azure"
33
dependencies {
44
api project(':testcontainers')
55
api project(':mssqlserver')
6+
compileOnly libs.juni4mock
67
// TODO use JDK's HTTP client and/or Apache HttpClient5
78
shaded 'com.squareup.okhttp3:okhttp:4.12.0'
89

modules/chromadb/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ description = "Testcontainers :: ChromaDB"
22

33
dependencies {
44
api project(':testcontainers')
5+
compileOnly libs.juni4mock
56

67
testImplementation 'org.assertj:assertj-core:3.26.3'
78
testImplementation 'io.rest-assured:rest-assured:5.5.0'

modules/clickhouse/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ description = "Testcontainers :: JDBC :: ClickHouse"
33
dependencies {
44
api project(':testcontainers')
55
api project(':jdbc')
6+
compileOnly libs.juni4mock
67

78
compileOnly project(':r2dbc')
89
compileOnly(group: 'com.clickhouse', name: 'clickhouse-r2dbc', version: '0.7.2', classifier: 'http')

modules/consul/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ description = "Testcontainers :: Consul"
22

33
dependencies {
44
api project(':testcontainers')
5+
compileOnly libs.juni4mock
56

67
testImplementation 'com.ecwid.consul:consul-api:1.4.5'
78
testImplementation 'io.rest-assured:rest-assured:5.5.0'

modules/couchbase/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ description = "Testcontainers :: Couchbase"
22

33
dependencies {
44
api project(':testcontainers')
5+
compileOnly libs.juni4mock
56
// TODO use JDK's HTTP client and/or Apache HttpClient5
67
shaded 'com.squareup.okhttp3:okhttp:4.12.0'
78

0 commit comments

Comments
 (0)