ktlint-gradle
hands_on_kotlin
Our great sponsors
ktlint-gradle | hands_on_kotlin | |
---|---|---|
3 | 5 | |
1,387 | 48 | |
- | - | |
7.3 | 0.0 | |
19 days ago | almost 2 years ago | |
Kotlin | Kotlin | |
MIT License | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
ktlint-gradle
-
[Question] disable ktlint rules with ktlint-gradle version 12.0.2
buildscript { . . . dependencies { classpath 'com.android.tools.build:gradle:8.1.4' classpath "org.jlleitschuh.gradle:ktlint-gradle:12.0.2" // https://github.com/JLLeitschuh/ktlint-gradle/releases . . } } allprojects { . . . apply plugin: "org.jlleitschuh.gradle.ktlint" }
-
Ktlint automation for a team
Ktlint Gradle has a task addKtlintFormatGitPreCommitHook. Never used it though.
-
Supercharge your Kotlin Project
ext { // https://github.com/JLLeitschuh/ktlint-gradle/releases ktlintPluginVersion = "10.2.0" } dependencies { classpath 'com.android.tools.build:gradle:7.0.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.32" ## KTLINT DEPENDENCY classpath "org.jlleitschuh.gradle:ktlint-gradle:$ktlintPluginVersion" }
hands_on_kotlin
-
Supercharge your Kotlin Project
Finally, we apply this configuration to all our subprojects by adding the below inside our project-level build.gradle
-
Google SignIn Compose
We can now access the methods for signing in with Google. Let’s create a class (GoogleApiContract) that is responsible for calling the google APIs
-
Testing in Compose
In our previous articles, we managed to create our TodoApp. Now, let's write some tests.
-
Using Room in Jetpack Compose
TodoItem (Our entity class)
-
Using State in Jetpack Compose
Source code.
What are some alternatives?
ktlint - An anti-bikeshedding Kotlin linter with built-in formatter
android-developer-roadmap - 🗺 The Android Developer Roadmap offers comprehensive learning paths to help you understand Android ecosystems.
kotlinter-gradle - Painless, fast ktlint plugin for Gradle
detekt - Static code analysis for Kotlin
diktat - Strict coding standard for Kotlin and a custom set of rules for detecting code smells, code style issues and bugs
spring-petclinic-kotlin - Kotlin version of Spring Petclinic
nowinandroid - A fully functional Android app built entirely with Kotlin and Jetpack Compose
gotrue-kt - Kotlin Client for GoTrue API
carthage-gradle-plugin - Gradle plugin for Carthage
kotlin-android-template - Android + Kotlin + Github Actions + ktlint + Detekt + Gradle Kotlin DSL + buildSrc = ❤️