Enable build cache (#1149)

This commit is contained in:
Patrick Honkonen 2024-03-15 14:37:34 -04:00 committed by Álison Fernandes
parent 2244e21e29
commit 77a40aeb2f
4 changed files with 15 additions and 3 deletions

View file

@ -31,7 +31,8 @@ jobs:
path: | path: |
~/.gradle/caches ~/.gradle/caches
~/.gradle/wrapper ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-v2-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} ${{ github.workspace }}/build-cache
key: ${{ runner.os }}-gradle-v2-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', '**/libs.versions.toml') }}
restore-keys: | restore-keys: |
${{ runner.os }}-gradle-v2- ${{ runner.os }}-gradle-v2-
@ -52,7 +53,7 @@ jobs:
# with the Compose testing library. Also exclude most FDroid-related tasks, as there is no # with the Compose testing library. Also exclude most FDroid-related tasks, as there is no
# significant code difference between builds. # significant code difference between builds.
run: | run: |
./gradlew check \ ./gradlew check --no-daemon \
-x testStandardRelease \ -x testStandardRelease \
-x testFdroidDebug \ -x testFdroidDebug \
-x testFdroidRelease \ -x testFdroidRelease \

3
.gitignore vendored
View file

@ -11,3 +11,6 @@ Thumbs.db
/local.properties /local.properties
local.properties local.properties
user.properties user.properties
# Gradle build cache
/build-cache/

View file

@ -4,6 +4,6 @@ android.suppressUnsupportedCompileSdk=34
android.useAndroidX=true android.useAndroidX=true
kotlin.code.style=official kotlin.code.style=official
org.gradle.caching=true
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
org.gradle.parallel=true org.gradle.parallel=true

View file

@ -36,5 +36,13 @@ dependencyResolutionManagement {
} }
} }
buildCache {
local {
isEnabled = true
directory = File(rootDir, "build-cache")
removeUnusedEntriesAfterDays = 15
}
}
rootProject.name = "Bitwarden" rootProject.name = "Bitwarden"
include(":app") include(":app")