Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No longer bundle as OSGi #99

Merged
merged 1 commit into from
Apr 22, 2020
Merged
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
23 changes: 1 addition & 22 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,11 @@ lazy val commonSettings: Seq[Setting[_]] = Seq()

commonSettings // in root

/** Create an OSGi version range for standard Scala / Lightbend versioning
* schemes that describes binary compatible versions. */
def osgiVersionRange(version: String): String =
if(version contains '-') "${@}" // M, RC or SNAPSHOT -> exact version
else "${range;[==,=+)}" // Any binary compatible version

/** Create an OSGi Import-Package version specification. */
def osgiImport(pattern: String, version: String): String =
pattern + ";version=\"" + osgiVersionRange(version) + "\""

lazy val core = project.in(file("core"))
.settings(ScalaModulePlugin.scalaModuleSettings)
.settings(ScalaModulePlugin.scalaModuleOsgiSettings)
.settings(commonSettings)
.settings(
name := "scala-parallel-collections",
OsgiKeys.exportPackage := Seq(
s"scala.collection.parallel.*;version=${version.value}",
// The first entry on the classpath is the project's target classes dir but sbt-osgi also passes all
// dependencies to bnd. Any "merge" strategy for split packages would include the classes from scala-library.
s"scala.collection;version=${version.value};-split-package:=first",
s"scala.collection.generic;version=${version.value};-split-package:=first"
),
// Use correct version for scala package imports
OsgiKeys.importPackage := Seq(osgiImport("scala*", scalaVersion.value), "*"),
scalaModuleMimaPreviousVersion := None
name := "scala-parallel-collections"
)

lazy val junit = project.in(file("junit"))
Expand Down