diff --git a/.github/workflows/precommit.yml b/.github/workflows/precommit.yml index f4622859916c7..6a9dcabbdf9e2 100644 --- a/.github/workflows/precommit.yml +++ b/.github/workflows/precommit.yml @@ -15,10 +15,9 @@ jobs: with: java-version: 11 distribution: temurin - cache: gradle - name: Run Gradle (precommit) run: | - ./gradlew javadoc precommit --parallel + ./gradlew javadoc precommit --parallel --no-build-cache -PDISABLE_BUILD_CACHE - name: Setup docker (missing on MacOS) if: runner.os == 'macos' run: | @@ -27,4 +26,4 @@ jobs: sudo ln -sf $HOME/.colima/default/docker.sock /var/run/docker.sock - name: Run Gradle (assemble) run: | - ./gradlew assemble --parallel + ./gradlew assemble --parallel --no-build-cache -PDISABLE_BUILD_CACHE diff --git a/gradle.properties b/gradle.properties index 7c359ed2b652c..3dacc5044926c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -10,7 +10,7 @@ # # Enable build caching -org.gradle.caching=true +org.gradle.caching=false org.gradle.warning.mode=none org.gradle.parallel=true org.gradle.jvmargs=-Xmx3g -XX:+HeapDumpOnOutOfMemoryError -Xss2m \ diff --git a/settings.gradle b/settings.gradle index c04b5997d49b1..13cc6669e3d33 100644 --- a/settings.gradle +++ b/settings.gradle @@ -13,9 +13,11 @@ plugins { id "com.gradle.enterprise" version "3.14.1" } +ext.disableBuildCache = hasProperty('DISABLE_BUILD_CACHE') || System.getenv().containsKey('DISABLE_BUILD_CACHE') + buildCache { local { - enabled = true + enabled = !disableBuildCache removeUnusedEntriesAfterDays = 14 } }