Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Simplify BOM exclude list #2476

Merged
merged 1 commit into from
Jan 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions ktlint-bom/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,13 @@ publishing.publications.named<MavenPublication>("maven") {
from(components["javaPlatform"])
}

val internalNonPublishableProjects: Set<String> by rootProject.extra
val excludeList = internalNonPublishableProjects + "ktlint-test-ruleset-provider-v2-deprecated"

dependencies {
logger.lifecycle("Creating dependencies for ktlint-bom")
constraints {
project.rootProject.subprojects.forEach { subproject ->
if (subproject.name in excludeList) {
logger.lifecycle(" - Ignore dependency '${subproject.name}' and do not add to ktlint-bom")
} else {
subproject.plugins.withId("ktlint-publication") {
// Exclude self project from BOM.
if (subproject == project) return@withId
logger.lifecycle(" + Add api dependency on '${subproject.name}' to ktlint-bom")
api(subproject)
}
Expand Down