arrow
arrow copied to clipboard
Support the Java platform module system
As the title suggests, Arrow does not support the Java module system. One workaround is to manually patch in arrow as a module, eg:
// build.gradle.kts
tasks.compileJava {
doFirst {
val arrowVersion = "1.12.2"
options.compilerArgs.addAll(
listOf(
"--module-path", classpath.asPath,
"--add-modules", "arrow.core.jvm",
"--patch-module", "arrow.core.jvm=arrow-core-jvm-$arrowVersion.jar"
)
)
classpath = files()
}
}
Possible solutions could be:
- Declare an automatic module name in the Arrow manifest
- Turn the JVM build into a multi-release jar with a module-info
Thanks!
For the record, this PR adds support for JPMS for kotlinx.serialization. @durganmcbroom do you think this is a plausible solution for Arrow?
This is the same issue as #2553
The solution discussed in the PR you mentioned looks great!