Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
1bb7579
feat: Add ktlint to project
tevincent Jun 6, 2025
615343e
chore: Update command ran on CI for ktlint
tevincent Jun 11, 2025
46f83a1
chore: Apply ktlint plugin to all projects
tevincent Jun 11, 2025
bbae745
chore: Add new rules to disable
tevincent Jun 11, 2025
e1980db
feat: Add ktlint to project
tevincent Jun 6, 2025
ccb462b
chore: Update command ran on CI for ktlint
tevincent Jun 11, 2025
f9cbe1b
chore: Apply ktlint plugin to all projects
tevincent Jun 11, 2025
6c950d5
chore: Add new rules to disable
tevincent Jun 11, 2025
f595b69
feat: Add ktlint to project
tevincent Jun 6, 2025
d3b99fd
chore: Add baseline
tevincent Aug 14, 2025
f743ecd
chore: Update libs.versions.toml and build.gradle.kts
tevincent Aug 14, 2025
3c1363b
chore: Update ktlint plugin
tevincent Aug 14, 2025
9ae813f
chore: Update ktlint version
tevincent Aug 14, 2025
007a4de
chore: Use ktlint from Core
tevincent Aug 14, 2025
c344269
chore: Change where the baseline fine is located at
tevincent Aug 21, 2025
53918ba
chore: Update Core
tevincent Aug 21, 2025
d7c98de
chore: Use ktlint from Core
tevincent Jul 8, 2026
236af85
chore: Update baselines
tevincent Jul 8, 2026
cb6649a
chore: Update android.yml to fix the path for ktlint
tevincent Jul 8, 2026
93788e9
chore: Execute ktlint command instead of downloading the binary
tevincent Jul 8, 2026
af7b140
chore: Do a submodule recursive for ktlint
tevincent Jul 8, 2026
bfc250b
fix: Use Java 17 for ktlint
tevincent Jul 9, 2026
2159fd2
chore: Update core
tevincent Jul 9, 2026
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
20 changes: 20 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Kotlin Ktlint
root = true

[*.{kt,kts}]

ktlint_code_style = android_studio

ktlint_standard_no-wildcard-imports = disabled
ktlint_standard_no-empty-first-line-in-class-body = disabled
ktlint_standard_no-line-break-before-assignment = disabled
ktlint_standard_multiline-expression-wrapping = disabled
ktlint_standard_string-template-indent = disabled
ktlint_standard_trailing-comma-on-call-site = disabled
ktlint_standard_trailing-comma-on-declaration-site = disabled
ktlint_standard_no-empty-first-line-in-method-block = disabled
ktlint_standard_expression-body-wrapping = disabled
ktlint_standard_function-signature = disabled
ktlint_standard_spacing-between-declarations-with-annotations = disabled

max_line_length = 130
21 changes: 21 additions & 0 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,28 @@
cancel-in-progress: true

jobs:

ktlint:
runs-on: ubuntu-latest

steps:
- name: Checkout the code
uses: actions/checkout@v5.0.0
with:
submodules: recursive
- name: Set up JDK 17
uses: actions/setup-java@v5.0.0
with:
distribution: temurin
java-version: 17

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Run ktlint
run: ./gradlew :app:ktlintCheck --no-daemon

instrumentation-tests:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
if: github.event.pull_request.draft == false
runs-on: [ self-hosted, Android ]

Expand Down
2 changes: 1 addition & 1 deletion Core
Submodule Core updated 113 files
1,950 changes: 1,950 additions & 0 deletions app/config/ktlint/baseline.xml

Large diffs are not rendered by default.

18 changes: 17 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
import org.jlleitschuh.gradle.ktlint.reporter.ReporterType

buildscript {

extra.apply {
Expand All @@ -25,6 +26,21 @@ plugins {
alias(core.plugins.dagger.hilt) apply false
alias(core.plugins.ksp) apply false
alias(core.plugins.navigation.safeargs) apply false
alias(core.plugins.ktlint)
}

ktlint {
version.set("1.7.1")
android.set(true)
ignoreFailures.set(false)
reporters {
reporter(ReporterType.PLAIN)
}
baseline.set(file("${projectDir}/config/ktlint/baseline.xml"))
}

subprojects {
apply(plugin = "org.jlleitschuh.gradle.ktlint")
}

tasks.register<Delete>("clean") {
Expand Down
6 changes: 6 additions & 0 deletions config/ktlint/baseline.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<baseline version="1.0">
<file name="build.gradle.kts">
<error line="39" column="25" source="standard:string-template" />
</file>
</baseline>
1 change: 1 addition & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,6 @@ junit-jupiter-engine = { module = "org.junit.jupiter:junit-jupiter-engine", vers
junit5 = { id = "de.mannodermaus.android-junit5" }
kotlin-android = { id = "kotlin-android" }
kotlin-kapt = { id = "kotlin-kapt" }
ktlint = { id = "org.jlleitschuh.gradle.ktlint" }
navigation-safeargs = { id = "androidx.navigation.safeargs.kotlin" }
realm-android = { id = "realm-android" }
Loading