Skip to content

Commit

Permalink
Migrated .sbt build definition to .scala build definition.
Browse files Browse the repository at this point in the history
  • Loading branch information
Pankaj Gupta committed Mar 4, 2014
1 parent 25027ed commit a785995
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 71 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ target
dist
#*#
.#*
.history
*.log
*.iws
.idea
Expand Down
67 changes: 0 additions & 67 deletions build.sbt

This file was deleted.

75 changes: 75 additions & 0 deletions project/Build.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
import sbt._
import Keys._
import xerial.sbt.Sonatype._
import SonatypeKeys._


object Cassovary extends Build {

val sharedSettings = Seq(
version := "3.1.1",
organization := "com.twitter",
scalaVersion := "2.9.2",
retrieveManaged := true,
// crossScalaVersions := Seq("2.9.2", "2.10.3"),
// Workaround for a scaladoc bug which causes it to choke on
// empty classpaths.
//unmanagedClasspath in Compile += Attributed.blank(new java.io.File("doesnotexist")),
libraryDependencies ++= Seq(
"com.twitter" % "ostrich" % "4.8.0",
"com.twitter" % "util-logging" % "6.8.1",
"com.google.guava" % "guava" % "11.0.2",
"it.unimi.dsi" % "fastutil" % "6.4.4" % "provided",
"org.mockito" % "mockito-all" % "1.8.5" % "test",
"org.scala-tools.testing" % "specs_2.9.1" % "1.6.9" % "test"
),
resolvers += "twitter repo" at "http://maven.twttr.com",

scalacOptions ++= Seq("-encoding", "utf8"),
scalacOptions += "-deprecation",

javacOptions ++= Seq("-source", "1.6", "-target", "1.6"),
javacOptions in doc := Seq("-source", "1.6"),

// Sonatype publishing
publishArtifact in Test := false,
pomIncludeRepository := { _ => false },
publishMavenStyle := true,
pomExtra := (
<url>http://twitter.com/cassovary</url>
<licenses>
<license>
<name>Apache 2</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
<comments>A business-friendly OSS license</comments>
</license>
</licenses>
<scm>
<url>git@github.com:twitter/cassovary.git</url>
<connection>scm:git:git@github.com:twitter/cassovary.git</connection>
</scm>
<developers>
<developer><id>pankaj</id><name>Pankaj Gupta</name><url>https://twitter.com/pankaj</url></developer>
<developer><id>dongwang218</id><name>Dong Wang</name><url>https://twitter.com/dongwang218</url></developer>
<developer><id>tao</id><name>Tao Tao</name><url>https://twitter.com/tao</url></developer>
<developer><id>johnsirois</id><name>John Sirois</name><url>https://twitter.com/johnsirois</url></developer>
<developer><id>aneeshs</id><name>Aneesh Sharma</name><url>https://twitter.com/aneeshs</url></developer>
<developer><id>ashishgoel</id><name>Ashish Goel</name><url>https://twitter.com/ashishgoel</url></developer>
<developer><id>4ad</id><name>Mengqiu Wang</name><url>https://twitter.com/4ad</url></developer>
<developer><id>ningliang</id><name>Ning Liang</name><url>https://twitter.com/ningliang</url></developer>
<developer><id>ajeet</id><name>Ajeet Grewal</name><url>https://twitter.com/ajeet</url></developer>
</developers>),
publishTo <<= version { (v: String) =>
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 root = Project(id = "cassovary",
base = file("."),
settings = Project.defaultSettings ++ sharedSettings ++ sonatypeSettings)
}
4 changes: 0 additions & 4 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
//Conflicts with main plugin in ~/.sbt/plugins/gpg.sbt
//addSbtPlugin("com.jsuereth" % "xsbt-gpg-plugin" % "0.6")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "0.2.0")

resolvers += Resolver.url("sbt-plugin-releases", url("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases"))(Resolver.ivyStylePatterns)

0 comments on commit a785995

Please sign in to comment.