-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add integration test for
caffeine
(#302)
Adds an integration test. Caffeine is patched and built against Guava with JPMS as a sanity test. - test: add integration test for `caffeine` - fix: makefile steps to copy libs - fix: shallow submodule clone - chore: caffeine patch at latest - chore: readme updates Signed-off-by: Sam Gammon <[email protected]>
- Loading branch information
Showing
7 changed files
with
136 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,17 +2,17 @@ | |
path = org.checkerframework | ||
url = [email protected]:typetools/checker-framework.git | ||
branch = master | ||
depth = 0 | ||
depth = 1 | ||
[submodule "error-prone"] | ||
path = com.google.errorprone | ||
url = [email protected]:google/error-prone.git | ||
branch = master | ||
depth = 0 | ||
depth = 1 | ||
[submodule "j2objc"] | ||
path = com.google.j2objc | ||
url = [email protected]:google/j2objc.git | ||
branch = master | ||
depth = 0 | ||
depth = 1 | ||
[submodule "guava"] | ||
path = com.google.guava | ||
url = [email protected]:sgammon/guava.git | ||
|
@@ -21,56 +21,60 @@ | |
[submodule "reactive-streams"] | ||
path = org.reactivestreams | ||
url = [email protected]:sgammon/reactive-streams-jvm.git | ||
depth = 0 | ||
depth = 1 | ||
[submodule "protobuf"] | ||
path = com.google.protobuf | ||
url = [email protected]:sgammon/protobuf.git | ||
depth = 0 | ||
depth = 1 | ||
[submodule "dubbo"] | ||
path = tests/integration/dubbo | ||
url = [email protected]:javamodules/dubbo.git | ||
depth = 0 | ||
depth = 1 | ||
[submodule "pmd"] | ||
path = tests/integration/pmd | ||
url = [email protected]:javamodules/pmd.git | ||
depth = 0 | ||
depth = 1 | ||
[submodule "ghidra"] | ||
path = tests/integration/ghidra | ||
url = [email protected]:javamodules/ghidra.git | ||
depth = 0 | ||
depth = 1 | ||
[submodule "armeria"] | ||
path = tests/integration/armeria | ||
url = [email protected]:javamodules/armeria.git | ||
depth = 0 | ||
depth = 1 | ||
[submodule "bazel"] | ||
path = tests/integration/bazel | ||
url = [email protected]:bazelbuild/bazel.git | ||
depth = 0 | ||
depth = 1 | ||
[submodule "signal-server"] | ||
path = tests/integration/signal-server | ||
url = [email protected]:javamodules/Signal-Server.git | ||
depth = 0 | ||
depth = 1 | ||
[submodule "pkl"] | ||
path = tests/integration/pkl | ||
url = [email protected]:javamodules/pkl.git | ||
depth = 0 | ||
depth = 1 | ||
[submodule "checkstyle"] | ||
path = tests/integration/checkstyle | ||
url = [email protected]:javamodules/checkstyle.git | ||
depth = 0 | ||
depth = 1 | ||
[submodule "gson"] | ||
path = tests/integration/gson | ||
url = [email protected]:google/gson.git | ||
depth = 0 | ||
depth = 1 | ||
[submodule "geantyref"] | ||
path = io.leangen.geantyref | ||
url = [email protected]:leangen/geantyref.git | ||
depth = 0 | ||
depth = 1 | ||
[submodule "kotlinx-collections-immutable"] | ||
path = kotlinx.collections.immutable | ||
url = [email protected]:javamodules/kotlinx.collections.immutable.git | ||
depth = 0 | ||
depth = 1 | ||
[submodule "maven-resolver"] | ||
path = org.apache.maven.resolver | ||
url = [email protected]:javamodules/maven-resolver.git | ||
depth = 0 | ||
depth = 1 | ||
[submodule "caffeine"] | ||
path = tests/integration/caffeine | ||
url = [email protected]:ben-manes/caffeine.git | ||
depth = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml | ||
index 351c9b3..90957f4 100644 | ||
--- a/gradle/libs.versions.toml | ||
+++ b/gradle/libs.versions.toml | ||
@@ -33,7 +33,7 @@ findsecbugs = "1.13.0" | ||
flip-tables = "1.1.1" | ||
forbidden-apis = "3.8" | ||
google-java-format = "1.25.2" | ||
-guava = "33.4.0-jre" | ||
+guava = "33.4.0-jre-jpms" | ||
guice = "7.0.0" | ||
h2 = "2.3.232" | ||
hamcrest = "3.0" | ||
diff --git a/guava/build.gradle.kts b/guava/build.gradle.kts | ||
index 462d8f0..c6d46bf 100644 | ||
--- a/guava/build.gradle.kts | ||
+++ b/guava/build.gradle.kts | ||
@@ -29,6 +29,9 @@ tasks.named<JavaCompile>("compileTestJava").configure { | ||
} | ||
} | ||
|
||
+val absoluteJpmsRepoPath = | ||
+ rootProject.layout.projectDirectory.dir("../../../repository").asFile.absolutePath | ||
+ | ||
tasks.withType<Test>().configureEach { | ||
useJUnitPlatform() | ||
|
||
diff --git a/guava/src/test/java/com/github/benmanes/caffeine/guava/OSGiTest.java b/guava/src/test/java/com/github/benmanes/caffeine/guava/OSGiTest.java | ||
index f244daa..c7b1dfd 100644 | ||
--- a/guava/src/test/java/com/github/benmanes/caffeine/guava/OSGiTest.java | ||
+++ b/guava/src/test/java/com/github/benmanes/caffeine/guava/OSGiTest.java | ||
@@ -48,7 +48,7 @@ public final class OSGiTest { | ||
bundle("file:" + System.getProperty("caffeine.osgi.jar")), | ||
bundle("file:" + System.getProperty("caffeine-guava.osgi.jar")), | ||
mavenBundle("com.google.guava", "failureaccess", "1.0.1"), | ||
- mavenBundle("com.google.guava", "guava", System.getProperty("guava.osgi.version"))); | ||
+ mavenBundle("com.google.guava", "guava", System.getProperty("guava.osgi.version").replace("-jpms", ""))); | ||
} | ||
|
||
@Test | ||
diff --git a/settings.gradle.kts b/settings.gradle.kts | ||
index 1fc36e2..56f0c71 100644 | ||
--- a/settings.gradle.kts | ||
+++ b/settings.gradle.kts | ||
@@ -8,9 +8,13 @@ plugins { | ||
} | ||
|
||
dependencyResolutionManagement { | ||
- repositories { | ||
- mavenCentral() | ||
- } | ||
+ repositories { | ||
+ maven { | ||
+ name = "jpms-attic" | ||
+ url = uri("file:///${rootProject.projectDir}/../../../repository") | ||
+ } | ||
+ mavenCentral() | ||
+ } | ||
} | ||
|
||
apply(from = "$rootDir/gradle/develocity.gradle") |