diff --git a/.github/workflows/run-check.yml b/.github/workflows/run-check.yml index 29134ecd3e..a7752b6313 100644 --- a/.github/workflows/run-check.yml +++ b/.github/workflows/run-check.yml @@ -31,7 +31,8 @@ jobs: path: | ~/.gradle/caches ~/.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: | ${{ runner.os }}-gradle-v2- @@ -52,7 +53,7 @@ jobs: # with the Compose testing library. Also exclude most FDroid-related tasks, as there is no # significant code difference between builds. run: | - ./gradlew check \ + ./gradlew check --no-daemon \ -x testStandardRelease \ -x testFdroidDebug \ -x testFdroidRelease \ diff --git a/.gitignore b/.gitignore index 688293dda5..b3c6c49574 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,6 @@ Thumbs.db /local.properties local.properties user.properties + +# Gradle build cache +/build-cache/ diff --git a/gradle.properties b/gradle.properties index aa85f46f01..61a867353d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,6 +4,6 @@ android.suppressUnsupportedCompileSdk=34 android.useAndroidX=true kotlin.code.style=official - +org.gradle.caching=true org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 org.gradle.parallel=true diff --git a/settings.gradle.kts b/settings.gradle.kts index 40e634f4ff..49d117cc0e 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -36,5 +36,13 @@ dependencyResolutionManagement { } } +buildCache { + local { + isEnabled = true + directory = File(rootDir, "build-cache") + removeUnusedEntriesAfterDays = 15 + } +} + rootProject.name = "Bitwarden" include(":app")