Skip to content
Browse files

Enable GPG.

  • Loading branch information...
1 parent eb7dc90 commit e9e795fafe7e572784b4b4772d9fc048bed6e4b9 @retronym retronym committed Jun 16, 2012
Showing with 60 additions and 12 deletions.
  1. +57 −11 project/ScalazBuild.scala
  2. +3 −1 project/plugins.sbt
View
68 project/ScalazBuild.scala
@@ -2,6 +2,7 @@ import sbt._
import Keys._
import sbt.Package._
import java.util.jar.Attributes.Name._
+import com.jsuereth.pgp.sbtplugin.PgpPlugin._
object ScalazBuild extends Build {
@@ -172,7 +173,7 @@ object ScalazBuild extends Build {
crossScalaVersions := Seq("2.9.2", "2.9.1", "2.9.0-1", "2.8.1", "2.10.0-M4"),
crossVersion := CrossVersion.full,
resolvers += ScalaToolsSnapshots,
-
+
dependencyScalaVersionTranslator := (Dependency.dependencyScalaVersion _),
dependencyScalaVersion <<= (dependencyScalaVersionTranslator, scalaVersion)((t, sv) => t(sv)),
publishSetting,
@@ -193,22 +194,67 @@ object ScalazBuild extends Build {
(IMPLEMENTATION_URL, "http://code.google.com/p/scalaz"),
(IMPLEMENTATION_VENDOR, "The Scalaz Project"),
(SEALED, "true"))
- )
+ ),
+ useGpg := true
+ useGpgAgent := false,
+ publishSetting,
+ publishArtifact in Test := false,
+ pomIncludeRepository := {
+ x => false
+ },
+ pomExtra := (
+ <url>http://scalaz.org</url>
+ <licenses>
+ <license>
+ <name>BSD-style</name>
+ <url>http://www.opensource.org/licenses/bsd-license.php</url>
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
+ <scm>
+ <url>git@github.com:scalaz/scalaz.git</url>
+ <connection>scm:git:git@github.com:scalaz/scalaz.git</connection>
+ </scm>
+ <developers>
+ {
+ Seq(
+ ("runarorama", "Runar Bjarnason"),
+ ("pchiusano", "Paul Chiusano"),
+ ("tonymorris", "Tony Morris"),
+ ("retronym", "Jason Zaugg"),
+ ("ekmett", "Edward Kmett"),
+ ("alexeyr", "Alexey Romanov"),
+ ("copumpkin", "Daniel Peebles"),
+ ("rwallace", "Richard Wallace"),
+ ("nuttycom", "Kris Nuttycombe")
+ ).map {
+ case (id, name) =>
+ <developer>
+ <id>{id}</id>
+ <name>{name}</name>
+ <url>http://github.com/{id}</url>
+ </developer>
+ }
+ }
+ </developers>
+ )
)
-
- lazy val publishSetting = publishTo <<= (version) {
- version: String =>
- def repo(name: String) = name at "http://nexus-direct.scala-tools.org/content/repositories/" + name
- val isSnapshot = version.trim.endsWith("SNAPSHOT")
- val repoName = if(isSnapshot) "snapshots" else "releases"
- Some(repo(repoName))
+
+
+ lazy val publishSetting = publishTo <<= (version).apply{
+ v =>
+ val nexus = "https://oss.sonatype.org/"
+ if (v.trim.endsWith("SNAPSHOT"))
+ Some("snapshots" at nexus + "content/repositories/snapshots")
+ else
+ Some("releases" at nexus + "service/local/staging/deploy/maven2")
}
lazy val credentialsSetting = credentials += {
Seq("build.publish.user", "build.publish.password").map(k => Option(System.getProperty(k))) match {
case Seq(Some(user), Some(pass)) =>
- Credentials("Sonatype Nexus Repository Manager", "nexus-direct.scala-tools.org", user, pass)
- case _ =>
+ Credentials("Sonatype Nexus Repository Manager", "oss.sonatype.org", user, pass)
+ case _ =>
Credentials(Path.userHome / ".ivy2" / ".credentials")
}
}
View
4 project/plugins.sbt
@@ -1 +1,3 @@
-scalacOptions in Compile += "-deprecation"
+scalacOptions in Compile += "-deprecation"
+
+addSbtPlugin("com.jsuereth" % "xsbt-gpg-plugin" % "0.6")

0 comments on commit e9e795f

Please sign in to comment.
Something went wrong with that request. Please try again.