From 1105d5dacda97e1332af030eb197a91e371e7f05 Mon Sep 17 00:00:00 2001 From: Ben Manes Date: Tue, 26 Nov 2024 12:36:11 -0800 Subject: [PATCH] increase gradle workers on github actions (wip, hack to force recompile) --- .github/actions/run-gradle/action.yml | 6 ++---- .../com/github/benmanes/caffeine/cache/Specifications.java | 2 ++ .../main/java/com/github/benmanes/caffeine/cache/Cache.java | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/actions/run-gradle/action.yml b/.github/actions/run-gradle/action.yml index 5171b2e5d1..85733e1a42 100644 --- a/.github/actions/run-gradle/action.yml +++ b/.github/actions/run-gradle/action.yml @@ -64,10 +64,10 @@ runs: fi echo "JDK_CI=$JAVA_HOME" >> $GITHUB_ENV echo "JDK_EA=${{ inputs.early-access == inputs.java }}" >> $GITHUB_ENV + echo "JAVA_TOOL_OPTIONS=-Dorg.gradle.workers.max=$((2 * $(nproc)))" >> $GITHUB_ENV + echo "ORG_GRADLE_PROJECT_org.gradle.java.installations.auto-download=false" >> $GITHUB_ENV - name: Setup Gradle uses: gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1 - env: - ORG_GRADLE_PROJECT_org.gradle.java.installations.auto-download: 'false' with: add-job-summary: never cache-read-only: false @@ -75,8 +75,6 @@ runs: cache-encryption-key: ${{ inputs.cache-encryption-key }} - name: Run ${{ inputs.arguments }} if: ${{ inputs.arguments != '' }} - env: - ORG_GRADLE_PROJECT_org.gradle.java.installations.auto-download: 'false' shell: bash run: | echo "::add-matcher::.github/problem-matcher.json" diff --git a/caffeine/src/javaPoet/java/com/github/benmanes/caffeine/cache/Specifications.java b/caffeine/src/javaPoet/java/com/github/benmanes/caffeine/cache/Specifications.java index 8305fbf5dd..6e52360962 100644 --- a/caffeine/src/javaPoet/java/com/github/benmanes/caffeine/cache/Specifications.java +++ b/caffeine/src/javaPoet/java/com/github/benmanes/caffeine/cache/Specifications.java @@ -34,6 +34,8 @@ * @author ben.manes@gmail.com (Ben Manes) */ public final class Specifications { + final String test = "hack"; + public static final String PACKAGE_NAME = Specifications.class.getPackage().getName(); public static final String RETIRED_STRONG_KEY = "RETIRED_STRONG_KEY"; public static final String RETIRED_WEAK_KEY = "RETIRED_WEAK_KEY"; diff --git a/caffeine/src/main/java/com/github/benmanes/caffeine/cache/Cache.java b/caffeine/src/main/java/com/github/benmanes/caffeine/cache/Cache.java index cddcd68179..5f7b4dfd3b 100644 --- a/caffeine/src/main/java/com/github/benmanes/caffeine/cache/Cache.java +++ b/caffeine/src/main/java/com/github/benmanes/caffeine/cache/Cache.java @@ -39,6 +39,7 @@ */ @NullMarked public interface Cache { + final String test = "hack"; /** * Returns the value associated with the {@code key} in this cache, or {@code null} if there is no