/kotlin-code-styles

IntelliJ IDEA code style settings for JUUL Labs' Kotlin and Android projects.

Primary LanguageShell

Kotlin Code Styles

IntelliJ IDEA code style settings for JUUL Labs' Kotlin and Android projects.

Installation

Clone this repository:

git clone https://github.com/JuulLabs/kotlin-code-styles.git

See Which remote URL should I use? for alternate ways of cloning repository.

Run the install script:

cd kotlin-code-styles/
./install.sh

Apply JUUL Labs' code style settings:

  • Restart Android Studio and/or IntelliJ if they're running
  • Open Project Settings (⌘ + ,)
  • Navigate to EditorCode Style
  • Select JUUL Labs from the Scheme dropdown

Preferences

Follows the Kotlin style guide with the following additional configurations.

Indentation Spaces
Tab size 4
Indent 4
Continuation indent1 4

1 Continuation indent of 4 is used instead of the suggested 8. See #1 for details.

Editor → Code Style → XML → Android

Android

License

Creative Commons License

This work is licensed under a Creative Commons Attribution 4.0 International License.