From e5c688fe69acb345027abcd97d69eb0ef1541e46 Mon Sep 17 00:00:00 2001 From: Harry Andreolas Date: Thu, 4 Jul 2024 10:46:35 +0300 Subject: [PATCH 1/2] chore: add gradle cache on CI --- .github/workflows/android.yml | 23 +++++++++++++++++++---- .github/workflows/code_coverage.yml | 20 ++++++++++++++++++++ .github/workflows/distribute.yml | 19 +++++++++++++++++++ 3 files changed, 58 insertions(+), 4 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 275d9244..02d2f5bd 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -19,11 +19,26 @@ jobs: java-version: 17 distribution: 'adopt' + - name: Cache Gradle wrapper + uses: actions/cache@v3 + with: + path: | + ~/.gradle/wrapper + key: gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} + restore-keys: | + gradle-wrapper- + + - name: Cache Gradle dependencies + uses: actions/cache@v3 + with: + path: | + ~/.gradle/caches + ~/.gradle/caches/modules-2/files-2.1 + key: gradle-caches-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + gradle-caches-${{ runner.os }}- + - name: Grant execute permission for gradlew run: chmod +x gradlew - # - name: Build with Gradle - # run: ./gradlew build - # - name: Run Unit Tests - # run: ./gradlew testDebugUnitTest - name: Detekt Format run: ./gradlew detektFormat diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index bf32ea3c..2831bf39 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -2,6 +2,7 @@ name: Code Coverage # Run CI task on Push only for main branch, also on PR. on: + workflow_dispatch: push: branches: - main @@ -21,6 +22,25 @@ jobs: java-version: 17 distribution: 'adopt' + - name: Cache Gradle wrapper + uses: actions/cache@v3 + with: + path: | + ~/.gradle/wrapper + key: gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} + restore-keys: | + gradle-wrapper- + + - name: Cache Gradle dependencies + uses: actions/cache@v3 + with: + path: | + ~/.gradle/caches + ~/.gradle/caches/modules-2/files-2.1 + key: gradle-caches-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + gradle-caches-${{ runner.os }}- + - name: Run tests & Generate Coverage run: ./gradlew koverXmlReportDebug - name: Upload coverage reports to Codecov diff --git a/.github/workflows/distribute.yml b/.github/workflows/distribute.yml index 5b911d19..0668b611 100644 --- a/.github/workflows/distribute.yml +++ b/.github/workflows/distribute.yml @@ -25,6 +25,25 @@ jobs: java-version: 17 distribution: 'adopt' + - name: Cache Gradle wrapper + uses: actions/cache@v3 + with: + path: | + ~/.gradle/wrapper + key: gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} + restore-keys: | + gradle-wrapper- + + - name: Cache Gradle dependencies + uses: actions/cache@v3 + with: + path: | + ~/.gradle/caches + ~/.gradle/caches/modules-2/files-2.1 + key: gradle-caches-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + gradle-caches-${{ runner.os }}- + - name: Auth token to local.properties env: TMDB_AUTH_TOKEN: ${{ secrets.TMDB_AUTH_TOKEN }} From 3ac86a7420362b5e963716ce892054c67d7c5a9f Mon Sep 17 00:00:00 2001 From: Harry Andreolas Date: Thu, 4 Jul 2024 11:42:08 +0300 Subject: [PATCH 2/2] chore: bump library versions --- gradle/libs.versions.toml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index e0e78959..e4e9fde2 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -12,11 +12,11 @@ android-tools = "31.4.0" agp = "8.4.0" core-ktx = "1.13.1" junit = "4.13.2" -androidx-test-ext-junit = "1.1.5" +androidx-test-ext-junit = "1.2.1" lifecycle-runtime-ktx = "2.7.0" activity-compose = "1.9.0" start-up = "1.1.1" -kotlinx-datetime = "0.4.0" +kotlinx-datetime = "0.6.0" ktlint = "12.1.1" secrets = "2.0.1" desugar = "2.0.4" @@ -27,19 +27,19 @@ detekt = "1.23.6" #androidx-fragment = "1.7.0" # Internal Database -room = "2.6.0" -datastore = '1.0.0' +room = "2.6.1" +datastore = '1.1.1' encrypted-prefs = '1.1.0-alpha04' # Multithreading -kotlinx-coroutines = '1.7.3' +kotlinx-coroutines = '1.8.1' # Network & Serialization ktor = "2.3.8" kotlinx-serialization = "1.5.1" # Depedency Injection -hilt = "2.49" +hilt = "2.51.1" # Compose compose-bom = "2024.06.00" @@ -53,13 +53,13 @@ timber = "5.0.1" # Testing kover = "0.8.1" -androidx-test = "1.5.0" +androidx-test = "1.6.1" truth = "1.4.2" turbine = "1.1.0" # UI -robolectric = "4.11.1" -androidx-compose-ui-test = "1.6.7" +robolectric = "4.12.2" +androidx-compose-ui-test = "1.6.8" ui-automator = "2.3.0" # Mockers