- Notifications
You must be signed in to change notification settings - Fork0
JPMS libraries and repository
License
javamodules/attic
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Latest Release:
1.0.10
This repository provides sub-module library overrides for popular Java libraries which don't yet provide JPMS support(at least until some PRs are merged!). There is a Maven repository which contains these artifacts, too, so you cansafely use them in your projects.
Tracking issuehere provides the best tracker. Once these PRs are merged and changes are released, this repobecomes obsolete.
com.google.guava
:Google Guava is Google's core Java commons, used throughout Google's code and thewider JVM ecosystem. Guava is an immensely popular artifact, with tons of fantastic utilities. JPMS support isindraft.com.google.protobuf
:Protocol Buffers (a.k.a., protobuf) are Google's language-neutral,platform-neutral, extensible mechanism for serializing structured data. JPMS support isin draft.kotlinx.collections.immutable
:KotlinX Immutable Collections is a library provided as part of theKotlin Extensions suite, maintained by the JetBrains team. It provides immutable and persistent collection types inKotlin. JPMS support is indraft, but not yet merged or released.org.reactivestreams
:Reactive Streams is a universal JVM API for building reactive software in animplementation-agnostic manner.
See libraries which have been retired
- com.google.errorprone (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).com.google.j2objc (J2ObjC) is a Java to Objective-C cross-compiling layer used by Google to effectivelyshare Java logic on iOS and macOS platforms. J2ObjC itself is very complex and powerful, but here we have justJPMS-enabled the
annotations
module, which is used by Guava. ThePR enabling JPMS support for J2ObjCannotations has been filed, merged, and released as3.0.0
.io.leangen.geantyref (Geantyref) is a fork of the excellent GenTyRef library, adding support forworking with AnnotatedTypes introduced in Java 8 plus many nifty features. JPMS support has beenproposed, butnot yet merged or released.
org.apache.maven.resolver (Maven Resolver) is how Maven and many other build tools resolve graphs ofdependencies, and perform downloads of dependency artifacts. JPMS support is in early draft; no PR has been filed yet.
org.checkerframework (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 arecent PR, so this is sub-moduled atmaster
. At the time of this writing no release has taken place.
Add this domain as a repository within any JVM build tool:Maven,Gradle,Bazel,sbt. For example:
Note
Filing issues: Please file issues for this repo onelide-dev/jpms
.
In apom.xml
:
<repositories> <repository> <id>jpms-attic</id> <name>JPMS Attic</name> <url>https://jpms.pkg.st/repository</url> </repository></repositories>
In asettings.xml
:
<profiles> <profile> <id>jpms-attic</id> <activation> <activeByDefault>true</activeByDefault> </activation> <repositories> <repository> <id>pkgst-jpms</id> <name>Pkgst JPMS</name> <url>https://jpms.pkg.st/repository</url> </repository> </repositories> </profile></profiles>
repositories { maven { url"https://jpms.pkg.st/repository" }}
repositories { maven { url= uri("https://jpms.pkg.st/repository") }}
You should use a JPMS-enabled library version which has no conflict with Maven Central. Reference the table below topick a library.
Libraries markedCentral
have seen releases in Maven Central, and so are no longer needed through this repository.
Use the modules in yourmodule-info.java
:
Coordinate | Module |
---|---|
com.google.errorprone:error_prone_annotations | com.google.errorprone.annotations |
com.google.guava:guava | com.google.common |
com.google.j2objc:j2objc-annotations | com.google.j2objc.annotations |
com.google.protobuf:protobuf-java | com.google.protobuf |
com.google.protobuf:protobuf-javalite | com.google.protobuf |
com.google.protobuf:protobuf-util | com.google.protobuf.util |
com.google.protobuf:protobuf-kotlin | com.google.protobuf.kotlin |
com.google.protobuf:protobuf-kotlin-lite | com.google.protobuf.kotlin |
io.leangen.geantyref:geantyref | io.leangen.geantyref |
org.jetbrains.kotlinx:kotlinx-collections-immutable | kotlinx.collections.immutable |
org.reactivestreams:reactive-streams | org.reactivestreams |
By and large, where a module already had an
Automatic-Module-Name
, it has been preserved.
This repository additionally providesMaven BOM,Gradle Version Catalog, andGradle Platformartifacts. These simplify and enforce the use of the right library versions. See below for use.
Type | Coordinate | Version |
---|---|---|
Maven BOM | dev.javamodules:jpms-bom | |
Gradle Catalog | dev.javamodules:jpms-catalog | |
Gradle Platform | dev.javamodules:jpms-platform |
To use the version catalog from Gradle, follow the setup steps below. These code samples are provided in Kotlin:
settings.gradle.kts
:
dependencyResolutionManagement { repositories { mavenCentral() maven { name="jpms-attic" url= uri("https://jpms.pkg.st/repository") } } versionCatalogs { create("attic") { from("dev.javamodules:jpms-catalog:1.0.10") } }}
build.gradle.kts
:
dependencies { api(attic.guava)}
To use the Gradle Platform to constrain your versions, map the repository as usual, then:
dependencies { api(platform("dev.javamodules:jpms-platform:1.0.10"))}
The Version Catalog also provides a mapping:
dependencies { api(platform(attic.javamodules.platform))}
This repo does not currently publish source or javadoc JARs. It's not that it couldn't, it's just that mountingclassifier-equipped JARs in local repositories is annoying.
Sample projects are provided in thesamples directory, which show how to hook up the repository andoverride libraries.
JPMS-patched modules are tested against some popular downstream projects, to make sure there is no unexpected breakage. Here is a matrix of tested projects:
JPMS Module | Status | Tested Project(s) |
---|---|---|
Guava | ✅ Passing | Caffeine,GSON |
Protobuf | GSON,Bazel |
Future badges
This repo is open source, licensed underApache 2.0. The libraries listed in this repo may have theirown licenses; it is up to you to comply with these. These libraries are only published here for the purpose of earlytesting and development against new code; no warranty is provided of any kind.
About
JPMS libraries and repository
Topics
Resources
License
Code of conduct
Security policy
Stars
Watchers
Forks
Languages
- XML50.7%
- TypeScript26.1%
- JSON18.8%
- Makefile2.6%
- Kotlin0.7%
- JavaScript0.5%
- Other0.6%