Skip to content

Commit

Permalink
chore: conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
ohassine committed May 23, 2024
2 parents c632e19 + 25f8a2f commit a40ffa8
Show file tree
Hide file tree
Showing 60 changed files with 9,568 additions and 204 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-beta-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ concurrency:
cancel-in-progress: true

jobs:
detekt:
uses: ./.github/workflows/codestyle.yml
code-analysis:
uses: ./.github/workflows/code-analysis.yml
unit-tests:
needs: [ detekt ]
needs: [ code-analysis ]
uses: ./.github/workflows/gradle-run-unit-tests.yml
build-app:
needs: [ unit-tests ]
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/build-develop-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,11 @@ concurrency:
cancel-in-progress: true

jobs:
detekt:
uses: ./.github/workflows/codestyle.yml
# unit-tests:
# code-analysis:
# needs: [ detekt ]
# uses: ./.github/workflows/gradle-run-unit-tests.yml
# uses: ./.github/workflows/code-analysis.yml
build-app:
needs: [ detekt ]
# needs: [ detekt ]
runs-on: buildjet-8vcpu-ubuntu-2204
steps:
- name: Checkout
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build-prod-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ concurrency:
cancel-in-progress: true

jobs:
detekt:
uses: ./.github/workflows/codestyle.yml
code-analysis:
uses: ./.github/workflows/code-analysis.yml
unit-tests:
needs: [ detekt ]
needs: [ code-analysis ]
uses: ./.github/workflows/gradle-run-unit-tests.yml
build-app:
needs: [ unit-tests ]
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build-rc-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ concurrency:
cancel-in-progress: true

jobs:
detekt:
uses: ./.github/workflows/codestyle.yml
code-analysis:
uses: ./.github/workflows/code-analysis.yml
unit-tests:
needs: [ detekt ]
needs: [ code-analysis ]
uses: ./.github/workflows/gradle-run-unit-tests.yml
build-app:
needs: [ unit-tests ]
Expand Down
66 changes: 66 additions & 0 deletions .github/workflows/code-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: "Code Analysis"

on: [workflow_call]

permissions:
contents: read

jobs:
lint:
runs-on: buildjet-4vcpu-ubuntu-2204
# Add a bit more Metaspace size as it tends to fail on GH runner when running linter,
# Reduce a bit the memory allocation pool, as the 8GB set in gradle.properties is too much for CI
# 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 -Xmx2G"'
DISABLE_ABOUT_LIBRARIES: TRUE
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive # Needed in order to fetch Kalium sources for building
fetch-depth: 0
- name: Set up JDK 17
uses: buildjet/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@5188e9b5527a0a094cee21e2fe9a8ca44b4629af

- name: Run Linter
run: |
./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.
run: |
rm -f ~/.gradle/caches/modules-2/modules-2.lock
rm -f ~/.gradle/caches/modules-2/gc.properties
style:
runs-on: buildjet-2vcpu-ubuntu-2204
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive # Needed in order to fetch Kalium sources for building
fetch-depth: 0
- name: Set up JDK 17
uses: buildjet/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@216d1ad2b3710bf005dc39237337b9673fd8fcd5
- name: Run Detekt
run: |
./gradlew detektAll
- 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.
run: |
rm -f ~/.gradle/caches/modules-2/modules-2.lock
rm -f ~/.gradle/caches/modules-2/gc.properties
33 changes: 0 additions & 33 deletions .github/workflows/codestyle.yml

This file was deleted.

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
Loading

0 comments on commit a40ffa8

Please sign in to comment.