aboutsummaryrefslogtreecommitdiff
path: root/build-logic
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2022-10-29 08:10:44 +0530
committerHarsh Shandilya <me@msfjarvis.dev>2022-10-29 08:10:44 +0530
commit56fd18b17df26ea28f28b9546bdf661ae10f8512 (patch)
treeeff574b11051b0a84b0e7544cb9fa80a5ce25a1c /build-logic
parentfd20480f554060805acba3124cb251be7824c4d2 (diff)
feat: rip out Spotless
Spotless' configuration cache support is irritating since it requires you to wipe config cache every time you initialise a Gradle daemon.
Diffstat (limited to 'build-logic')
-rw-r--r--build-logic/kotlin-plugins/build.gradle.kts5
-rw-r--r--build-logic/kotlin-plugins/src/main/kotlin/app/passwordstore/gradle/SpotlessPlugin.kt44
2 files changed, 0 insertions, 49 deletions
diff --git a/build-logic/kotlin-plugins/build.gradle.kts b/build-logic/kotlin-plugins/build.gradle.kts
index 815d6ca0..fc2147c9 100644
--- a/build-logic/kotlin-plugins/build.gradle.kts
+++ b/build-logic/kotlin-plugins/build.gradle.kts
@@ -47,10 +47,6 @@ gradlePlugin {
id = "com.github.android-password-store.ktfmt"
implementationClass = "app.passwordstore.gradle.KtfmtPlugin"
}
- register("spotless") {
- id = "com.github.android-password-store.spotless"
- implementationClass = "app.passwordstore.gradle.SpotlessPlugin"
- }
register("versions") {
id = "com.github.android-password-store.versions"
implementationClass = "app.passwordstore.gradle.DependencyUpdatesPlugin"
@@ -65,7 +61,6 @@ dependencies {
implementation(libs.build.kotlin)
implementation(libs.build.ktfmt)
implementation(libs.build.r8)
- implementation(libs.build.spotless)
implementation(libs.build.vcu)
implementation(libs.build.versions)
implementation(libs.kotlin.coroutines.core)
diff --git a/build-logic/kotlin-plugins/src/main/kotlin/app/passwordstore/gradle/SpotlessPlugin.kt b/build-logic/kotlin-plugins/src/main/kotlin/app/passwordstore/gradle/SpotlessPlugin.kt
deleted file mode 100644
index 79a52c1b..00000000
--- a/build-logic/kotlin-plugins/src/main/kotlin/app/passwordstore/gradle/SpotlessPlugin.kt
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright © 2014-2021 The Android Password Store Authors. All Rights Reserved.
- * SPDX-License-Identifier: GPL-3.0-only
- */
-
-package app.passwordstore.gradle
-
-import com.diffplug.gradle.spotless.SpotlessExtension
-import com.diffplug.gradle.spotless.SpotlessPlugin
-import org.gradle.api.Plugin
-import org.gradle.api.Project
-import org.gradle.kotlin.dsl.apply
-import org.gradle.kotlin.dsl.getByType
-
-@Suppress("Unused")
-class SpotlessPlugin : Plugin<Project> {
-
- override fun apply(project: Project) {
- project.pluginManager.apply(SpotlessPlugin::class)
- project.extensions.getByType<SpotlessExtension>().run {
- kotlin {
- ktfmt(KTFMT_VERSION).googleStyle()
- target("**/*.kt")
- targetExclude("**/build/")
- }
- kotlinGradle {
- ktfmt(KTFMT_VERSION).googleStyle()
- target("**/*.kts")
- targetExclude("**/build/")
- }
- format("xml") {
- target("**/*.xml")
- targetExclude("**/build/", ".idea/")
- trimTrailingWhitespace()
- indentWithSpaces()
- endWithNewline()
- }
- }
- }
-
- private companion object {
- private const val KTFMT_VERSION = "0.41"
- }
-}