Skip to content

Commit

Permalink
Update bom to include :extension:* submodules
Browse files Browse the repository at this point in the history
  • Loading branch information
serpro69 committed Apr 17, 2024
1 parent 0a048c0 commit e2a4499
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions bom/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import io.github.serpro69.semverkt.gradle.plugin.tasks.TagTask
import kotlinx.validation.KotlinApiBuildTask
import kotlinx.validation.KotlinApiCompareTask

plugins {
`java-platform`
Expand Down Expand Up @@ -28,10 +26,10 @@ val isRelease = provider {

// Exclude subprojects that will never be published so that when configuring this project
// we don't force their configuration and do unnecessary work
val excludeFromBom = listOf("test")
val excludeFromBom = listOf(":cli-bot", ":docs", ":extension", ":faker", ":test", ":extension:kotest-property-test")
fun projectsFilter(candidateProject: Project) =
excludeFromBom.all { !candidateProject.name.contains(it) } &&
candidateProject.name != bom.name
excludeFromBom.none { candidateProject.path == it }
&& candidateProject.name != bom.name

// Declare that this subproject depends on all subprojects matching the filter
// When this subproject is configured, it will force configuration of all subprojects
Expand All @@ -41,6 +39,7 @@ rootProject.subprojects.filter(::projectsFilter).forEach { bom.evaluationDepends
dependencies {
constraints {
rootProject.subprojects.filter { project ->
logger.info("Include {} in bom: {}", project, project.tasks.findByName("publish")?.enabled ?: false)
// Only declare dependencies on projects that will have publications
projectsFilter(project) && project.tasks.findByName("publish")?.enabled == true
}.forEach { project ->
Expand Down

0 comments on commit e2a4499

Please sign in to comment.