Skip to content

Commit 59d876f

Browse files
authored
feat: add io.leangen.geantyref (#30)
Adds the `io.leangen.geantyref` project to the repository, after applying PR leangen/geantyref#29 Relates-To: leangen/geantyref#29 Signed-off-by: Sam Gammon <sam@elide.ventures>
1 parent e8b8781 commit 59d876f

File tree

84 files changed

+343
-128
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+343
-128
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,6 @@
4646
[submodule "gson"]
4747
path = tests/integration/gson
4848
url = git@github.com:google/gson.git
49+
[submodule "geantyref"]
50+
path = io.leangen.geantyref
51+
url = git@github.com:javamodules/geantyref.git

Makefile

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,14 @@ export GUAVA_VERSION ?= 1.0-HEAD-jre-SNAPSHOT
1818
export GUAVA_FAILUREACCESS_VERSION ?= 1.0.3-jpms
1919
export REACTIVE_STREAMS_VERSION ?= 1.0.5-SNAPSHOT
2020
export PROTOBUF_VERSION ?= 4.27.0-SNAPSHOT
21+
export GEANTYREF_VERSION ?= 1.3.16-SNAPSHOT
2122
else
2223
export CHECKER_FRAMEWORK_VERSION ?= 3.43.0-SNAPSHOT
2324
export GUAVA_VERSION ?= 33.0.0-jre-jpms
2425
export GUAVA_FAILUREACCESS_VERSION ?= 1.0.3-jpms
2526
export REACTIVE_STREAMS_VERSION ?= 1.0.5-jpms
2627
export PROTOBUF_VERSION ?= 4.26.0-jpms
28+
export GEANTYREF_VERSION ?= 1.3.15-jpms
2729
endif
2830

2931
export PROJECT ?= $(shell pwd)
@@ -32,7 +34,7 @@ export DEV_BIN ?= $(DEV_ROOT)/bin
3234
export LIBS ?= $(PROJECT)/libs
3335
export PROJECT_PATH ?= $(DEV_BIN):$(shell echo $$PATH)
3436

35-
DEPS ?= com.google.guava com.google.errorprone com.google.j2objc org.checkerframework org.reactivestreams com.google.protobuf
37+
DEPS ?= com.google.guava com.google.errorprone com.google.j2objc org.checkerframework org.reactivestreams com.google.protobuf io.leangen.geantyref
3638
POSIX_FLAGS ?=
3739

3840
ifeq ($(VERBOSE),yes)
@@ -391,6 +393,31 @@ endif
391393

392394
@echo "Protobuf ready."
393395

396+
#
397+
# Library: Checker Framework ---------------------------------------------------------------
398+
399+
geantyref: io.leangen.geantyref ## Build Geantyref reflection library.
400+
io.leangen.geantyref: $(BUILD_DEPS) io.leangen.geantyref/target
401+
io.leangen.geantyref/target:
402+
$(info Building Geantyref...)
403+
$(RULE)cd io.leangen.geantyref \
404+
&& $(MAVEN) versions:set -DnewVersion=$(GEANTYREF_VERSION) \
405+
&& $(MAVEN) versions:update-child-modules \
406+
&& $(MAVEN) $(MAVEN_GOAL) -U
407+
408+
ifeq ($(SNAPSHOT),no)
409+
@# geantyref
410+
$(RULE)$(MAVEN) deploy:deploy-file \
411+
-DgroupId=io.leangen.geantyref \
412+
-DartifactId=geantyref \
413+
-Dversion=$(GEANTYREF_VERSION) \
414+
-Dpackaging=jar \
415+
-DpomFile=./tools/poms/geantyref.xml \
416+
-Dfile=./io.leangen.geantyref/target/geantyref-$(GEANTYREF_VERSION).jar \
417+
-DrepositoryId=jpms-local \
418+
-Durl="$(REPOSITORY)"
419+
endif
420+
394421
#
395422
# Testing: Google GSON ---------------------------------------------------------------------
396423

@@ -451,10 +478,11 @@ $(LIBS):
451478
$(RULE)$(CP) \
452479
com.google.errorprone/annotations/target/*.jar \
453480
com.google.j2objc/annotations/target/*.jar \
454-
org.checkerframework/checker-qual/build/libs/*.jar \
455-
org.reactivestreams/api/build/libs/*.jar \
456481
com.google.guava/guava/target/*.jar \
457482
com.google.protobuf/bazel-bin/java/*/amended_*_mvn-project.jar \
483+
io.leangen.geantyref/target/*.jar \
484+
org.checkerframework/checker-qual/build/libs/*.jar \
485+
org.reactivestreams/api/build/libs/*.jar \
458486
$(LIBS)
459487

460488
prebuilts:
@@ -475,6 +503,7 @@ git-add:
475503
repository/com/google/j2objc \
476504
repository/com/google/errorprone \
477505
repository/com/google/protobuf \
506+
repository/io/leangen/geantyref \
478507
repository/org/checkerframework \
479508
repository/org/reactivestreams \
480509
repository/dev/javamodules
@@ -491,6 +520,7 @@ clean: ## Clean all built targets.
491520
org.checkerframework/build \
492521
org.checkerframework/*/build \
493522
org.reactivestreams/*/build \
523+
io.leangen.geantyref/target \
494524
samples/gradle-platform/app/build \
495525
samples/modular-guava/app/build \
496526
samples/modular-guava-repo/app/build \

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ This repository provides sub-module library overrides for popular Java libraries
1313

1414
Tracking issue [here][6] provides the best tracker. Once these PRs are merged and changes are released, this repo becomes obsolete.
1515

16-
- google/j2objc#2302 feat: support jpms in annotations module
17-
- google/error-prone#4311 feat: add jpms definition for annotations
18-
- typetools/checker-framework#6326 Add module-info.java to checker-qual
19-
2016
### What's in the box?
2117

2218
- **[`com.google.errorprone`][2]:** **Error Prone Compiler** "is a static analysis tool for Java that catches common programming mistakes at compile time," built by Google. Error Prone's annotations module is JPMS-enabled at the embedded sub-module, and is used by Guava. The [PR enabling JPMS support in Error Prone Annotations][3] has been filed, merged, and released, as [`2.26.1`](https://github.com/google/error-prone/releases/tag/v2.26.1).
@@ -28,6 +24,8 @@ Tracking issue [here][6] provides the best tracker. Once these PRs are merged an
2824

2925
- **[`com.google.protobuf`][4]:** **Protocol Buffers** (a.k.a., protobuf) are Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data. = JPMS support is [in draft][17].
3026

27+
- **[`io.leangen.geantyref`][18]:** **Geantyref** is a fork of the excellent GenTyRef library, adding support for working with AnnotatedTypes introduced in Java 8 plus many nifty features.
28+
3129
- **[`org.checkerframework`][0]:** **Checker Framework** is a type-checking framework for Java. The `checker-qual` package is used by Guava, so it is included here transitively. Checker Framework added a JPMS module definition in a [recent PR][1], so this is sub-moduled at `master`. At the time of this writing no release has taken place.
3230

3331
- **[`org.reactivestreams`][16]:** **Reactive Streams** is a universal JVM API for building reactive software in an implementation-agnostic manner.
@@ -90,6 +88,7 @@ You should use a JPMS-enabled library version which has no conflict with Maven C
9088
| `com.google.protobuf:protobuf-util` | `4.26.0-jpms` | 🔄 |
9189
| `com.google.protobuf:protobuf-kotlin` | `4.26.0-jpms` | 🔄 |
9290
| `com.google.protobuf:protobuf-kotlin-lite` | `4.26.0-jpms` | 🔄 |
91+
| `io.leangen.geantyref:geantyref` | `1.3.15-jpms` | 🔄 |
9392
| `org.checkerframework:checker-qual` | `3.43.0-SNAPSHOT` | 🔄 |
9493
| `org.reactivestreams:reactive-streams` | `1.0.5-jpms` ||
9594

@@ -107,6 +106,7 @@ Use the modules in your `module-info.java`:
107106
| `com.google.protobuf:protobuf-util` | `com.google.protobuf.util` |
108107
| `com.google.protobuf:protobuf-kotlin` | `com.google.protobuf.kotlin` |
109108
| `com.google.protobuf:protobuf-kotlin-lite` | `com.google.protobuf.kotlin` |
109+
| `io.leangen.geantyref:geantyref` | `io.leangen.geantyref` |
110110
| `org.checkerframework:checker-qual` | `org.checkerframework.checker.qual` |
111111
| `org.reactivestreams:reactive-streams` | `org.reactivestreams` |
112112

@@ -201,3 +201,4 @@ This repo is open source, licensed under [Apache 2.0](./LICENSE.txt). The librar
201201
[15]: https://docs.gradle.org/current/userguide/dependency_version_alignment.html
202202
[16]: https://github.com/reactive-streams/reactive-streams-jvm
203203
[17]: https://github.com/protocolbuffers/protobuf/pull/16178
204+
[18]: https://github.com/leangen/geantyref

io.leangen.geantyref

Submodule io.leangen.geantyref added at a794da7

repository/dev/javamodules/jpms-bom/1.0.0/jpms-bom-1.0.0.pom

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,5 +81,10 @@
8181
<artifactId>reactive-streams</artifactId>
8282
<version>1.0.5-jpms</version>
8383
</dependency>
84+
<dependency>
85+
<groupId>io.leangen.geantyref</groupId>
86+
<artifactId>geantyref</artifactId>
87+
<version>1.3.15-jpms</version>
88+
</dependency>
8489
</dependencies>
8590
</project>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8c220102c5f63a54732ef11d5ff62415
1+
456d809dae269f97f30aa62b47bd5afb
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
f5de31902ee89054f58a403d72415da49c1bfbf7
1+
1489c86ff9b71216b52216c29506cd886fce23af

repository/dev/javamodules/jpms-bom/maven-metadata.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
<versions>
88
<version>1.0.0</version>
99
</versions>
10-
<lastUpdated>20240315032701</lastUpdated>
10+
<lastUpdated>20240316002757</lastUpdated>
1111
</versioning>
1212
</metadata>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ccf62ac077348f68ff63f02474563db4
1+
98af946caf493cafbfc67c6116030d2d
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
b0c670b72e9c5dc87d3f48fbcfd4cf5b22d2686e
1+
a15b404af68e2a7b71b07b7a8afb136800064713

0 commit comments

Comments
 (0)