Skip to content

Commit

Permalink
Merge pull request #53 from Divinelink/feature/cache-gradle
Browse files Browse the repository at this point in the history
Gradle Cache
  • Loading branch information
Divinelink authored Jul 5, 2024
2 parents cd2546f + 3ac86a7 commit a24268b
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 13 deletions.
23 changes: 19 additions & 4 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
20 changes: 20 additions & 0 deletions .github/workflows/code_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/distribute.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
18 changes: 9 additions & 9 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand All @@ -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
Expand Down

0 comments on commit a24268b

Please sign in to comment.