Skip to content

Commit 8edcee6

Browse files
committed
Update to latest assembly and gpg plugins
Disable Pgp plugin for projects with the noPublishing setting
1 parent 670f2b9 commit 8edcee6

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

project/Publish.scala

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
import java.io.FileInputStream
1818
import java.util.Properties
1919

20-
import com.typesafe.sbt.SbtPgp
21-
import com.typesafe.sbt.pgp.PgpKeys
20+
import com.typesafe.sbt.pgp.{PgpKeys, PgpSettings}
2221
import sbt.Keys._
2322
import sbt._
2423
import sbtassembly.AssemblyPlugin.autoImport._
@@ -39,10 +38,9 @@ object Publish {
3938
val props = new Properties
4039
val input = new FileInputStream(propFile)
4140
try props.load(input) finally input.close()
42-
43-
mavenSettings ++ SbtPgp.settings ++ Seq(
44-
SbtPgp.pgpPassphrase := Some(props.getProperty(keyPassword).toArray),
45-
SbtPgp.pgpSecretRing := file(props.getProperty(secretKeyRing)),
41+
mavenSettings ++ Seq(
42+
PgpSettings.pgpPassphrase := Some(props.getProperty(keyPassword).toArray),
43+
PgpSettings.pgpSecretRing := file(props.getProperty(secretKeyRing)),
4644
credentials += Credentials(
4745
"Sonatype Nexus Repository Manager",
4846
"oss.sonatype.org",
@@ -55,12 +53,13 @@ object Publish {
5553

5654
lazy val publishAssemblySettings = Seq(
5755
assemblyJarName in assembly := "mongo-scala-driver-alldep.jar",
56+
assemblyOption in assembly := (assemblyOption in assembly).value.copy(includeScala = false),
5857
test in assembly := {},
5958
artifact in (Compile, assembly) := {
6059
val art = (artifact in (Compile, assembly)).value
6160
art.copy(`classifier` = Some("alldep"))
6261
}
63-
) ++ addArtifact(artifact in (Compile, assembly), assembly)
62+
) ++ addArtifact(artifact in (Compile, assembly), assembly).settings
6463

6564
lazy val mavenSettings = Seq(
6665
publishTo := {
@@ -100,7 +99,8 @@ object Publish {
10099
publish :=(),
101100
publishLocal :=(),
102101
publishTo := None,
103-
publishSnapshot := None
102+
publishSnapshot := None,
103+
PgpKeys.publishSigned := ()
104104
)
105105

106106
lazy val publishSnapshot: TaskKey[Unit] = TaskKey[Unit]("publish-snapshot", "publishes a snapshot")

project/plugins.sbt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11

2-
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.13.0")
2+
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.0")
33

44
addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "0.6.0")
55

66
addSbtPlugin("com.typesafe.sbt" % "sbt-scalariform" % "1.3.0")
77

88
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.1.0")
99

10-
addSbtPlugin("com.typesafe.sbt" % "sbt-pgp" % "0.8.3")
10+
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0")
1111

1212
addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.3.2")

0 commit comments

Comments
 (0)