From 958f118112936821570195853b17982332f5615d Mon Sep 17 00:00:00 2001 From: Ben Manes Date: Wed, 25 Dec 2024 10:17:32 -0800 Subject: [PATCH] fix jitpack build --- .../src/main/kotlin/lifecycle/publish.caffeine.gradle.kts | 5 ++++- .../caffeine/jcache/processor/EntryProcessorTest.java | 4 +++- jitpack.yml | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/gradle/plugins/src/main/kotlin/lifecycle/publish.caffeine.gradle.kts b/gradle/plugins/src/main/kotlin/lifecycle/publish.caffeine.gradle.kts index 437960f4b5..6e94d7df5f 100644 --- a/gradle/plugins/src/main/kotlin/lifecycle/publish.caffeine.gradle.kts +++ b/gradle/plugins/src/main/kotlin/lifecycle/publish.caffeine.gradle.kts @@ -1,10 +1,13 @@ plugins { - id("dev.sigstore.sign") `maven-publish` `java-library` signing } +if (System.getenv("ACTIONS_ID_TOKEN_REQUEST_URL") != null) { + apply(plugin = "dev.sigstore.sign") +} + java { withJavadocJar() withSourcesJar() diff --git a/jcache/src/test/java/com/github/benmanes/caffeine/jcache/processor/EntryProcessorTest.java b/jcache/src/test/java/com/github/benmanes/caffeine/jcache/processor/EntryProcessorTest.java index ac9bf03a1f..50ad555ae7 100644 --- a/jcache/src/test/java/com/github/benmanes/caffeine/jcache/processor/EntryProcessorTest.java +++ b/jcache/src/test/java/com/github/benmanes/caffeine/jcache/processor/EntryProcessorTest.java @@ -18,6 +18,7 @@ import static com.google.common.base.MoreObjects.firstNonNull; import static com.google.common.collect.ImmutableMap.toImmutableMap; import static com.google.common.truth.Truth.assertThat; +import static java.util.Objects.requireNonNull; import static java.util.function.Function.identity; import static javax.cache.expiry.Duration.FIVE_MINUTES; @@ -141,7 +142,8 @@ final class MapLoader implements CacheLoader { return map.get(key); } @Override public ImmutableMap loadAll(Iterable keys) { - return Streams.stream(keys).collect(toImmutableMap(identity(), this::load)); + return Streams.stream(keys).collect( + toImmutableMap(identity(), key -> requireNonNull(load(key)))); } } } diff --git a/jitpack.yml b/jitpack.yml index b4da4048f1..a2c1f3d7b8 100644 --- a/jitpack.yml +++ b/jitpack.yml @@ -1,5 +1,5 @@ before_install: - source "$HOME/.sdkman/bin/sdkman-init.sh" - sdk update - - sdk install java 21.0.3-zulu - - sdk use java 21.0.3-zulu + - sdk install java 21.0.5-zulu + - sdk use java 21.0.5-zulu