diff options
author | Andy Scherzinger <info@andy-scherzinger.de> | 2022-03-17 15:46:44 +0300 |
---|---|---|
committer | Andy Scherzinger <info@andy-scherzinger.de> | 2022-03-17 15:46:44 +0300 |
commit | eb67a31bd1476974e6f8644313c68de181b286f2 (patch) | |
tree | a9ae235f9705e60fd091685ca71877ef41629b63 /app/build.gradle | |
parent | d1d6898ffbc5ab7d9c4915c91ffe083977210d0a (diff) |
Use ktlint plugin instead of manual ktlint tasks
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Diffstat (limited to 'app/build.gradle')
-rw-r--r-- | app/build.gradle | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/app/build.gradle b/app/build.gradle index 4c088be09..11960f120 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -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 { |