Skip to content
This repository has been archived by the owner on Apr 29, 2024. It is now read-only.

Commit

Permalink
cross-build for sbt 0.13 and sbt 1.0
Browse files Browse the repository at this point in the history
- depend on different versions of lift-json
  when building against 2.10 and 2.12 as a
  single release version does not exist that
  can be used with both
- update sbt-release to a version that supports
  `releaseStepCommandAndRemaining` since we need to
   use the `^` operator in release steps
  • Loading branch information
Jeffrey Olchovy committed Aug 15, 2017
1 parent de92b59 commit f494229
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
22 changes: 15 additions & 7 deletions build.sbt
Expand Up @@ -10,7 +10,17 @@ organization := "com.tapad"

scalaVersion := "2.10.6"

libraryDependencies ++= Seq("net.liftweb" %% "lift-json" % "2.5-RC5",
crossSbtVersions := Seq("0.13.16", "1.0.0")

libraryDependencies += {
val liftJsonVersion = CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, n)) if n < 12 => "2.5.4"
case _ => "3.0.1"
}
"net.liftweb" %% "lift-json" % liftJsonVersion
}

libraryDependencies ++= Seq(
"org.yaml" % "snakeyaml" % "1.15",
"org.scalatest" %% "scalatest" % "3.0.1" % "test",
"org.mockito" % "mockito-all" % "1.9.5" % "test")
Expand Down Expand Up @@ -54,18 +64,16 @@ pomExtra := {

scalariformSettings

releaseSettings

ReleaseKeys.nextVersion := { (version: String) => Version(version).map(_.bumpBugfix.asSnapshot.string).getOrElse(versionFormatError) }
releaseNextVersion := { (version: String) => Version(version).map(_.bumpBugfix.asSnapshot.string).getOrElse(versionFormatError) }

ReleaseKeys.releaseProcess := Seq(
releaseProcess := Seq(
checkSnapshotDependencies,
inquireVersions,
runTest,
releaseStepCommandAndRemaining("^test"),
setReleaseVersion,
commitReleaseVersion,
tagRelease,
ReleaseStep(action = Command.process("publishSigned", _)),
releaseStepCommandAndRemaining("^publishSigned"),
setNextVersion,
commitNextVersion,
ReleaseStep(action = Command.process("sonatypeReleaseAll", _)),
Expand Down
2 changes: 1 addition & 1 deletion project/plugins.sbt
Expand Up @@ -2,6 +2,6 @@ addSbtPlugin("org.scalariform" % "sbt-scalariform" % "1.6.0")

addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0")

addSbtPlugin("com.github.gseitz" % "sbt-release" % "0.8.5")
addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.6")

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

0 comments on commit f494229

Please sign in to comment.