Skip to content

Commit 8b10553

Browse files
committed
refactor!: update dependency scope in extensions and improve documentation
- Changed Hadoop, Kafka, Avro, Schema Registry, and serialization libraries from `api` to `implementation` in `extensions` to limit their exposure to consuming projects. - Updated `CONTRIBUTING.md` and user guide with guidelines for managing heavy client dependencies and clarifying compile/runtime usage implications.
1 parent 8942ca1 commit 8b10553

3 files changed

Lines changed: 11 additions & 5 deletions

File tree

CONTRIBUTING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ Subprojects should declare Testcontainers modules without repeating the BOM. Ext
3434

3535
When adding dependencies, keep them in the narrowest module that needs them. For example, Hadoop credential provider helpers belong in `extensions`, not `core`.
3636

37+
Heavy client dependencies in `extensions`, such as Hadoop, Kafka, Avro, Schema Registry, and serialization libraries, should stay as `implementation` unless their types intentionally become part of the public API. This avoids pushing those libraries onto a user's compile classpath. Do not switch them to `api` just because an internal extension implementation imports them.
38+
3739
## Configuration Model
3840

3941
Startup-time service configuration belongs to `@BigDataTest` and its TOML files. Examples include:

doc/user-guide.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ External consumers should import the same BOM in their own dependency-management
6969
* `org.testcontainers:testcontainers-junit-jupiter`
7070
* `org.testcontainers:testcontainers-postgresql`
7171

72+
The `extensions` module keeps Hadoop, Kafka, Avro, Schema Registry, and serialization libraries as implementation dependencies. They are required at runtime for the built-in extensions, but they are not part of the extension module's compile API. This reduces compile-classpath conflicts for user applications that already use their own Hadoop or Kafka client versions.
73+
74+
If an application needs to force its own runtime versions, use normal Gradle dependency constraints, platforms, or exclusions in the consuming build. Future extension modules can split these integrations further by feature so users can depend only on the extension families they need.
75+
7276
== Programmatic Usage
7377

7478
Use `BigDataTestKit.builder()` when you want direct lifecycle control.

extensions/build.gradle.kts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ description = "Config-driven bigdata-test extensions for Hadoop credential provi
77

88
dependencies {
99
api(project(":junit5"))
10-
api(libs.hadoopClientApi)
11-
api(libs.hadoopClientRuntime)
12-
api(libs.kafkaAvroSerializer)
13-
api(libs.avro)
14-
api(libs.kotlinxSerialization)
1510

11+
implementation(libs.hadoopClientApi)
12+
implementation(libs.hadoopClientRuntime)
13+
implementation(libs.kafkaAvroSerializer)
1614
implementation(libs.kafkaSchemaRegistryClient)
15+
implementation(libs.avro)
16+
implementation(libs.kotlinxSerialization)
1717
}

0 commit comments

Comments
 (0)