From 76ff0bda513ba056da52014958188061be3fae26 Mon Sep 17 00:00:00 2001 From: James Roper Date: Wed, 21 Feb 2018 15:10:20 +1100 Subject: [PATCH] Publish with namespaced JDK9 module name (#547) Fixes #546. Adds Automatic-Module-Name: typesafe.config, rather than defaulting to the very generic module name of config that the JVM selects. --- build.sbt | 4 +++- project/plugins.sbt | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index dd5bb77f..c501afe4 100644 --- a/build.sbt +++ b/build.sbt @@ -48,7 +48,9 @@ lazy val configLib = Project("config", file("config")) osgiSettings, OsgiKeys.exportPackage := Seq("com.typesafe.config", "com.typesafe.config.impl"), publish := sys.error("use publishSigned instead of plain publish"), - publishLocal := sys.error("use publishLocalSigned instead of plain publishLocal") + publishLocal := sys.error("use publishLocalSigned instead of plain publishLocal"), + packageOptions in (Compile, packageBin) += + Package.ManifestAttributes("Automatic-Module-Name" -> "typesafe.config" ) ) .enablePlugins(SbtOsgi) .dependsOn(testLib % "test->test") diff --git a/project/plugins.sbt b/project/plugins.sbt index de21c2d7..75b78fbe 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,7 +1,7 @@ addSbtPlugin("de.johoop" % "findbugs4sbt" % "1.4.0") addSbtPlugin("de.johoop" % "jacoco4sbt" % "2.1.6") addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0") -addSbtPlugin("com.typesafe.sbt" % "sbt-osgi" % "0.8.0") +addSbtPlugin("com.typesafe.sbt" % "sbt-osgi" % "0.9.3") addSbtPlugin("com.typesafe.sbt" % "sbt-scalariform" % "1.2.1") addSbtPlugin("com.etsy" % "sbt-checkstyle-plugin" % "3.0.0")