Skip to content

Commit

Permalink
chore: add ktlint plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
zigavehovec committed Oct 9, 2023
1 parent de0fdf5 commit 6b6e782
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
8 changes: 8 additions & 0 deletions android/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[*.{kt,kts}]
ktlint_code_style=android_studio
max_line_length=120
# Allow wildcard imports for react native bridge, since IntelliJ does this automatically when performing
# imports optimization.
ij_kotlin_packages_to_use_import_on_demand = com.facebook.react.bridge.*
ij_kotlin_allow_trailing_comma=true
ij_kotlin_allow_trailing_comma_on_call_site=true
6 changes: 6 additions & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,25 @@ buildscript {
ext {
kotlinVersion = '1.7.21'
androidToolsVersion = '7.4.2'
ktlintVersion = '11.6.0'
}
repositories {
google()
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "com.android.tools.build:gradle:$androidToolsVersion"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath "org.jlleitschuh.gradle:ktlint-gradle:$ktlintVersion"
}
}

apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'org.jlleitschuh.gradle.ktlint'

repositories {
mavenLocal()
Expand Down

0 comments on commit 6b6e782

Please sign in to comment.