diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1f39f87c..fccf13c7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,6 +21,8 @@ jobs: - name: Setup Gradle uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # pin@v4 + with: + cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} - name: Set up Java uses: actions/setup-java@v4 diff --git a/.github/workflows/integration-tests-sentry-cli.yml b/.github/workflows/integration-tests-sentry-cli.yml index ce63f329..deed6670 100644 --- a/.github/workflows/integration-tests-sentry-cli.yml +++ b/.github/workflows/integration-tests-sentry-cli.yml @@ -23,6 +23,8 @@ jobs: - name: Setup Gradle uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # pin@v4 + with: + cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} - name: Set up Java uses: actions/setup-java@v4 diff --git a/.github/workflows/pre-merge.yaml b/.github/workflows/pre-merge.yaml index dbcf3bb4..7563893f 100644 --- a/.github/workflows/pre-merge.yaml +++ b/.github/workflows/pre-merge.yaml @@ -32,6 +32,8 @@ jobs: - name: Setup Gradle uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # pin@v4 + with: + cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} - name: Run Gradle tasks if: runner.os != 'Windows' diff --git a/.github/workflows/test-matrix-agp-gradle.yaml b/.github/workflows/test-matrix-agp-gradle.yaml index 5b0a59f7..41cf4262 100644 --- a/.github/workflows/test-matrix-agp-gradle.yaml +++ b/.github/workflows/test-matrix-agp-gradle.yaml @@ -66,6 +66,7 @@ jobs: uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # pin@v4 with: gradle-version: ${{ matrix.gradle }} + cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} - name: Build the Release variants and integrationTest run: gradle assembleRelease bundleRelease integrationTest diff --git a/.github/workflows/test-publish.yaml b/.github/workflows/test-publish.yaml index eb191ce7..af59b7f2 100644 --- a/.github/workflows/test-publish.yaml +++ b/.github/workflows/test-publish.yaml @@ -24,6 +24,8 @@ jobs: - name: Setup Gradle uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # pin@v4 + with: + cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} - name: Build the Release variant run: ./gradlew assembleRelease --no-build-cache | tee gradle.log diff --git a/gradle.properties b/gradle.properties index 874eb4ec..3d44c20e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,8 @@ org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1536m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:+UseParallelGC -XX:+CrashOnOutOfMemoryError org.gradle.caching=true org.gradle.parallel=true +org.gradle.configuration-cache=true +org.gradle.configuration-cache.parallel=true android.useAndroidX=true diff --git a/plugin-build/build.gradle.kts b/plugin-build/build.gradle.kts index 75b079d0..5ae1a2d9 100644 --- a/plugin-build/build.gradle.kts +++ b/plugin-build/build.gradle.kts @@ -1,8 +1,10 @@ +import com.vanniktech.maven.publish.tasks.JavadocJar import io.sentry.android.gradle.internal.ASMifyTask import io.sentry.android.gradle.internal.BootstrapAndroidSdk import java.io.FileInputStream import java.util.Properties import org.gradle.api.tasks.testing.logging.TestLogEvent +import org.jetbrains.dokka.gradle.DokkaTask import org.jetbrains.kotlin.config.KotlinCompilerVersion import org.jetbrains.kotlin.gradle.tasks.KotlinCompile @@ -304,3 +306,11 @@ tasks.withType().configureEach { failOnWarning.set(true) enableStricterValidation.set(true) } + +tasks.withType().configureEach { + notCompatibleWithConfigurationCache("Cannot serialize configuration") +} + +tasks.withType().configureEach { + notCompatibleWithConfigurationCache("Cannot serialize configuration") +}