scalanative-java-time
is a BSD-licensed reimplementation of the java.time
API
of JDK8 for Scala native. It enables this API in Scalanative projects.
Simply add the following line to your sbt settings:
nativeLinkStubs := true
libraryDependencies += "org.akka-js" %%% "scalanative-java-time" % "0.0.2"
If you have a crossProject
, the setting must be used only in the Native part:
lazy val myCross = crossProject
...
.nativeSettings(
nativeLinkStubs := true,
libraryDependencies += "org.akka-js" %%% "scalanative-java-time" % "0.0.2"
)
Requirement: you must use a host JDK8 to build your project, i.e., to
launch sbt. scalanative-java-time
does not work on earlier JDKs.
This library is a work in progress. There are still many classes and methods that have not been implemented yet. If you use any of those, you will get linking errors.
Feel free to contribute to extend the set of supported classes and methods!
This library is a direct port of scalajs-java-time for Scala.js to Scala native, special thanks to the original creators and contributors.
scalanative-java-time
is distributed under the
BSD 3-Clause license.
Follow the contributing guide.