Skip to content

Commit

Permalink
fix sonatype
Browse files Browse the repository at this point in the history
  • Loading branch information
dlwh committed Apr 15, 2021
1 parent 77f00ce commit 9218bae
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 26 deletions.
38 changes: 12 additions & 26 deletions project/Build.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import sbt.Keys._
import sbt._
import breeze.codegen.plugin.SbtBreezeCodegenPlugin.breezeCodegenSettings
import xerial.sbt.Sonatype.autoImport.{sonatypeProfileName, sonatypeProjectHosting, sonatypePublishTo}
import xerial.sbt.Sonatype._

object Common {

Expand Down Expand Up @@ -34,31 +36,6 @@ object Common {
Resolver.typesafeRepo("releases")
),
testOptions in Test += Tests.Argument("-oDF"),
pomExtra :=
<url>http://scalanlp.org/</url>
<licenses>
<license>
<name>Apache 2</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
<distribution>repo</distribution>
</license>
</licenses>
<developers>
<developer>
<id>dlwh</id>
<name>David Hall</name>
<url>http://www.dlwh.org/</url>
</developer>
</developers>,
publishMavenStyle := true,
publishTo := {
val yes = isSnapshot.value
val nexus = "https://oss.sonatype.org/"
if (yes)
Some("snapshots".at(nexus + "content/repositories/snapshots"))
else
Some("releases".at(nexus + "service/local/staging/deploy/maven2"))
},
publishArtifact in Test := false,
pomIncludeRepository := { _ =>
false
Expand All @@ -76,6 +53,15 @@ object Common {
} else {
Seq("-Ymacro-annotations")
}
}
},

sonatypeProfileName := "org.scalanlp",
publishMavenStyle := true,
licenses := Seq("Apache Publich License 2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0.html")),
publishTo := sonatypePublishTo.value,

// Where is the source code hosted: GitHub or GitLab?
sonatypeProjectHosting := Some(GitHubHosting("dlwh", "sbt-breeze-expand-codegen", "[email protected]"))

) ++ breezeCodegenSettings
}
3 changes: 3 additions & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "2.1.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "0.9.3")

addSbtPlugin("org.scalanlp" % "sbt-breeze-expand-codegen" % "0.2")

addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "2.3")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.1")

0 comments on commit 9218bae

Please sign in to comment.