Skip to content

Commit

Permalink
build : ktlint 라이브러리 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
minseonglove committed Nov 8, 2022
1 parent 842b5e6 commit 8bd3cce
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ plugins {
id 'com.google.gms.google-services'
}

configurations {
ktlint
}

android {
namespace 'com.gta.ucmc'
compileSdk 33
Expand Down Expand Up @@ -34,6 +38,7 @@ android {
}

dependencies {
ktlint 'com.pinterest:ktlint:0.47.1'
implementation 'androidx.core:core-ktx:1.9.0'
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'com.google.android.material:material:1.7.0'
Expand All @@ -45,3 +50,18 @@ dependencies {
implementation platform('com.google.firebase:firebase-bom:31.0.2')
implementation 'com.google.firebase:firebase-analytics-ktx'
}

task ktlint(type: JavaExec, group: "verification") {
description = "Check Kotlin code style."
mainClass.set("com.pinterest.ktlint.Main")
classpath = configurations.ktlint
args "src/**/*.kt"
}
check.dependsOn ktlint

task ktlintFormat(type: JavaExec, group: "formatting") {
description = "Fix Kotlin code style deviations."
mainClass.set("com.pinterest.ktlint.Main")
classpath = configurations.ktlint
args "-F", "src/**/*.kt"
}

0 comments on commit 8bd3cce

Please sign in to comment.