aboutsummaryrefslogtreecommitdiffstats
path: root/buildSrc/src/main/java/Spotless.kt
blob: 1422e12bef6ae772a6f2a3f76f3f83b4c2dfd106 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/*
 * Copyright © 2014-2021 The Android Password Store Authors. All Rights Reserved.
 * SPDX-License-Identifier: GPL-3.0-only
 */

import com.diffplug.gradle.spotless.SpotlessExtension

internal fun SpotlessExtension.configureSpotless() {
  ratchetFrom = "origin/develop"
  kotlin {
    ktfmt().googleStyle()
    target("src/**/*.kt", "**/*.kts")
  }
  format("xml") {
    target("**/*.xml")
    trimTrailingWhitespace()
    indentWithSpaces()
    endWithNewline()
  }
}