Skip to content
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
15 changes: 11 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,23 @@ tasks.withType<io.gitlab.arturbosch.detekt.Detekt>().configureEach {
}
}

// Build directories are excluded from the walk itself, not just filtered afterwards: the release
// job checks out termux-packages under build/, and following its dangling symlinks fails the task.
// Going back to target("**/*.kt") + targetExclude would bring that failure back.
fun spotlessSources(pattern: String) =
fileTree(rootDir) {
include(pattern)
exclude("**/build/**", "**/.gradle/**", ".worktree/**")
}

spotless {
kotlin {
target("**/*.kt")
targetExclude("**/build/**")
target(spotlessSources("**/*.kt"))
ktlint("1.2.1")
.setEditorConfigPath("$rootDir/.editorconfig")
}
kotlinGradle {
target("**/*.gradle.kts")
targetExclude("**/build/**")
target(spotlessSources("**/*.gradle.kts"))
ktlint("1.2.1")
}
}
Loading