Skip to content

Commit

Permalink
ci: disable AboutLibraries when running lint checks
Browse files Browse the repository at this point in the history
  • Loading branch information
vitorhugods committed May 22, 2024
1 parent e18ac47 commit ecbfc45
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/codestyle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ jobs:
runs-on: buildjet-2vcpu-ubuntu-2204

# Add a bit more Metaspace size as it tends to fail on GH runner when running linter
# AboutLibraries seems to go crazy when running lint checks. So we explicitly don't run it.
env:
GRADLE_OPTS: -Dorg.gradle.jvmargs="-XX:MaxMetaspaceSize=1g"
DISABLE_ABOUT_LIBRARIES: TRUE

steps:
- name: Checkout
Expand All @@ -31,14 +33,8 @@ jobs:
run: |
./gradlew detektAll
- name: Run Linter
# AboutLibraries seems to output tons of false warnings because of Kalium.
# Run it quietly first to clear up the logs.
# Then:
# For the app we need lintDevDebug. For the other modules we use lintDebug.
run: |
./gradlew collectDependencies -q --no-daemon
./gradlew lintDebug --no-daemon
./gradlew lintDevDebug --no-daemon
./gradlew lint
- name: Cleanup Gradle Cache
# Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.
# Restoring these files from a GitHub Actions cache might cause problems for future builds.
Expand Down
5 changes: 5 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ android {
}
}

aboutLibraries {
val isAboutLibrariesDisabled = System.getenv("DISABLE_ABOUT_LIBRARIES")?.equals("true", true) ?: false
registerAndroidTasks = !isAboutLibrariesDisabled
}

dependencies {
implementation("com.wire.kalium:kalium-logic")
implementation("com.wire.kalium:kalium-util")
Expand Down

0 comments on commit ecbfc45

Please sign in to comment.