Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add sonatype and sbt-pgp plugin to publish Scala artifact (#37)
* Add sonatype and sbt-pgp plugin to publish Scala artifact

* Fix whitespaces
  • Loading branch information
icexelloss committed Jul 25, 2018
1 parent 283f4c4 commit 4bca88e
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 2 deletions.
5 changes: 4 additions & 1 deletion build.sbt
Expand Up @@ -47,7 +47,7 @@ lazy val compilationSettings = scalariformSettings ++ Seq(
"-Ywarn-numeric-widen"
),
resolvers ++= Seq(
"Local Maven Repository" at "file://"+Path.userHome.absolutePath+"/.m2/repository",
"Local Maven Repository" at "file://" + Path.userHome.absolutePath + "/.m2/repository",
"Typesafe Repo" at "http://repo.typesafe.com/typesafe/releases/"
),
ScalariformKeys.preferences := formattingPreferences
Expand Down Expand Up @@ -120,3 +120,6 @@ addCommandAlias(
"assemblyNoTest",
"; set test in Test := {}; assembly"
)

publishTo := sonatypePublishTo.value
crossPaths := false
6 changes: 5 additions & 1 deletion project/plugins.sbt
Expand Up @@ -8,4 +8,8 @@ addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "4.0.0")

addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.5.0")

addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.8.2")
addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.8.2")

addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "2.3")

addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.0")
28 changes: 28 additions & 0 deletions sonatype.sbt
@@ -0,0 +1,28 @@
sonatypeProfileName := "com.twosigma"

publishMavenStyle := true

licenses := Seq("APL2" -> url("http://www.apache.org/licenses/LICENSE-2.0.txt"))

import xerial.sbt.Sonatype._
sonatypeProjectHosting := Some(GitHubHosting("twosigma", "flint", "ljin@twosigma.com"))

homepage := Some(url("https://github.com/twosigma/flint"))

scmInfo := Some(
ScmInfo(
url("https://github.com/twosigma/flint"),
"scm:git@github.com:twosigma/flint.git"
)
)

developers := List(
Developer(
id = "icexelloss",
name = "Li Jin",
email = "ice.xelloss@gmail.com",
url = url("https://github.com/icexelloss")
)
)

publishArtifact in Test := false

0 comments on commit 4bca88e

Please sign in to comment.