|
@@ -31,10 +31,7 @@ apply plugin: 'kotlin-kapt'
|
|
|
apply plugin: 'kotlin-android-extensions'
|
|
|
apply plugin: 'com.github.spotbugs'
|
|
|
apply plugin: 'io.gitlab.arturbosch.detekt'
|
|
|
-
|
|
|
-configurations {
|
|
|
- ktlint
|
|
|
-}
|
|
|
+apply plugin: "org.jlleitschuh.gradle.ktlint"
|
|
|
|
|
|
def urlFile = { url, fileName ->
|
|
|
File file = new File("$buildDir/download/${fileName}")
|
|
@@ -149,7 +146,7 @@ android {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- check.dependsOn 'spotbugsGplayDebugReport', 'lint', 'ktlint', 'detekt'
|
|
|
+ check.dependsOn 'spotbugsGplayDebug', 'lint', 'ktlintCheck', 'detekt'
|
|
|
lint.dependsOn 'preBuild'
|
|
|
|
|
|
compileOptions {
|
|
@@ -206,7 +203,6 @@ dependencies {
|
|
|
implementation ('com.gitlab.bitfireAT:dav4jvm:2.1.3', {
|
|
|
exclude group: 'org.ogce', module: 'xpp3' // Android comes with its own XmlPullParser
|
|
|
})
|
|
|
- ktlint "com.pinterest:ktlint:0.44.0"
|
|
|
implementation 'org.conscrypt:conscrypt-android:2.5.2'
|
|
|
|
|
|
implementation 'androidx.camera:camera-core:1.0.2'
|
|
@@ -338,20 +334,6 @@ dependencies {
|
|
|
gplayImplementation "com.google.firebase:firebase-messaging:23.0.0"
|
|
|
}
|
|
|
|
|
|
-task ktlint(type: JavaExec, group: "verification") {
|
|
|
- description = "Check Kotlin code style."
|
|
|
- main = "com.pinterest.ktlint.Main"
|
|
|
- classpath = configurations.ktlint
|
|
|
- args "--reporter=plain", "--reporter=plain,output=${buildDir}/ktlint.txt,src/**/*.kt"
|
|
|
-}
|
|
|
-
|
|
|
-task ktlintFormat(type: JavaExec, group: "formatting") {
|
|
|
- description = "Fix Kotlin code style deviations."
|
|
|
- main = "com.pinterest.ktlint.Main"
|
|
|
- classpath = configurations.ktlint
|
|
|
- args "-F", "src/**/*.kt"
|
|
|
-}
|
|
|
-
|
|
|
detekt {
|
|
|
reports {
|
|
|
xml {
|