Skip to content

Commit 55242e1

Browse files
authored
Merge pull request #13 from SethTisue/version-bumps
use (much!) newer MiMa (and sbt & Travis while we're at it)
2 parents 94cbdc6 + 20a5048 commit 55242e1

File tree

5 files changed

+34
-7
lines changed

5 files changed

+34
-7
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
target/

.travis.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# opt-in to Travis's newer/faster container-based infrastructure
2+
sudo: false
3+
4+
language: scala
5+
6+
jdk:
7+
- openjdk6
8+
9+
# cache stuff, hopefully shortening build times
10+
cache:
11+
directories:
12+
- $HOME/.ivy2
13+
- $HOME/.sbt/boot
14+
- $HOME/.sbt/launchers
15+
16+
script:
17+
- sbt test
18+
19+
before_cache:
20+
- find $HOME/.sbt -name "*.lock" | xargs rm
21+
- find $HOME/.ivy2 -name "ivydata-*.properties" | xargs rm
22+
23+
notifications:
24+
email:
25+
26+

build.sbt

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ bintrayOrganization := None
3030
// See code changes and docs: https://github.com/sbt/sbt-osgi/commit/e3625e685b8d1784938ec66067d629251811a9d1
3131
addSbtPlugin("com.typesafe.sbt" % "sbt-osgi" % "0.7.0")
3232

33-
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.1.8")
33+
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.1.12")

project/build.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=0.13.9
1+
sbt.version=0.13.13

src/main/scala/ScalaModulePlugin.scala

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import sbt._
22
import Keys._
33
import com.typesafe.sbt.osgi.{OsgiKeys, SbtOsgi}
4-
import com.typesafe.tools.mima.plugin.{MimaPlugin, MimaKeys}
4+
import com.typesafe.tools.mima.plugin.{MimaPlugin, MimaKeys}, MimaKeys._
55

66
object ScalaModulePlugin extends Plugin {
77
val repoName = settingKey[String]("The name of the repository under github.com/scala/.")
@@ -30,15 +30,15 @@ object ScalaModulePlugin extends Plugin {
3030
scalacOptions in compile ++= Seq("-optimize", "-feature", "-deprecation", "-unchecked", "-Xlint"),
3131

3232
// Generate $name.properties to store our version as well as the scala version used to build
33-
resourceGenerators in Compile <+= Def.task {
33+
resourceGenerators in Compile += Def.task {
3434
val props = new java.util.Properties
3535
props.put("version.number", version.value)
3636
props.put("scala.version.number", scalaVersion.value)
3737
props.put("scala.binary.version.number", scalaBinaryVersion.value)
3838
val file = (resourceManaged in Compile).value / s"${name.value}.properties"
3939
IO.write(props, null, file)
4040
Seq(file)
41-
},
41+
}.taskValue,
4242

4343
mappings in (Compile, packageBin) += {
4444
(baseDirectory.value / s"${name.value}.properties") -> s"${name.value}.properties"
@@ -112,7 +112,7 @@ object ScalaModulePlugin extends Plugin {
112112

113113
lazy val mimaSettings: Seq[Setting[_]] = MimaPlugin.mimaDefaultSettings ++ Seq(
114114
// manual cross-versioning because https://github.com/typesafehub/migration-manager/issues/62
115-
MimaKeys.previousArtifact := Some(organization.value % s"${name.value}_${scalaBinaryVersion.value}" % mimaPreviousVersion.value.getOrElse("dummy")),
115+
mimaPreviousArtifacts := Set(organization.value % s"${name.value}_${scalaBinaryVersion.value}" % mimaPreviousVersion.value.getOrElse("dummy")),
116116

117117
canRunMima := {
118118
val mimaVer = mimaPreviousVersion.value
@@ -129,7 +129,7 @@ object ScalaModulePlugin extends Plugin {
129129
},
130130

131131
runMimaIfEnabled := Def.taskDyn({
132-
if(canRunMima.value) Def.task { MimaKeys.reportBinaryIssues.value }
132+
if(canRunMima.value) Def.task { mimaReportBinaryIssues.value }
133133
else Def.task { () }
134134
}).value,
135135

0 commit comments

Comments
 (0)