diff options
author | Rocky Madden <git@rockymadden.com> | 2014-01-02 14:43:36 -0700 |
---|---|---|
committer | Rocky Madden <git@rockymadden.com> | 2014-01-02 14:43:36 -0700 |
commit | 4ed654f74d712377f23bc7b97b4d41d20f038f53 (patch) | |
tree | 99e88cb2839b13a2fdc58433a052782edb4795bf | |
parent | 49de854bb464f1be37fbb27f942b9b65e52df751 (diff) | |
download | stringmetric-4ed654f74d712377f23bc7b97b4d41d20f038f53.tar.gz stringmetric-4ed654f74d712377f23bc7b97b4d41d20f038f53.tar.bz2 stringmetric-4ed654f74d712377f23bc7b97b4d41d20f038f53.zip |
Enabled ability to publish to sonatype.
-rw-r--r-- | project/build.scala | 55 | ||||
-rw-r--r-- | project/plugins.sbt | 1 |
2 files changed, 36 insertions, 20 deletions
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 := + <url>http://rockymadden.com/stringmetric/</url> + <licenses> + <license> + <name>MIT</name> + <distribution>repo</distribution> + </license> + </licenses> + <scm> + <url>git@github.com:rockymadden/stringmetric.git</url> + <connection>scm:git:git@github.com:rockymadden/stringmetric.git</connection> + </scm> + <developers> + <developer> + <id>rockymadden</id> + <name>Rocky Madden</name> + <url>http://rockymadden.com/</url> + </developer> + </developers>) + ).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") |