@@ -105,7 +105,22 @@ afterEvaluate {
105105}
106106
107107dependencies {
108- implementation project(' :braintrust-api' )
108+ // braintrust-api is an internal subproject whose classes are bundled directly into
109+ // the published JAR via the `embed` configuration. It must NOT appear in the published
110+ // POM as a transitive dependency (it is not published to Maven Central).
111+ // compileOnly makes it available at compile time; embed inlines it into the JAR at package time.
112+ compileOnly project(' :braintrust-api' )
113+ embed project(' :braintrust-api' )
114+
115+ // Programmatically re-export braintrust-api's implementation dependencies as
116+ // implementation deps on braintrust-sdk. Since braintrust-api is embedded (not
117+ // published), its transitive deps won't flow to consumers automatically — we
118+ // declare them here so they appear in the published POM.
119+ // We use the `implementation` configuration directly (not `runtimeClasspath`) to
120+ // avoid picking up `runtimeOnly` deps, which should not be forced onto consumers.
121+ project(' :braintrust-api' ). configurations. implementation. dependencies. each { dep ->
122+ implementation dep
123+ }
109124
110125 api " io.opentelemetry:opentelemetry-api:${ otelVersion} "
111126 api " io.opentelemetry:opentelemetry-sdk:${ otelVersion} "
@@ -125,6 +140,7 @@ dependencies {
125140
126141 implementation " com.github.spullara.mustache.java:compiler:0.9.14"
127142
143+ testCompileOnly project(' :braintrust-api' )
128144 testImplementation(testFixtures(project(" :test-harness" )))
129145
130146 testImplementation " org.slf4j:slf4j-simple:${ slf4jVersion} "
0 commit comments