Skip to content

Commit

Permalink
Merge pull request #176 from dwijnand/drop-sbt-0.13
Browse files Browse the repository at this point in the history
Drop sbt 0.13 (and thus Scala 2.10)
  • Loading branch information
dwijnand authored Sep 9, 2020
2 parents 19ee4b7 + 99fcc8b commit 27f5071
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 30 deletions.
5 changes: 1 addition & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,10 @@ env:
- COURSIER_PROGRESS=0
- secure: q/AN4Esfzux4LWssh8mgQWPxgXhpFYmfesujb6qsSM5jiFAHBsH7cNH8uLVWk+lbmseou1H49GK2DV19iieZYzEDzjosAdc5MmbfcWvKE+pvQ+mnP26658a2ZqXUOQ0ewOxwB/jKMnnNSwpasUcHffM0l5RbQzSZLRjR6642qtomtAaxJwg/OKyeCRwj92qpEqsUdkj200tjNGEDKKBIeMFB+o2bkMY5CG9Dt7toAgfX3Ufa1tCu617vPMhDF8h+XcWC5QdK5ksW62j4cj+ze7N7GhWyUGQfHKgXZa5BQ5jFlf4rXOtTYRp6XFS2dSXX27wr9dsGG8vrcbrAVd+MxgS0zIXw1IJZ3ACQXKY/dwfQUJyOI5aa6OevVWKcGKv42D7p/dkorJR1dGd2zZ5K1eanFaKaTKvoASyaaaZ/ixUueEQdOv6vVfsGbDjyKmxeBNNL+zgIG0nBtgr/KF03eoBUhN5G9jstcwmcKcj+jm6ARk8n/nzBS7Zi/tIO6zCAEPFslBq0IgoG197PgnwLah05QGl1CRb+RRM4K3W7X9kJdLtdhM26plrZqY49FgUYLkO6GKtmFIEB1FOe+mmTK5sw3GGwZZdRMLSACS8LhZQwa8riA419Gi+7BPWYSPpoDeHxk5ZT4cW8U5tsJlg4+nVpeAGX/AVJw6mEgMH+geQ=
- secure: aYb2ahRmSg5hjDlxTRdEkW+gOWwhQ0Qxer402zY0tJXtWoL01dklq3BAt5EvjrWmUOrIxvkSE4HQoH3F/dir27Nlroigdp3YakvRfGwmSbwxrgpcLn5nrB5PERukw22bulhH3jsMnP8DEzys7R1EFx4z6XRvLTQHgzZIhZAuItc+7wdAuBQrDzxyjw//KmhB1eZO3afmLu7kgWdi0T1/xsulhWaOs/4WN4uIMXTPD09xyP3HfE6x6mpFK/TLdceO9DeIROHHk1Irigsvh734O5N0/hwyY3kVR/WUlLbJ6POKS5JIPrKQJdo4rqFisZMxvhtF2HyZQCMl6aB/Ev+or21kOs+uc4YP+0NCYDewmPjoUbdJZvYQKHRAcliZGAb1C0JrIczpGKSTLW/Ec6Y6BlQVPz+gKFqJTGMNXgeEqJLcfz126gBbIBeX3JnH4A+iTbMinjHmQZF3S8LRPm4J53SoxEnkrgYN73K1NJWOpBLXGWu6rRKNWNIa8WgHAlaOaocbZT1EQWj9twJyfT504WD2IhokBfqO2a67/vwMaoT9I0qrWw2XByTZDh2ZI/bJDn1kTf/hbm8sBgJ4+sdHfAh7JmqH/9W4jrBEDOHDDYQwGo6DXhBYXRybQctzgECZ3HAKgL0/HC6sb8tFCSoH12GkwOkACyhPXJfxJTenlS4=
matrix:
- TRAVIS_SBT_VERSION=0.13.x
- TRAVIS_SBT_VERSION=1.x

cache:
directories:
- $HOME/.coursier
- $HOME/.cache/coursier
- $HOME/.ivy2/cache
- $HOME/.sbt

Expand Down
32 changes: 13 additions & 19 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
val sbtdynver = project in file(".")
val sbtdynver = project.in(file(".")).settings(name := "sbt-dynver")

