From 791cb363b77332e3abdf4039102dfcdb863ce6c3 Mon Sep 17 00:00:00 2001 From: Jakob Odersky Date: Mon, 2 May 2016 05:19:07 -0700 Subject: Use macro annotation to load native library This also removes the need for third projects to depend on a "loader library". --- plugin/src/sbt-test/sbt-jni/simple/build.sbt | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 plugin/src/sbt-test/sbt-jni/simple/build.sbt (limited to 'plugin/src/sbt-test/sbt-jni/simple/build.sbt') diff --git a/plugin/src/sbt-test/sbt-jni/simple/build.sbt b/plugin/src/sbt-test/sbt-jni/simple/build.sbt new file mode 100644 index 0000000..e324d5a --- /dev/null +++ b/plugin/src/sbt-test/sbt-jni/simple/build.sbt @@ -0,0 +1,12 @@ +ivyLoggingLevel := UpdateLogging.Quiet + +lazy val root = (project in file(".")). + aggregate(core, native) + +lazy val core = (project in file("core")). + settings(target in javah := (sourceDirectory in nativeCompile in native).value / "include"). + dependsOn(native % Runtime) + +lazy val native = (project in file("native")). + settings(sourceDirectory in nativeCompile := sourceDirectory.value). + enablePlugins(JniNative) -- cgit v1.2.3