From efc1e551842b830b388f4f3f3d21eb48116ec54e Mon Sep 17 00:00:00 2001 From: angrezichatterbox Date: Thu, 5 Sep 2024 11:55:49 +0530 Subject: [PATCH] feat:Added support for ./gradlew lintKotlin --- app/build.gradle | 31 +++++++++---------------------- build.gradle | 5 +++-- 2 files changed, 12 insertions(+), 24 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 4e0fcc1c..9ddeb64c 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -2,7 +2,9 @@ plugins { id 'com.android.application' id 'kotlin-android' id 'kotlin-kapt' - id 'org.jlleitschuh.gradle.ktlint' + id("org.jmailen.kotlinter") + + } def keystorePropertiesFile = rootProject.file("keystore.properties") @@ -19,8 +21,10 @@ android { } - - + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } buildFeatures { viewBinding = true buildConfig true @@ -81,25 +85,7 @@ android { buildUponDefaultConfig = true allRules = true } - ktlint { - version = "0.45.2" - debug = true - verbose = true - android = true - outputToConsole = true - outputColorName = "RED" - ignoreFailures = false - enableExperimentalRules = true - reporters { - reporter "plain" - reporter "checkstyle" - reporter "sarif" - } - filter { - exclude("**/generated/**") - include("**/kotlin/**") - } - } + namespace 'be.scri' } @@ -163,3 +149,4 @@ task moveFromi18n { tasks.named('preBuild').configure { dependsOn tasks.named('moveFromi18n') } + diff --git a/build.gradle b/build.gradle index 7c8b7e84..694921b2 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = '1.9.22' + ext.kotlin_version = '2.0.0' repositories { google() @@ -19,14 +19,15 @@ buildscript { classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.23.6" classpath "org.jlleitschuh.gradle:ktlint-gradle:12.1.1" classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.23.6" + classpath("org.jmailen.gradle:kotlinter-gradle:4.4.1") } } -apply plugin: "org.jlleitschuh.gradle.ktlint" apply plugin: "io.gitlab.arturbosch.detekt" +apply plugin: "org.jmailen.kotlinter" allprojects { repositories {