-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.sbt
61 lines (56 loc) · 1.91 KB
/
build.sbt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
ThisBuild / turbo := true
lazy val root = project
.in(file("."))
.settings(commonSettings)
.settings(
name := "scala-rust-interop",
publish / skip := true,
)
.aggregate(
core,
native,
)
lazy val native = project
.in(file("native"))
.settings(commonSettings)
.settings(
name := "scala-rust-interop-native",
nativeCompile / sourceDirectory := baseDirectory.value,
)
.enablePlugins(JniNative)
lazy val core = project
.in(file("core"))
.settings(commonSettings)
.settings(
name := "scala-rust-interop-core",
Compile / mainClass := Some("com.github.sideeffffect.scalarustinterop.Main"),
libraryDependencies ++= List(
Dependencies.zio,
// Test
Dependencies.zioTest % Test,
Dependencies.zioTestSbt % Test,
),
sbtJniCoreScope := Compile, // because we use `NativeLoader`, not the `@nativeLoader` macro
classLoaderLayeringStrategy := ClassLoaderLayeringStrategy.Flat, // because of `turbo := true`, otherwise `java.lang.UnsatisfiedLinkError: com.github.sideeffffect.scalarustinterop.Divider.divideBy(I)I`
)
.dependsOn(native % Runtime)
lazy val commonSettings: List[Def.Setting[_]] = DecentScala.decentScalaSettings ++ List(
organization := "com.github.sideeffffect",
homepage := Some(url("https://github.com/sideeffffect/scala-rust-interop")),
licenses := List("GPLv3" -> url("https://www.gnu.org/licenses/gpl-3.0.en.html")),
developers := List(
Developer(
"sideeffffect",
"Ondra Pelech",
url("https://github.com/sideeffffect"),
),
),
scalaVersion := crossScalaVersions.value.head,
crossScalaVersions := List(DecentScala.decentScalaVersion213, DecentScala.decentScalaVersion212),
testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework"),
missinglinkExcludedDependencies ++= List(
),
mimaReportBinaryIssues := {},
)
addCommandAlias("ci", "; check; +publishLocal")