Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
include:
- os: macos-latest
arch: arm64
java: [11]
java: [17]
distribution: [temurin]
pdal: [2.10.2]
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -86,7 +86,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
java: [11]
java: [17]
distribution: [temurin]
pdal: [2.10.2]
runs-on: ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ If you would like to use your own bindings, it is necessary to set `java.library

```scala
// macOS X example with manual JNI installation
// cp -f native/target/resource_managed/main/native/arm64-darwin/libpdaljni.2.10.dylib /usr/local/lib/libpdaljni.2.10.dylib
// cp -f target/out/jvm/u/pdal-native/resource_managed/main/native/arm64-darwin/libpdaljni.2.10.dylib /usr/local/lib/libpdaljni.2.10.dylib
// place built binary into /usr/local/lib, and pass java.library.path to your JVM
javaOptions += "-Djava.library.path=/usr/local/lib"
```
Expand Down
34 changes: 18 additions & 16 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
name := "pdal-jni"

val scala212 = "2.12.20"
val scala213 = "2.13.16"
val scala3 = "3.7.1"
val scalaVersions = Seq(scala3, scala213, scala212)
val scala212 = "2.12.21"
val scala213 = "2.13.18"
val scala3 = "3.9.0"
val scalaVersions = Seq(scala213, scala3, scala212)

lazy val commonSettings = Seq(
scalaVersion := scalaVersions.head,
crossScalaVersions := scalaVersions,
organization := "io.pdal",
description := "PDAL JNI bindings",
licenses := Seq("BSD" -> url("https://github.com/PDAL/PDAL/blob/master/LICENSE.txt")),
homepage := Some(url("https://www.pdal.io")),
licenses := Seq("BSD" -> uri("https://github.com/PDAL/PDAL/blob/master/LICENSE.txt")),
homepage := Some(uri("https://www.pdal.io")),
versionScheme := Some("semver-spec"),
scalacOptions ++= Seq(
"-deprecation",
Expand All @@ -31,13 +31,13 @@ lazy val commonSettings = Seq(
"pomadchin",
"Grigory Pomadchin",
"@pomadchin",
url("https://github.com/pomadchin")
uri("https://github.com/pomadchin")
)
)
)

lazy val root = (project in file("."))
.settings(commonSettings: _*)
.settings(commonSettings*)
.settings(
scalaVersion := scalaVersions.head,
crossScalaVersions := Nil,
Expand All @@ -47,7 +47,7 @@ lazy val root = (project in file("."))
.aggregate(`core-scala`, core, native)

lazy val `core-scala` = project
.settings(commonSettings: _*)
.settings(commonSettings*)
.settings(Dependencies.macroSettings)
.settings(Dependencies.licenseSettings)
.settings(scalaVersion := scala213, crossScalaVersions := Seq(scala213, scala212))
Expand All @@ -64,10 +64,10 @@ lazy val `core-scala` = project
)
)
.dependsOn(core)
.dependsOn(Environment.dependOnNative(native % Runtime): _*)
.dependsOn(Environment.dependOnNative(native % Runtime)*)

lazy val core = project
.settings(commonSettings: _*)
.settings(commonSettings*)
.settings(name := "pdal")
.settings(javah / target := (native / nativeCompile / sourceDirectory).value / "include")
.settings(sbtJniCoreScope := Compile)
Expand All @@ -77,18 +77,20 @@ lazy val core = project
Dependencies.circe("parser") % Test
)
)
.dependsOn(Environment.dependOnNative(native % Runtime): _*)
.dependsOn(Environment.dependOnNative(native % Runtime)*)

lazy val native = project
.settings(commonSettings: _*)
.settings(commonSettings*)
.settings(crossPaths := false)
.settings(name := "pdal-native")
.settings(nativeCompile / sourceDirectory := sourceDirectory.value)
// keep native binaries at native/target/native/<platform> (sbt 2 moved target under target/out)
.settings(nativeCompile / target := baseDirectory.value / "target" / "native" / nativePlatform.value)
.settings(
Compile / unmanagedPlatformDependentNativeDirectories := Seq(
"x86_64-linux" -> target.value / "native/x86_64-linux/bin/",
"x86_64-darwin" -> target.value / "native/x86_64-darwin/bin/",
"arm64-darwin" -> target.value / "native/arm64-darwin/bin/"
"x86_64-linux" -> baseDirectory.value / "target/native/x86_64-linux/bin/",
"x86_64-darwin" -> baseDirectory.value / "target/native/x86_64-darwin/bin/",
"arm64-darwin" -> baseDirectory.value / "target/native/arm64-darwin/bin/"
)
)
.settings(artifactName := { (sv: ScalaVersion, module: ModuleID, artifact: Artifact) =>
Expand Down
8 changes: 4 additions & 4 deletions examples/pdal-jni/build.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
val scala212 = "2.12.20"
val scala213 = "2.13.16"
val scala3 = "3.7.1"
val scala212 = "2.12.21"
val scala213 = "2.13.18"
val scala3 = "3.9.0"
val scalaVersions = Seq(scala3, scala213, scala212)

name := "pdal-jni"
Expand Down Expand Up @@ -29,5 +29,5 @@ libraryDependencies ++= Seq(
"io.pdal" %% "pdal" % pdalVersion,
"io.pdal" %% "pdal-scala" % pdalVersion,
"io.pdal" % "pdal-native" % pdalVersion,
"org.scalatest" %% "scalatest" % "3.2.19" % Test
"org.scalatest" %% "scalatest" % "3.2.20" % Test
)
2 changes: 1 addition & 1 deletion examples/pdal-jni/project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.11.2
sbt.version=2.0.11
2 changes: 1 addition & 1 deletion examples/pdal-jni/project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.6.4")
addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.7.1")
12 changes: 6 additions & 6 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import sbt._
import sbt.Keys._

import de.heikoseeberger.sbtheader.{CommentStyle, FileType}
import de.heikoseeberger.sbtheader.HeaderPlugin.autoImport.{headerLicense, headerMappings, HeaderLicense}
import sbtheader.{CommentStyle, FileType}
import sbtheader.HeaderPlugin.autoImport.{headerLicense, headerMappings, HeaderLicense}

object Version {
val jts = "1.20.0"
val scalaTest = "3.2.19"
val circe = "0.14.14"
val scalaTest = "3.2.20"
val circe = "0.14.17"
val circeExtras = "0.14.4"
}

Expand All @@ -18,7 +18,7 @@ object Dependencies {
case _ => false
}

lazy val macroSettings: Seq[Setting[_]] = Seq(
lazy val macroSettings: Seq[Setting[?]] = Seq(
libraryDependencies ++= (
if (priorTo213(scalaVersion.value))
Seq(compilerPlugin(("org.scalamacros" %% "paradise" % "2.1.1").cross(CrossVersion.full)))
Expand All @@ -27,7 +27,7 @@ object Dependencies {
scalacOptions ++= (if (priorTo213(scalaVersion.value)) Nil else Seq("-Ymacro-annotations"))
)

lazy val licenseSettings: Seq[Setting[_]] = Seq(
lazy val licenseSettings: Seq[Setting[?]] = Seq(
headerLicense := Some(HeaderLicense.ALv2(java.time.Year.now.getValue.toString, "Azavea")),
headerMappings := Map(
FileType.scala -> CommentStyle.cStyleBlockComment.copy(
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.11.2
sbt.version=2.0.11
10 changes: 5 additions & 5 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
addSbtPlugin("com.github.sbt" % "sbt-jni" % "1.7.0")
addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.6.4")
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.10.0")
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.11.1")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2")
addSbtPlugin("com.github.sbt" % "sbt-jni" % "1.8.0")
addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.7.1")
addSbtPlugin("com.github.sbt" % "sbt-header" % "5.11.0")
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.12.1")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.6.2")
Loading