Skip to content
This repository was archived by the owner on Oct 15, 2024. It is now read-only.

Commit f583939

Browse files
committed
fix(build): adjust ktfmt path filtering to allow formatting build.gradle.kts files
1 parent 053eb4e commit f583939

File tree

5 files changed

+6
-11
lines changed

5 files changed

+6
-11
lines changed

app/build.gradle.kts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ android {
2929
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
3030
}
3131

32-
buildFeatures {
33-
compose = true
34-
}
32+
buildFeatures { compose = true }
3533
composeOptions {
3634
useLiveLiterals = false
3735
kotlinCompilerExtensionVersion = libs.versions.composeCompiler.get()

autofill-parser/build.gradle.kts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@ android {
2323
}
2424

2525
tasks.withType<KotlinCompile>().configureEach {
26-
compilerOptions {
27-
languageVersion.set(KotlinVersion.KOTLIN_1_7)
28-
}
26+
compilerOptions { languageVersion.set(KotlinVersion.KOTLIN_1_7) }
2927
}
3028

3129
dependencies {

build-logic/build.gradle.kts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55

66
plugins { `kotlin-dsl` }
77

8-
private val jvmToolchainAction = Action<JavaToolchainSpec> { languageVersion.set(JavaLanguageVersion.of(17)) }
8+
private val jvmToolchainAction =
9+
Action<JavaToolchainSpec> { languageVersion.set(JavaLanguageVersion.of(17)) }
910

1011
kotlin.jvmToolchain(jvmToolchainAction)
1112

build-logic/settings.gradle.kts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66

77
rootProject.name = "build-logic"
88

9-
plugins {
10-
id("org.gradle.toolchains.foojay-resolver-convention") version "0.5.0"
11-
}
9+
plugins { id("org.gradle.toolchains.foojay-resolver-convention") version "0.5.0" }
1210

1311
dependencyResolutionManagement {
1412
repositories {

build-logic/src/main/kotlin/app/passwordstore/gradle/KtfmtPlugin.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class KtfmtPlugin : Plugin<Project> {
1212
override fun apply(target: Project) {
1313
val input = Callable {
1414
target.layout.projectDirectory.asFileTree.filter { file ->
15-
file.extension == "kt" || file.extension == "kts" && !file.canonicalPath.contains("build")
15+
file.extension == "kt" || file.extension == "kts" && !file.canonicalPath.contains("build/")
1616
}
1717
}
1818
target.tasks.register<KtfmtFormatTask>("ktfmtFormat") { source(input) }

0 commit comments

Comments
 (0)