Skip to content

Commit

Permalink
Added sbt-release and sbt-tpolecat plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosedp committed Sep 17, 2021
1 parent 1182554 commit 1ad8001
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 19 deletions.
33 changes: 20 additions & 13 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import ReleaseTransformations._

name := "scalautils"
ThisBuild / organization := "com.carlosedp"
ThisBuild / version := "0.4.0"
// ThisBuild / version := "0.4.0"
ThisBuild / scalaVersion := "2.13.6"
ThisBuild / homepage := Some(url("https://carlosedp.com"))
ThisBuild / licenses := Seq("MIT" -> url("https://opensource.org/licenses/MIT"))
Expand All @@ -15,7 +18,6 @@ ThisBuild / scalafixDependencies += "com.github.liancheng" %% "organize-imports"

lazy val root = (project in file("."))
.settings(
name := "scalautils",
crossScalaVersions := Seq("2.11.12", "2.12.13", "2.13.6", "3.0.2"),
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.9",
sonatypeRepository := "https://s01.oss.sonatype.org/service/local",
Expand All @@ -25,6 +27,21 @@ lazy val root = (project in file("."))
publishMavenStyle := true
)

releaseCrossBuild := true
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
releaseStepCommandAndRemaining("+publishSigned"),
setNextVersion,
commitNextVersion,
releaseStepCommand("sonatypeReleaseAll"),
pushChanges
)

ThisBuild / publishTo := {
val nexus = "https://s01.oss.sonatype.org/"
if (isSnapshot.value) Some("snapshots" at nexus + "content/repositories/snapshots")
Expand All @@ -36,14 +53,4 @@ addCommandAlias("fmt", "all scalafmtSbt scalafmtAll")
addCommandAlias("lint", "fmt;fix")
addCommandAlias("deps", "dependencyUpdates")
addCommandAlias("xtest", "+test")
addCommandAlias("release", "+publishSigned;sonatypeBundleRelease")

scalacOptions ++= Seq(
"-deprecation",
"-explaintypes",
"-unchecked",
"-feature",
"-Ywarn-value-discard",
"-Ywarn-dead-code",
"-Ywarn-unused"
)
addCommandAlias("pub", "+publishSigned;sonatypeBundleRelease")
14 changes: 8 additions & 6 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.7")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.1")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.0")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.27")
addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.5.3")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.9.0")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.7")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.1")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.0")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.27")
addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.5.3")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.9.0")
addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.20")
addSbtPlugin("com.github.sbt" % "sbt-release" % "1.1.0")
1 change: 1 addition & 0 deletions version.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
version in ThisBuild := "1.0.0-SNAPSHOT"

0 comments on commit 1ad8001

Please sign in to comment.