Skip to content

Commit 7dbdf19

Browse files
committed
Run compose-lint lintFix in CI
1 parent 050bb1a commit 7dbdf19

4 files changed

Lines changed: 12 additions & 1 deletion

File tree

.github/workflows/screenshots.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
distribution: 'temurin'
2323
- uses: android-actions/setup-android@v3
2424
- uses: gradle/actions/setup-gradle@v4
25+
- run: ./gradlew :composeApp:lintFix :android:lintFix
2526
- run: ./gradlew :screenshotTests:updateScreenshots
2627
- name: Auto-commit if changed
2728
if: github.event_name == 'push'
@@ -30,5 +31,5 @@ jobs:
3031
git config user.name "github-actions[bot]"
3132
git config user.email "github-actions[bot]@users.noreply.github.com"
3233
git add -A
33-
git commit -m "Auto: refresh Paparazzi screenshots [skip ci]"
34+
git commit -m "Auto-fix: lintFix and refresh Paparazzi screenshots [skip ci]"
3435
git push

android/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ android {
9898
}
9999
lint {
100100
abortOnError = false
101+
checkDependencies = true
101102
}
102103
namespace = "com.inspiredandroid.linuxcommandbibliotheca"
103104
}

composeApp/build.gradle.kts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ buildscript {
1313
plugins {
1414
alias(libs.plugins.kotlin.multiplatform)
1515
alias(libs.plugins.android.kotlin.multiplatform.library)
16+
alias(libs.plugins.android.lint)
1617
alias(libs.plugins.compose.multiplatform)
1718
alias(libs.plugins.compose.compiler)
1819
alias(libs.plugins.kotlin.serialization)
@@ -37,6 +38,9 @@ kotlin {
3738
androidResources {
3839
enable = true
3940
}
41+
lint {
42+
abortOnError = false
43+
}
4044
}
4145

4246
jvm("desktop") {
@@ -152,6 +156,10 @@ tasks
152156
dependsOn(convertIconsToVectorDrawables)
153157
}
154158

159+
lint {
160+
abortOnError = false
161+
}
162+
155163
dependencies {
156164
lintChecks(libs.compose.lint.checks)
157165
}

gradle/libs.versions.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ compose-lint-checks = { module = "com.slack.lint.compose:compose-lint-checks", v
6767
[plugins]
6868
android-application = { id = "com.android.application", version.ref = "agp" }
6969
android-library = { id = "com.android.library", version.ref = "agp" }
70+
android-lint = { id = "com.android.lint" }
7071
android-kotlin-multiplatform-library = { id = "com.android.kotlin.multiplatform.library" }
7172
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
7273
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }

0 commit comments

Comments
 (0)