Skip to content

Commit

Permalink
switch to sonatype publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
dylemma committed Mar 31, 2021
1 parent ec74036 commit 8d6c76c
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 6 deletions.
8 changes: 3 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
name := "mapk"
organization := "com.codedx"
version := "1.0.0"

githubOwner := "codedx"
githubRepository := "mapk"

scalaVersion := "2.12.13"
crossScalaVersions := List("2.12.13", "2.13.5")
scalacOptions := List("-deprecation", "-unchecked", "-feature", "-language:higherKinds")
Expand All @@ -16,4 +12,6 @@ scalacOptions ++= (scalaBinaryVersion.value match {
libraryDependencies += "org.typelevel" %% "cats-core" % "2.4.2"
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.5" % "test"

addCompilerPlugin("org.typelevel" % "kind-projector" % "0.11.3" cross CrossVersion.full)
addCompilerPlugin("org.typelevel" % "kind-projector" % "0.11.3" cross CrossVersion.full)

//
3 changes: 2 additions & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
addSbtPlugin("com.codecommit" % "sbt-github-packages" % "0.5.2")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.7")
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2")
31 changes: 31 additions & 0 deletions publish.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
ThisBuild / organization := "com.codedx"
ThisBuild / organizationName := "Code Dx"
ThisBuild / organizationHomepage := Some(url("https://codedx.com/"))

ThisBuild / scmInfo := Some(
ScmInfo(
url("https://github.com/codedx/mapk"),
"scm:[email protected]:codedx/mapk.git"
)
)
ThisBuild / developers := List(
Developer(
id = "codedx",
name = "Code Dx",
email = "[email protected]",
url = url("https://codedx.com/")
)
)

ThisBuild / description := "Map-like class for higher-kind key and value types"
ThisBuild / licenses := List("Apache 2" -> new URL("http://www.apache.org/licenses/LICENSE-2.0.txt"))
ThisBuild / homepage := Some(url("https://github.com/codedx/mapk"))

// Remove all additional repository other than Maven Central from POM
ThisBuild / pomIncludeRepository := { _ => false }
ThisBuild / publishTo := {
val nexus = "https://oss.sonatype.org/"
if (isSnapshot.value) Some("snapshots" at nexus + "content/repositories/snapshots")
else Some("releases" at nexus + "service/local/staging/deploy/maven2")
}
ThisBuild / publishMavenStyle := true

0 comments on commit 8d6c76c

Please sign in to comment.