From a7e8f5087ee10a814fe0148657e35c85392b93f8 Mon Sep 17 00:00:00 2001 From: wb9688 Date: Sun, 28 Jun 2020 14:59:44 +0200 Subject: [PATCH] Do not include Checkstyle in any APK --- app/build.gradle | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 6e0801049..9d1ac22a2 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -91,6 +91,11 @@ ext { markwonVersion = '4.3.1' } +configurations { + checkstyle + ktlint +} + checkstyle { configFile rootProject.file('checkstyle.xml') ignoreFailures false @@ -106,8 +111,7 @@ task runCheckstyle(type: Checkstyle) { exclude '**/BuildConfig.java' exclude 'main/java/us/shandian/giga/**' - // empty classpath - classpath = files() + classpath = configurations.checkstyle showViolations true @@ -117,10 +121,6 @@ task runCheckstyle(type: Checkstyle) { } } -configurations { - ktlint -} - task runKtlint(type: JavaExec) { main = "com.pinterest.ktlint.Main" classpath = configurations.ktlint @@ -143,7 +143,7 @@ dependencies { implementation "frankiesardo:icepick:${icepickVersion}" kapt "frankiesardo:icepick-processor:${icepickVersion}" - debugImplementation "com.puppycrawl.tools:checkstyle:${checkstyleVersion}" + checkstyle "com.puppycrawl.tools:checkstyle:${checkstyleVersion}" ktlint "com.pinterest:ktlint:0.35.0" debugImplementation "com.facebook.stetho:stetho:${stethoVersion}"