Skip to content

Commit

Permalink
servicetalk-bom to include internal depdencies as API (apple#2283)
Browse files Browse the repository at this point in the history
Motivation:
servicetal-bom currently has `-internal` dependencies as `runtime`. This means
that projects which do depend upon these artifacts for implementation purposes
don't inherit the version from the bom. This can be problematic if the version
of ServiceTalk isn't directly specified by the project but instead inherited
through another bom (multi-level bom). In this case without `api` depdencies
the application must again manually track versions which the bom is intended
to avoid.
  • Loading branch information
Scottmitch authored Jul 21, 2022
1 parent 857e2e5 commit 2a0f45c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions servicetalk-bom/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ apply plugin: "java-platform"

description="ServiceTalk BOM that includes all modules"

rootProject.subprojects.findAll { !it.name.endsWith("-bom") && !it.name.endsWith("-dependencies") &&
!it.name.contains("examples") &&
!it.name.equals("grpc") && !it.name.equals("http") }.each {
dependencies.constraints.add(it.name.endsWith("-internal") ? "runtime" : "api", it )
rootProject.subprojects.findAll { !it.name.endsWith("-bom") &&
!it.name.endsWith("-dependencies") &&
!it.name.contains("examples") &&
!it.name.equals("grpc") &&
!it.name.equals("http") }.each {
dependencies.constraints.add("api", it)
}

// Keep publishing and signing configuration in sync with ServiceTalkLibraryPlugin.groovy from
Expand Down

0 comments on commit 2a0f45c

Please sign in to comment.