Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ktlint #144

Merged
merged 1 commit into from
Oct 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import org.jlleitschuh.gradle.ktlint.reporter.ReporterType

plugins {
alias libs.plugins.kotlin.android
alias libs.plugins.kotlin.kapt
alias libs.plugins.android.application
alias libs.plugins.ktlint.gradle
alias libs.plugins.hilt.android
alias libs.plugins.gms
alias libs.plugins.spotless
Expand Down Expand Up @@ -85,3 +88,11 @@ dependencies {
task wrapper(type: Wrapper){
gradleVersion = '7.2'
}

ktlint {
android.set(true)
reporters {
reporter(ReporterType.PLAIN)
reporter(ReporterType.HTML)
}
}
2 changes: 2 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jUnitVersion = "4.13.2"
kotlinVersion = "1.6.21"
kotlinCoroutineAdapter = "0.9.2"
kotlinCoroutinePlayServicesVersion = "1.6.4"
ktlintGradleVersion = "11.0.0"
legacySupportVersion = "1.0.0"
lifecycleVersion = "2.5.0"
lottieVersion = "5.2.0"
Expand Down Expand Up @@ -100,5 +101,6 @@ gms = { id = "com.google.gms.google-services", version.ref = "googleServicesVers
hilt-android = { id = "com.google.dagger.hilt.android", version.ref = "hiltVersion" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlinVersion" }
kotlin-kapt = { id = "org.jetbrains.kotlin.kapt", version.ref = "kotlinVersion" }
ktlint-gradle = { id = "org.jlleitschuh.gradle.ktlint", version.ref = "ktlintGradleVersion" }
navigation-safeargs = { id = "androidx.navigation.safeargs", version.ref = "navigationVersion"}
spotless = { id = "com.diffplug.spotless", version.ref = "spotlessVersion" }