From fd48f87b755d5ac932cd3cd6f5597ef7c8278cc5 Mon Sep 17 00:00:00 2001 From: Seth Tisue Date: Sun, 22 Dec 2019 13:07:36 -0700 Subject: [PATCH] fix bad artifacts by disabling OSGi support fixes #51 --- build.sbt | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/build.sbt b/build.sbt index 637efbc..dab1f19 100644 --- a/build.sbt +++ b/build.sbt @@ -9,7 +9,15 @@ lazy val collectionContrib = crossProject(JVMPlatform, JSPlatform) .crossType(CrossType.Pure) .in(file(".")) .settings(ScalaModulePlugin.scalaModuleSettings) - .jvmSettings(ScalaModulePlugin.scalaModuleSettingsJVM) + // as per #71, we are not currently attempting to support OSGi in this repo + .disablePlugins(SbtOsgi) + // disabling the plugin isn't sufficient; we also must refrain from letting sbt-scala-module put + // OSGi stuff in our settings. normally a module build would include the following commented-out + // line. at present (sbt-scala-module 2.1.3), scalaModuleSettingsJVM contains *only* OSGi stuff, + // so the easiest thing is just to omit it. this isn't future-proof; some future sbt-scala-module + // might put additional stuff in scalaModuleSettingsJVM. it would be nice if sbt-scala-module + // provided a setting key to selectively disable OSGi. + // .jvmSettings(ScalaModulePlugin.scalaModuleSettingsJVM) .settings( name := "scala-collection-contrib", scalacOptions ++= Seq("-opt-warnings", "-language:higherKinds", "-deprecation", "-feature", "-Xfatal-warnings"), @@ -25,10 +33,7 @@ lazy val collectionContrib = crossProject(JVMPlatform, JSPlatform) useCoursier := false ) .jvmSettings( - scalaModuleMimaPreviousVersion := Some("0.1.0"), // why only in jvmSettings? - // TODO: osgi settings; not trivial because of split packages. - // See https://github.com/scala/scala-collection-compat/pull/226 - // OsgiKeys.exportPackage := Seq(s"scala.collection.*;version=${version.value}"), + scalaModuleMimaPreviousVersion := Some("0.1.0") ) .jsConfigure(_.enablePlugins(ScalaJSJUnitPlugin)) .jsSettings(