Skip to content

Commit

Permalink
Merge pull request #115 from eyal-lezmy/main
Browse files Browse the repository at this point in the history
[Build] Reinforce the Gradle configuration for sample folder selection
  • Loading branch information
yaraki authored Dec 7, 2023
2 parents 9a78b17 + b96435a commit dbaa5c7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,14 @@ if (samples.isEmpty()) {
// Find all build.gradle files under samples folder
settingsDir.walk()
.filter { it.name == "build.gradle" || it.name == "build.gradle.kts" }
.filter { it.path.contains("${separator}samples${separator}") }
.filter {
val relativePath = if (it.isAbsolute) {
it.path.substring(settingsDir.path.length)
} else {
it.path
}
relativePath.contains("${separator}samples${separator}")
}
.map { it.parent.substring(rootDir.path.length) }
.forEach {
add(it.replace(separator, ":"))
Expand Down

0 comments on commit dbaa5c7

Please sign in to comment.