1
1
import Settings ._
2
2
import Keys .{`package` => packageTask }
3
+ import com .typesafe .sbt .osgi .{OsgiKeys , SbtOsgi }
3
4
4
5
// plugin logic of build based on https://github.com/retronym/boxer
5
6
@@ -13,15 +14,16 @@ lazy val commonSettings = scalaModuleSettings ++ Seq(
13
14
14
15
lazy val root = project.in( file(" ." ) ).settings( publishArtifact := false ).aggregate(plugin, library).settings(commonSettings : _* )
15
16
16
- lazy val plugin = project settings (
17
- name := " scala-continuations-plugin" ,
18
- libraryDependencies += " org.scala-lang" % " scala-compiler" % scalaVersion.value
17
+ lazy val plugin = project settings (SbtOsgi .osgiSettings: _* ) settings (
18
+ name := " scala-continuations-plugin" ,
19
+ libraryDependencies += " org.scala-lang" % " scala-compiler" % scalaVersion.value,
20
+ OsgiKeys .exportPackage := Seq (s " scala.tools.selectivecps;version= ${version.value}" )
19
21
) settings (commonSettings : _* )
20
22
21
23
val pluginJar = packageTask in (plugin, Compile )
22
24
23
25
// TODO: the library project's test are really plugin tests, but we first need that jar
24
- lazy val library = project settings (
26
+ lazy val library = project settings (SbtOsgi .osgiSettings : _* ) settings (
25
27
name := " scala-continuations-library" ,
26
28
scalacOptions ++= Seq (
27
29
// add the plugin to the compiler
@@ -38,5 +40,6 @@ lazy val library = project settings (
38
40
testOptions += Tests .Argument (
39
41
TestFrameworks .JUnit ,
40
42
s " -Dscala-continuations-plugin.jar= ${pluginJar.value.getAbsolutePath}"
41
- )
43
+ ),
44
+ OsgiKeys .exportPackage := Seq (s " scala.util.continuations;version= ${version.value}" )
42
45
) settings (commonSettings : _* )
0 commit comments