summaryrefslogtreecommitdiff
path: root/buildSrc
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2021-11-09 21:33:59 +0530
committerHarsh Shandilya <me@msfjarvis.dev>2021-11-15 23:57:40 +0530
commit96a9211f9eeb2bb12fb5cc745f7955dfda95014b (patch)
treed8c0c8a30903746713da47e35bc061450a51ab05 /buildSrc
parent1040552dbfdfc9f4f55402d796af5b270a172a54 (diff)
build-logic: migrate Spotless to a convention plugin
Diffstat (limited to 'buildSrc')
-rw-r--r--buildSrc/build.gradle.kts1
-rw-r--r--buildSrc/src/main/java/Spotless.kt31
2 files changed, 0 insertions, 32 deletions
diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts
index 6c4786e8..d1e60299 100644
--- a/buildSrc/build.gradle.kts
+++ b/buildSrc/build.gradle.kts
@@ -34,7 +34,6 @@ gradlePlugin {
dependencies {
implementation("com.android.tools.build:gradle:7.0.3")
- implementation("com.diffplug.spotless:spotless-plugin-gradle:5.16.0")
implementation("com.google.dagger:hilt-android-gradle-plugin:2.40.1")
implementation("com.squareup.okhttp3:okhttp:4.9.0")
implementation("com.vanniktech:gradle-maven-publish-plugin:0.18.0")
diff --git a/buildSrc/src/main/java/Spotless.kt b/buildSrc/src/main/java/Spotless.kt
deleted file mode 100644
index bab6f58d..00000000
--- a/buildSrc/src/main/java/Spotless.kt
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright © 2014-2021 The Android Password Store Authors. All Rights Reserved.
- * SPDX-License-Identifier: GPL-3.0-only
- */
-
-import com.diffplug.gradle.spotless.SpotlessExtension
-import org.gradle.api.Project
-import org.gradle.kotlin.dsl.apply
-import org.gradle.kotlin.dsl.configure
-
-fun Project.configureSpotless() {
- apply(plugin = "com.diffplug.spotless")
- configure<SpotlessExtension> {
- kotlin {
- ktfmt().googleStyle()
- target("**/*.kt")
- targetExclude("**/build/")
- }
- kotlinGradle {
- ktfmt().googleStyle()
- target("**/*.kts")
- }
- format("xml") {
- target("**/*.xml")
- targetExclude("**/build/", ".idea/")
- trimTrailingWhitespace()
- indentWithSpaces()
- endWithNewline()
- }
- }
-}