1717import java .io .FileInputStream
1818import 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 }
2221import sbt .Keys ._
2322import sbt ._
2423import 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" )
0 commit comments