diff options
Diffstat (limited to 'build-logic')
-rw-r--r-- | build-logic/.gitignore | 1 | ||||
-rw-r--r-- | build-logic/build.gradle.kts | 3 | ||||
-rw-r--r-- | build-logic/settings.gradle.kts | 29 | ||||
-rw-r--r-- | build-logic/src/main/kotlin/com.github.android-password-store.spotless.gradle.kts | 24 |
4 files changed, 57 insertions, 0 deletions
diff --git a/build-logic/.gitignore b/build-logic/.gitignore new file mode 100644 index 00000000..42afabfd --- /dev/null +++ b/build-logic/.gitignore @@ -0,0 +1 @@ +/build
\ No newline at end of file diff --git a/build-logic/build.gradle.kts b/build-logic/build.gradle.kts new file mode 100644 index 00000000..070eb82a --- /dev/null +++ b/build-logic/build.gradle.kts @@ -0,0 +1,3 @@ +plugins { `kotlin-dsl` } + +dependencies { implementation(libs.build.spotless) } diff --git a/build-logic/settings.gradle.kts b/build-logic/settings.gradle.kts new file mode 100644 index 00000000..6afc1258 --- /dev/null +++ b/build-logic/settings.gradle.kts @@ -0,0 +1,29 @@ +rootProject.name = "build-logic" + +enableFeaturePreview("VERSION_CATALOGS") + +pluginManagement { + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +dependencyResolutionManagement { + repositories { + google() + mavenCentral() + } + versionCatalogs { create("libs") { from(files("../gradle/libs.versions.toml")) } } +} + +rootProject.name = "build-logic" + +enableFeaturePreview("VERSION_CATALOGS") + +include("android-plugins") + +include("automation-plugins") + +include("kotlin-plugins") diff --git a/build-logic/src/main/kotlin/com.github.android-password-store.spotless.gradle.kts b/build-logic/src/main/kotlin/com.github.android-password-store.spotless.gradle.kts new file mode 100644 index 00000000..3d5e589d --- /dev/null +++ b/build-logic/src/main/kotlin/com.github.android-password-store.spotless.gradle.kts @@ -0,0 +1,24 @@ +/* + * 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") + } + format("xml") { + target("**/*.xml") + targetExclude("**/build/", ".idea/") + trimTrailingWhitespace() + indentWithSpaces() + endWithNewline() + } +} |