organization := "com.dwijnand"
name := "sbt-dynver"
licenses := Seq("Apache-2.0" -> url("https://www.apache.org/licenses/LICENSE-2.0"))
description := "An sbt plugin to dynamically set your version from git"
developers := List(Developer("dwijnand", "Dale Wijnand", "dale wijnand gmail com", url("https://dwijnand.com")))
Expand All @@ -10,16 +9,10 @@ organization := "com.dwijnand"
scmInfo := Some(ScmInfo(url("https://github.com/dwijnand/sbt-dynver"), "scm:git:[email protected]:dwijnand/sbt-dynver.git"))

enablePlugins(SbtPlugin)
sbtVersion in Global := "1.0.0" // must be Global, otherwise ^^ won't change anything
crossSbtVersions := List("0.13.17", "1.0.0")
Global / sbtVersion := "1.0.0" // must be Global, otherwise ^^ won't change anything
crossSbtVersions := List("1.0.0")

enablePlugins(ScriptedPlugin)

scalaVersion := (CrossVersion partialVersion (sbtVersion in pluginCrossBuild).value match {
case Some((0, 13)) => "2.10.7"
case Some((1, _)) => "2.12.6"
case _ => sys error s"Unhandled sbt version ${(sbtVersion in pluginCrossBuild).value}"
})
scalaVersion := "2.12.12"

maxErrors := 15
triggeredMessage := Watched.clearWhenTriggered
Expand All @@ -33,17 +26,17 @@ scalacOptions += "-Ywarn-numeric-widen"
scalacOptions += "-Ywarn-value-discard"

libraryDependencies += "org.eclipse.jgit" % "org.eclipse.jgit" % "5.8.1.202007141445-r" % Test
libraryDependencies += "org.scalacheck" %% "scalacheck" % "1.14.3" % Test
libraryDependencies += "org.scalacheck" %% "scalacheck" % "1.14.3" % Test

fork in Test := false
logBuffered in Test := false
parallelExecution in Test := true
Test / fork := false
Test / logBuffered := false
Test / parallelExecution := true

scriptedLaunchOpts ++= Seq("-Xmx1024M", "-XX:MaxPermSize=256M", "-Dplugin.version=" + version.value)
scriptedBufferLog := true

def toSbtPlugin(m: ModuleID) = Def.setting(
Defaults.sbtPluginExtra(m, (sbtBinaryVersion in pluginCrossBuild).value, (scalaBinaryVersion in update).value)
Defaults.sbtPluginExtra(m, (pluginCrossBuild / sbtBinaryVersion).value, (update / scalaBinaryVersion).value)
)

mimaPreviousArtifacts := Set(toSbtPlugin("com.dwijnand" % "sbt-dynver" % "4.0.0").value)
Expand All @@ -58,8 +51,9 @@ mimaBinaryIssueFilters ++= Seq(
exclude[IncompatibleResultTypeProblem]("sbtdynver.DynVerPlugin#autoImport.dynverAssertTagVersion"),
// GitDescribeOutput#Parser is private[sbtdynver]
exclude[Problem]("sbtdynver.GitDescribeOutput#Parser*"),
// lightbend/mima#388
// static method requires()sbt.Plugins in class sbtdynver.DynVerPlugin does not have a correspondent in current version
exclude[DirectMissingMethodProblem]("sbtdynver.DynVerPlugin.requires"),
)

// TaskKey[Unit]("verify") := Def.sequential(test in Test, scripted.toTask(""), mimaReportBinaryIssues).value

cancelable in Global := true
Global / cancelable := true
8 changes: 1 addition & 7 deletions project/travis.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
#!/usr/bin/env bash

case "$TRAVIS_SBT_VERSION" in
0.13.x) SWITCH_SBT_VERSION="^^0.13.17"; ;;
1.x) SWITCH_SBT_VERSION=""; ;;
*) echo >&2 "Aborting: Unknown TRAVIS_SBT_VERSION: $TRAVIS_SBT_VERSION"; exit 1; ;;
esac

[[ "$TRAVIS_PULL_REQUEST" == "false"
&& "$TRAVIS_BRANCH" == "master"
&& "$TRAVIS_SECURE_ENV_VARS" == "true"
Expand All @@ -23,4 +17,4 @@ else
PUBLISH=publishLocal
fi

sbt "$SWITCH_SBT_VERSION" test scripted mimaReportBinaryIssues "$PUBLISH"
sbt test scripted mimaReportBinaryIssues "$PUBLISH"

0 comments on commit 27f5071

Please sign in to comment.