From 4ed654f74d712377f23bc7b97b4d41d20f038f53 Mon Sep 17 00:00:00 2001 From: Rocky Madden Date: Thu, 2 Jan 2014 14:43:36 -0700 Subject: Enabled ability to publish to sonatype. --- project/build.scala | 55 ++++++++++++++++++++++++++++++++++------------------- project/plugins.sbt | 1 + 2 files changed, 36 insertions(+), 20 deletions(-) create mode 100644 project/plugins.sbt diff --git a/project/build.scala b/project/build.scala index 06f9040..1e11e54 100644 --- a/project/build.scala +++ b/project/build.scala @@ -1,23 +1,42 @@ +import com.typesafe.sbt.pgp.PgpKeys._ import sbt._ import Keys._ -object Common { - def name = "stringmetric" - def organization = "com.rockymadden.stringmetric" - def scalaVersion = "2.10.3" - def version = "0.26.1" -} - object CoreBuild extends Build { - lazy val root = Project(Common.name, file(".")).aggregate(core, cli) - - lazy val core: Project = Project("core", file("core"), + lazy val root = Project("stringmetric", file("."), settings = Defaults.defaultSettings ++ Seq( - organization := Common.organization, - name := Common.name + "-core", - version := Common.version, - scalaVersion := Common.scalaVersion, + organization := "com.rockymadden.stringmetric", + name := "stringmetric", + version := "0.26.1", + scalaVersion := "2.10.3", resolvers ++= Seq(DefaultMavenRepository), + publishTo := Some("Sonatype" at "https://oss.sonatype.org/service/local/staging/deploy/maven2"), + publishMavenStyle := true, + credentials += Credentials(Path.userHome / ".ivy2" / ".credentials"), + pomExtra := + http://rockymadden.com/stringmetric/ + + + MIT + repo + + + + git@github.com:rockymadden/stringmetric.git + scm:git:git@github.com:rockymadden/stringmetric.git + + + + rockymadden + Rocky Madden + http://rockymadden.com/ + + ) + ).aggregate(core, cli) + + lazy val core: Project = Project("core", file("core"), + settings = (root.settings: Seq[sbt.Def.Setting[_]]) ++ Seq( + name := "stringmetric-core", libraryDependencies ++= Seq( "junit" % "junit" % "4.11" % "test", "org.scalatest" %% "scalatest" % "2.0.M5b" % "test" @@ -26,12 +45,8 @@ object CoreBuild extends Build { ) lazy val cli: Project = Project("cli", file("cli"), - settings = Defaults.defaultSettings ++ Seq( - organization := Common.organization, - name := Common.name + "-cli", - version := Common.version, - scalaVersion := Common.scalaVersion, - resolvers ++= Seq(DefaultMavenRepository), + settings = (root.settings: Seq[sbt.Def.Setting[_]]) ++ Seq( + name := "stringmetric-cli", libraryDependencies ++= Seq( "junit" % "junit" % "4.11" % "test", "org.scalatest" %% "scalatest" % "2.0.M5b" % "test" diff --git a/project/plugins.sbt b/project/plugins.sbt new file mode 100644 index 0000000..9cf23fb --- /dev/null +++ b/project/plugins.sbt @@ -0,0 +1 @@ +addSbtPlugin("com.typesafe.sbt" % "sbt-pgp" % "0.8.1") -- cgit v1.2.3