aboutsummaryrefslogtreecommitdiff
path: root/build-logic/kotlin-plugins
diff options
context:
space:
mode:
Diffstat (limited to 'build-logic/kotlin-plugins')
-rw-r--r--build-logic/kotlin-plugins/build.gradle.kts5
-rw-r--r--build-logic/kotlin-plugins/src/main/kotlin/com.github.android-password-store.spotless.gradle.kts25
2 files changed, 30 insertions, 0 deletions
diff --git a/build-logic/kotlin-plugins/build.gradle.kts b/build-logic/kotlin-plugins/build.gradle.kts
new file mode 100644
index 00000000..f8fbca41
--- /dev/null
+++ b/build-logic/kotlin-plugins/build.gradle.kts
@@ -0,0 +1,5 @@
+plugins { `kotlin-dsl` }
+
+dependencies {
+ implementation(libs.build.spotless)
+}
diff --git a/build-logic/kotlin-plugins/src/main/kotlin/com.github.android-password-store.spotless.gradle.kts b/build-logic/kotlin-plugins/src/main/kotlin/com.github.android-password-store.spotless.gradle.kts
new file mode 100644
index 00000000..83fae3d5
--- /dev/null
+++ b/build-logic/kotlin-plugins/src/main/kotlin/com.github.android-password-store.spotless.gradle.kts
@@ -0,0 +1,25 @@
+/*
+ * Copyright © 2014-2021 The Android Password Store Authors. All Rights Reserved.
+ * SPDX-License-Identifier: GPL-3.0-only
+ */
+plugins { id("com.diffplug.spotless") }
+
+spotless {
+ kotlin {
+ ktfmt().googleStyle()
+ target("**/*.kt")
+ targetExclude("**/build/")
+ }
+ kotlinGradle {
+ ktfmt().googleStyle()
+ target("**/*.kts")
+ targetExclude("**/build/")
+ }
+ format("xml") {
+ target("**/*.xml")
+ targetExclude("**/build/", ".idea/")
+ trimTrailingWhitespace()
+ indentWithSpaces()
+ endWithNewline()
+ }
+}