Skip to content

Commit

Permalink
Add support for including Kable as a composite dependency (#363)
Browse files Browse the repository at this point in the history
  • Loading branch information
twyatt committed Jul 26, 2024
1 parent 9a9fcf5 commit 9fe93a6
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,22 @@ pluginManagement {
}

include("app")

// Configure sibling composite projects (`../<project>`) by adding `composite.<project>=true` to `local.properties`.
java.util.Properties()
.apply {
rootProject.projectDir
.resolve("local.properties")
.normalize()
.takeIf(File::exists)
?.let { java.io.FileInputStream(it) }
?.use(::load)
}
.run {
stringPropertyNames()
.filter { it.startsWith("composite.") && getProperty(it).toBoolean() }
.map { it.substringAfter('.') }
.onEach { logger.lifecycle("Including '$it' as a composite build") }
.map { "../$it" }
.forEach(::includeBuild)
}

0 comments on commit 9fe93a6

Please sign in to comment.