Skip to content

Commit

Permalink
Support BOM publishing (#4022)
Browse files Browse the repository at this point in the history
  • Loading branch information
Goooler authored Dec 31, 2023
1 parent c0d2b54 commit 65ec68b
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
26 changes: 26 additions & 0 deletions retrofit-bom/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
plugins {
id 'java-platform'
alias libs.plugins.mavenPublish
}

// TODO: This could be simplified after updating maven publish plugin, see https://vanniktech.github.io/gradle-maven-publish-plugin/what/#java-platform.
publishing {
publications {
maven(MavenPublication) {
from components.javaPlatform
}
}
}

dependencies {
constraints {
rootProject.subprojects { subproject ->
subproject.plugins.withId(libs.plugins.mavenPublish.get().pluginId) {
// Exclude self project from BOM.
if (subproject != this.project) {
api subproject
}
}
}
}
}
3 changes: 3 additions & 0 deletions retrofit-bom/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
POM_ARTIFACT_ID=retrofit-bom
POM_NAME=Retrofit BOM
POM_DESCRIPTION=A BOM for managing Retrofit dependencies.
1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ plugins {
rootProject.name = 'retrofit-root'

include ':retrofit'
include ':retrofit-bom'
include ':retrofit:android-test'
include ':retrofit:kotlin-test'
include ':retrofit:robovm-test'
Expand Down

0 comments on commit 65ec68b

Please sign in to comment.