Skip to content

fix(kafka): expose kafka-clients and okapi-core as api deps#47

Merged
endrju19 merged 1 commit into
mainfrom
fix-okapi-kafka-api-scope
May 17, 2026
Merged

fix(kafka): expose kafka-clients and okapi-core as api deps#47
endrju19 merged 1 commit into
mainfrom
fix-okapi-kafka-api-scope

Conversation

@endrju19
Copy link
Copy Markdown
Collaborator

Summary

KafkaMessageDeliverer's public constructor takes Producer<String, String>, which means kafka-clients types appear in okapi-kafka's public API. Similarly, okapi-core types (OutboxStore, OutboxPublisher, etc.) leak into public method signatures.

Both deps were previously scoped as compileOnly / implementation respectively, forcing consumers to add kafka-clients manually to their build and giving them surprising classpath failures on okapi-core types.

This PR switches both to api so consumers transitively get the types they need just by depending on okapi-kafka.

Changes

  • okapi-kafka/build.gradle.kts:
    • implementation(project(":okapi-core"))api(project(":okapi-core"))
    • compileOnly(libs.kafkaClients) + testImplementation(libs.kafkaClients)api(libs.kafkaClients) (with rationale comment)

Test plan

  • ./gradlew :okapi-kafka:build passes
  • Consumer of okapi-kafka can instantiate KafkaMessageDeliverer(...) without explicitly depending on kafka-clients

KafkaMessageDeliverer's public constructor takes Producer<String, String>,
so kafka-clients types appear in okapi-kafka's public API. Same for okapi-core
types returned from public methods. Both need api scope so consumers don't
have to add transitive deps manually.
@endrju19 endrju19 force-pushed the fix-okapi-kafka-api-scope branch from 44864aa to 48ae631 Compare May 17, 2026 08:05
@endrju19 endrju19 merged commit b0e6b3c into main May 17, 2026
8 checks passed
@endrju19 endrju19 deleted the fix-okapi-kafka-api-scope branch May 17, 2026 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant