Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

JPMS libraries and repository

License

NotificationsYou must be signed in to change notification settings

javamodules/attic

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Java Modules


Modular JavaKotlinBazelGradleMaven

Build statusApache 2.0 License


JPMS Attic Repository

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.

Pending PRs

Tracking issuehere provides the best tracker. Once these PRs are merged and changes are released, this repobecomes obsolete.

What's in the box?

  • 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 theannotations 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. Thechecker-qualpackage 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.

How do I use it?

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.

Maven

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>

Gradle

Groovy
repositories {    maven {        url"https://jpms.pkg.st/repository"    }}
Kotlin
repositories {    maven {        url= uri("https://jpms.pkg.st/repository")    }}

Libraries

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.

CoordinateVersion
com.google.errorprone:error_prone_annotationsCentral
com.google.guava:guavaJPMS
com.google.j2objc:j2objc-annotationsCentral
com.google.protobuf:protobuf-javaJPMS
com.google.protobuf:protobuf-javaliteJPMS
com.google.protobuf:protobuf-utilJPMS
com.google.protobuf:protobuf-kotlinJPMS
com.google.protobuf:protobuf-kotlin-liteJPMS
io.leangen.geantyref:geantyrefCentral
org.apache.maven.resolver:maven-resolver-utilJPMS
org.jetbrains.kotlinx:kotlinx-collections-immutableJPMS
org.reactivestreams:reactive-streamsJPMS

Using the modules

Use the modules in yourmodule-info.java:

CoordinateModule
com.google.errorprone:error_prone_annotationscom.google.errorprone.annotations
com.google.guava:guavacom.google.common
com.google.j2objc:j2objc-annotationscom.google.j2objc.annotations
com.google.protobuf:protobuf-javacom.google.protobuf
com.google.protobuf:protobuf-javalitecom.google.protobuf
com.google.protobuf:protobuf-utilcom.google.protobuf.util
com.google.protobuf:protobuf-kotlincom.google.protobuf.kotlin
com.google.protobuf:protobuf-kotlin-litecom.google.protobuf.kotlin
io.leangen.geantyref:geantyrefio.leangen.geantyref
org.jetbrains.kotlinx:kotlinx-collections-immutablekotlinx.collections.immutable
org.reactivestreams:reactive-streamsorg.reactivestreams

By and large, where a module already had anAutomatic-Module-Name, it has been preserved.

BOMs & Catalogs

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.

TypeCoordinateVersion
Maven BOMdev.javamodules:jpms-bomJPMS
Gradle Catalogdev.javamodules:jpms-catalogJPMS
Gradle Platformdev.javamodules:jpms-platformJPMS

Using the Version Catalog

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)}

Using the Gradle Platform

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))}

Limitations

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

Sample projects are provided in thesamples directory, which show how to hook up the repository andoverride libraries.

Integration Testing

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 ModuleStatusTested Project(s)
Guava✅ PassingCaffeine,GSON
Protobuf⚠️ IssuesGSON,Bazel

Coming soon

Future badges

SLSASPDX

Licensing

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.

Packages

 
 
 

Languages

  • XML50.7%
  • TypeScript26.1%
  • JSON18.8%
  • Makefile2.6%
  • Kotlin0.7%
  • JavaScript0.5%
  • Other0.6%

[8]ページ先頭

©2009-2025 Movatter.jp