From c2e2e4f842919ba0eab3c4ce5be7fd3fad3ab328 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Sun, 14 Nov 2021 11:27:44 +0530 Subject: Convert build-logic to a proper included build --- build-logic/android-plugins/build.gradle.kts | 3 +++ build-logic/automation-plugins/build.gradle.kts | 1 + build-logic/build.gradle.kts | 3 --- build-logic/kotlin-plugins/build.gradle.kts | 5 +++++ ...thub.android-password-store.spotless.gradle.kts | 25 ++++++++++++++++++++++ build-logic/settings.gradle.kts | 4 ---- ...thub.android-password-store.spotless.gradle.kts | 24 --------------------- 7 files changed, 34 insertions(+), 31 deletions(-) create mode 100644 build-logic/android-plugins/build.gradle.kts create mode 100644 build-logic/automation-plugins/build.gradle.kts delete mode 100644 build-logic/build.gradle.kts create mode 100644 build-logic/kotlin-plugins/build.gradle.kts create mode 100644 build-logic/kotlin-plugins/src/main/kotlin/com.github.android-password-store.spotless.gradle.kts delete mode 100644 build-logic/src/main/kotlin/com.github.android-password-store.spotless.gradle.kts diff --git a/build-logic/android-plugins/build.gradle.kts b/build-logic/android-plugins/build.gradle.kts new file mode 100644 index 00000000..8e2d31cc --- /dev/null +++ b/build-logic/android-plugins/build.gradle.kts @@ -0,0 +1,3 @@ +plugins { `kotlin-dsl` } + +dependencies { implementation(libs.build.agp) } diff --git a/build-logic/automation-plugins/build.gradle.kts b/build-logic/automation-plugins/build.gradle.kts new file mode 100644 index 00000000..e28b0255 --- /dev/null +++ b/build-logic/automation-plugins/build.gradle.kts @@ -0,0 +1 @@ +plugins { `kotlin-dsl` } diff --git a/build-logic/build.gradle.kts b/build-logic/build.gradle.kts deleted file mode 100644 index 070eb82a..00000000 --- a/build-logic/build.gradle.kts +++ /dev/null @@ -1,3 +0,0 @@ -plugins { `kotlin-dsl` } - -dependencies { implementation(libs.build.spotless) } 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() + } +} diff --git a/build-logic/settings.gradle.kts b/build-logic/settings.gradle.kts index 6afc1258..54fd3070 100644 --- a/build-logic/settings.gradle.kts +++ b/build-logic/settings.gradle.kts @@ -1,7 +1,3 @@ -rootProject.name = "build-logic" - -enableFeaturePreview("VERSION_CATALOGS") - pluginManagement { repositories { google() 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 deleted file mode 100644 index 3d5e589d..00000000 --- a/build-logic/src/main/kotlin/com.github.android-password-store.spotless.gradle.kts +++ /dev/null @@ -1,24 +0,0 @@ -/* - * 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() - } -} -- cgit v1.2.3