add: spotless
This commit is contained in:
10
build.gradle
10
build.gradle
@@ -36,6 +36,12 @@ buildscript {
|
||||
apply from: 'dependencies.gradle'
|
||||
}
|
||||
|
||||
plugins {
|
||||
id('com.diffplug.spotless') version('6.11.0')
|
||||
}
|
||||
|
||||
apply from: "$project.rootDir/spotless.gradle"
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
@@ -93,7 +99,3 @@ allprojects {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
||||
|
||||
29
spotless.gradle
Normal file
29
spotless.gradle
Normal file
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
*
|
||||
* * Copyright © 2022 by Navi Technologies Limited
|
||||
* * All rights reserved. Strictly confidential
|
||||
*
|
||||
*/
|
||||
|
||||
spotless {
|
||||
// optional: limit format enforcement to just the files changed by this feature branch
|
||||
ratchetFrom 'origin/development'
|
||||
|
||||
format 'misc', {
|
||||
// define the files to apply `misc` to
|
||||
target '**/*.gradle', '**/*.md', '**/.gitignore'
|
||||
|
||||
// define the steps to apply to those files
|
||||
indentWithSpaces()
|
||||
trimTrailingWhitespace()
|
||||
endWithNewline()
|
||||
}
|
||||
|
||||
kotlin {
|
||||
target '**/*.kt'
|
||||
ktlint()
|
||||
trimTrailingWhitespace()
|
||||
indentWithSpaces()
|
||||
endWithNewline()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user