Skip to content

Commit 1971428

Browse files
committed
use the assemble task for a full build without running the test suites
1 parent 782ac79 commit 1971428

10 files changed

Lines changed: 44 additions & 10 deletions

File tree

.github/scripts/checkBuildReproducibility.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function calculate_checksums() {
1717
--no-build-cache \
1818
-Porg.gradle.java.installations.auto-download=false \
1919
-Dscan.tag.Reproducibility \
20-
clean assemble
20+
clean assemble -x jmhJar
2121

2222
# Find all JARs in build/libs (excluding javadoc), sort, and hash
2323
find . -type f -path '*/build/libs/*.jar' ! -name '*javadoc*.jar' -print0 \

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
- name: Compile
6868
uses: ./.github/actions/run-gradle
6969
with:
70-
arguments: build -x check -x assemble
70+
arguments: assemble
7171
java: ${{ env.JAVA_VERSION }}
7272
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
7373

@@ -249,7 +249,7 @@ jobs:
249249
- name: Prepare Jacoco Reports
250250
uses: ./.github/actions/run-gradle
251251
with:
252-
arguments: build -x check -x assemble
252+
arguments: assemble
253253
java: ${{ env.PUBLISH_JDK }}
254254
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
255255
- name: Combine Jacoco Reports

.github/workflows/qodana.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
with:
6262
java: ${{ env.JAVA_VERSION }}
6363
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
64-
arguments: build -x check -x assemble
64+
arguments: assemble
6565
- name: Qodana - Code Inspection
6666
uses: JetBrains/qodana-action@27de2a744479d1d731934eeaf79287575ebc5dd3 # v2025.2.1
6767
env:

caffeine/src/integrationTest/java/com/github/benmanes/caffeine/integtest/ModuleTest.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
import java.lang.module.ModuleDescriptor.Exports;
2525
import java.lang.module.ModuleDescriptor.Requires;
2626

27+
import com.github.benmanes.caffeine.cache.LoadingCache;
28+
2729
import org.junit.jupiter.api.Test;
2830

2931
import com.github.benmanes.caffeine.cache.Caffeine;
@@ -36,6 +38,13 @@
3638
*/
3739
final class ModuleTest {
3840

41+
@Test
42+
void sanity() {
43+
@SuppressWarnings("Varifier")
44+
LoadingCache<Integer, Integer> cache = Caffeine.newBuilder().build(k -> -k);
45+
assertEquals(-1, cache.get(1).intValue());
46+
}
47+
3948
@Test
4049
void descriptor_name() {
4150
var descriptor = getModuleDescriptor();

caffeine/src/test/java/com/github/benmanes/caffeine/cache/InternerTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,8 @@ public void intern_strong_present() {
199199
@Test
200200
public void nullPointerExceptions() {
201201
new NullPointerTester().testAllPublicStaticMethods(Interner.class);
202+
var node = new Interned<Object, Boolean>(new WeakReference<>(1));
203+
assertThat(node.getKeyReferenceOrNull()).isNotNull();
202204
}
203205

204206
@Test

caffeine/src/test/java/com/github/benmanes/caffeine/cache/TimerWheelTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,7 @@ public void sentinel_unsupported() {
581581
var node = new Sentinel<>();
582582
assertThrows(UnsupportedOperationException.class, node::getKeyReference);
583583
assertThrows(UnsupportedOperationException.class, node::getValueReference);
584+
assertThrows(UnsupportedOperationException.class, node::getKeyReferenceOrNull);
584585
}
585586

586587
/** Returns a snapshot roughly ordered by the expiration time. */

examples/coalescing-bulkloader-reactor/gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[versions]
22
caffeine = "3.2.2"
33
junit = "6.0.0"
4-
reactor = "3.8.0-M7"
4+
reactor = "3.8.0-RC1"
55
truth = "1.4.5"
66
versions = "0.53.0"
77

gradle/libs.versions.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ felix-scr = "2.2.14"
3131
findsecbugs = "1.14.0"
3232
flip-tables = "1.1.1"
3333
forbidden-apis = "3.10"
34-
google-java-format = "1.29.0"
34+
google-java-format = "1.30.0"
3535
guava = "33.5.0-jre"
3636
guice = "7.0.0"
3737
h2 = "2.4.240"
@@ -71,7 +71,7 @@ nexus-publish = "2.0.0"
7171
nullaway = "0.12.10"
7272
nullaway-plugin = "2.3.0"
7373
okhttp = "5.2.1"
74-
okio = "3.16.1"
74+
okio = "3.16.2"
7575
osgi-annotations = "1.5.1"
7676
osgi-function = "1.2.0"
7777
osgi-promise = "1.3.0"
@@ -84,10 +84,10 @@ revapi = "1.8.0"
8484
slf4j = "2.0.17"
8585
slf4j-test = "3.0.3"
8686
sigstore = "2.0.0-rc1"
87-
sonarqube = "6.3.1.5724"
88-
spotbugs = "4.9.6"
87+
sonarqube = "7.0.0.6105"
88+
spotbugs = "4.9.7"
8989
spotbugs-contrib = "7.6.15"
90-
spotbugs-plugin = "6.4.2"
90+
spotbugs-plugin = "6.4.3"
9191
stream = "2.9.8"
9292
tcache = "2.0.1"
9393
testng = "7.11.0"

gradle/plugins/src/main/kotlin/lifecycle/java-library.caffeine.gradle.kts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ tasks.withType<JavaExec>().configureEach {
6464
}
6565
}
6666

67+
tasks.named("assemble") {
68+
dependsOn(tasks.withType<Jar>())
69+
dependsOn(tasks.withType<JavaCompile>())
70+
}
71+
6772
tasks.named<Jar>("jar").configure {
6873
inputs.property("version", project.version.toString())
6974
outputs.cacheIf { true }
@@ -93,6 +98,8 @@ tasks.named<Jar>("jar").configure {
9398

9499
tasks.withType<Javadoc>().configureEach {
95100
val snippetPath = layout.projectDirectory.dir("src/test/java")
101+
val isEnabled = isEarlyAccess().map { !it }
102+
onlyIf { isEnabled.get() }
96103
inputs.dir(snippetPath)
97104
.withPathSensitivity(RELATIVE)
98105
.withPropertyName("snippetPath")

guava/src/integrationTest/java/com/github/benmanes/caffeine/integtest/ModuleTest.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424
import java.lang.module.ModuleDescriptor.Exports;
2525
import java.lang.module.ModuleDescriptor.Requires;
2626

27+
import com.github.benmanes.caffeine.cache.Caffeine;
28+
import com.google.common.cache.CacheLoader;
29+
import com.google.common.cache.LoadingCache;
30+
2731
import org.junit.jupiter.api.Test;
2832

2933
import com.github.benmanes.caffeine.guava.CaffeinatedGuava;
@@ -36,6 +40,17 @@
3640
*/
3741
final class ModuleTest {
3842

43+
@Test
44+
void sanity() {
45+
var loader = new CacheLoader<Integer, Integer>() {
46+
@Override public Integer load(Integer key) {
47+
return -key;
48+
}
49+
};
50+
LoadingCache<Integer, Integer> cache = CaffeinatedGuava.build(Caffeine.newBuilder(), loader);
51+
assertEquals(-1, cache.getUnchecked(1).intValue());
52+
}
53+
3954
@Test
4055
void descriptor_name() {
4156
var descriptor = getModuleDescriptor();

0 commit comments

Comments
 (0)