From 340870cc9eed88915629f89a7051edc66a9c2cb8 Mon Sep 17 00:00:00 2001 From: Zak Patterson Date: Mon, 4 Feb 2019 17:46:42 -0500 Subject: [PATCH] Add publishing --- build.sbt | 19 +++++++++++++++++++ project/plugins.sbt | 2 ++ 2 files changed, 21 insertions(+) diff --git a/build.sbt b/build.sbt index 7244ddc..f791fb9 100644 --- a/build.sbt +++ b/build.sbt @@ -1,4 +1,5 @@ import dependencies._ +import xerial.sbt.Sonatype._ cancelable in Global := true @@ -15,6 +16,23 @@ val commonSettings = Seq( val withTests : String = "compile->compile;test->test" val testOnly : String = "test->test" +lazy val publishSettings = Seq( + useGpg := true, + publishMavenStyle := true, + publishTo := sonatypePublishTo.value, + publishArtifact in Test := false, + homepage := Some(url("https://github.com/clovellytech/outwatch-router")), + pomIncludeRepository := Function.const(false), + sonatypeProfileName := "com.clovellytech", + + // License of your choice + licenses := Seq("MIT" -> url("http://opensource.org/licenses/MIT")), + + // Where is the source code hosted + sonatypeProjectHosting := Some(GitHubHosting("clovellytech", "outwatch-router", "pattersonzak@gmail.com")) +) + + lazy val docs = project .in(file("./router-docs")) .settings(commonSettings) @@ -77,6 +95,7 @@ lazy val router = project addCommandAlias("dev", "; compile; fastOptJS::startWebpackDevServer; devwatch; fastOptJS::stopWebpackDevServer"), addCommandAlias("devwatch", "~; fastOptJS; copyFastOptJS") ) + .settings(publishSettings) lazy val exampleApp = (project in file("router-example")) .settings(name := "outwatch-example") diff --git a/project/plugins.sbt b/project/plugins.sbt index b2cc145..94f7d4a 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -2,3 +2,5 @@ addSbtPlugin("ch.epfl.scala" % "sbt-scalajs-bundler" % "0.13.1") addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.26") addSbtPlugin("org.scalameta" % "sbt-mdoc" % "1.2.8" ) addSbtPlugin("com.47deg" % "sbt-microsites" % "0.8.0") +addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "2.3") +addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.2")