Skip to content

Commit b6a20c7

Browse files
committed
[FEAT] Add ktlint
1 parent c56b267 commit b6a20c7

File tree

8 files changed

+50
-1
lines changed

8 files changed

+50
-1
lines changed

.editorconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
root = true
2+
[*.{kt,kts}]
3+
max_line_length = 120
4+
insert_final_newline = true
5+
disabled_rules = import-ordering, no-wildcard-imports

.github/pull_request_template.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,17 @@ What types of changes does your code introduce?
66

77
- [ ] Bugfix (non-breaking change which fixes an issue)
88
- [ ] New feature (non-breaking change which adds functionality)
9-
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
9+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
10+
11+
### Preparing a pull request for review
12+
Ensure your change is properly formatted by running:
13+
14+
```gradle
15+
$ ./gradlew ktlintCheck
16+
```
17+
18+
Please correct any failures before requesting a review by running:
19+
20+
```gradle
21+
$ ./gradlew ktlintFormat
22+
```

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ buildscript {
1717

1818
plugins {
1919
id "com.google.devtools.ksp" version "$kotlin_version-1.0.6"
20+
id "org.jlleitschuh.gradle.ktlint" version "10.3.0"
2021
}
2122

2223
apply from: 'dependencies.gradle'

data/build.gradle

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ plugins {
33
id 'kotlin-android'
44
id 'kotlinx-serialization'
55
id 'com.google.devtools.ksp'
6+
id 'org.jlleitschuh.gradle.ktlint'
67
id 'com.github.ben-manes.versions'
78
id 'com.adarshr.test-logger'
89
}
@@ -34,6 +35,11 @@ android {
3435
}
3536
}
3637

38+
ktlint {
39+
verbose = true
40+
android = true
41+
}
42+
3743
dependencies {
3844
// MODULE
3945
implementation project(':domain')

design/preview/build.gradle

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
plugins {
22
id 'com.android.application'
33
id 'kotlin-android'
4+
id 'org.jlleitschuh.gradle.ktlint'
45
id 'com.github.ben-manes.versions'
56
}
67

@@ -34,6 +35,11 @@ android {
3435
}
3536
}
3637

38+
ktlint {
39+
verbose = true
40+
android = true
41+
}
42+
3743
dependencies {
3844
// MODULE
3945
implementation project(':design:ui')

design/ui/build.gradle

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
plugins {
22
id 'com.android.library'
33
id 'kotlin-android'
4+
id 'org.jlleitschuh.gradle.ktlint'
45
id 'com.github.ben-manes.versions'
56
}
67

@@ -32,6 +33,11 @@ android {
3233
}
3334
}
3435

36+
ktlint {
37+
verbose = true
38+
android = true
39+
}
40+
3541
dependencies {
3642
// MODULE
3743
implementation project(':domain')

domain/build.gradle

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ plugins {
22
id 'kotlin'
33
id 'idea'
44
id 'com.google.devtools.ksp'
5+
id 'org.jlleitschuh.gradle.ktlint'
56
id 'com.github.ben-manes.versions'
67
id 'com.adarshr.test-logger'
78
}
@@ -11,6 +12,11 @@ sourceSets.main {
1112
java.srcDirs += 'build/generated/ksp/main/kotlin'
1213
}
1314

15+
ktlint {
16+
verbose = true
17+
android = true
18+
}
19+
1420
dependencies {
1521
// KOTLIN
1622
implementation kotlinStdlib

presentation/build.gradle

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ plugins {
33
id 'org.jetbrains.kotlin.android'
44
id 'com.google.devtools.ksp'
55
id 'androidx.navigation.safeargs.kotlin'
6+
id 'org.jlleitschuh.gradle.ktlint'
67
id 'com.github.ben-manes.versions'
78
id 'com.adarshr.test-logger'
89
}
@@ -59,6 +60,11 @@ android {
5960
}
6061
}
6162

63+
ktlint {
64+
verbose = true
65+
android = true
66+
}
67+
6268
dependencies {
6369
// MODULE
6470
implementation project(':data')

0 commit comments

Comments
 (0)