Skip to content

Commit

Permalink
feat:Added support for ./gradlew lintKotlin
Browse files Browse the repository at this point in the history
  • Loading branch information
angrezichatterbox committed Sep 5, 2024
1 parent 0f5058d commit efc1e55
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 24 deletions.
31 changes: 9 additions & 22 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -19,8 +21,10 @@ android {
}




compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildFeatures {
viewBinding = true
buildConfig true
Expand Down Expand Up @@ -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'
}
Expand Down Expand Up @@ -163,3 +149,4 @@ task moveFromi18n {
tasks.named('preBuild').configure {
dependsOn tasks.named('moveFromi18n')
}

5 changes: 3 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -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()
Expand All @@ -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 {
Expand Down

0 comments on commit efc1e55

Please sign in to comment.