Skip to content

Commit

Permalink
upgrade to sbt 1.1.6 and latest plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
ennru committed Jun 30, 2018
1 parent 665a5fd commit 8cf5c7a
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 33 deletions.
8 changes: 1 addition & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,7 @@ sudo: false
cache:
directories:
- $HOME/.ivy2/cache
# Cache the sbt launcher, currently the Travis VM preinstalls 0.13.5
- $HOME/.sbt/launchers/0.13.7
# Cache scala, currently the Travis VM preinstalls 2.11.2 & 2.10.4
#- $HOME/.sbt/boot/scala-$TRAVIS_SCALA_VERSION

# Updates regarding Travis VM preinstalls:
# https://github.com/travis-ci/travis-cookbooks/blob/master/changes.md
- $HOME/.sbt/boot

language: scala

Expand Down
3 changes: 1 addition & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ val sonatype = new PublishToSonatype {
}

lazy val commonSettings: Seq[Setting[_]] = Def.settings(
unpublished,
javaVersionPrefix in javaVersionCheck := None
unpublished
)

lazy val root = (project in file("."))
Expand Down
16 changes: 3 additions & 13 deletions config/build.sbt
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
import de.johoop.findbugs4sbt.FindBugs._
import de.johoop.findbugs4sbt.{ Effort, ReportType }
import de.johoop.jacoco4sbt.JacocoPlugin.jacoco
import com.typesafe.sbt.SbtScalariform
import com.typesafe.sbt.SbtScalariform.ScalariformKeys
import scalariform.formatter.preferences._

SbtScalariform.scalariformSettings

val formatPrefs = FormattingPreferences()
.setPreference(IndentSpaces, 4)

Expand Down Expand Up @@ -64,15 +59,12 @@ checkstyle in Compile := {
// add checkstyle as a dependency of doc
doc in Compile := ((doc in Compile).dependsOn(checkstyle in Compile)).value

findbugsSettings
findbugsReportType := Some(ReportType.Html)
findbugsReportType := Some(FindbugsReport.Html)
findbugsReportPath := Some(crossTarget.value / "findbugs.html")
findbugsEffort := Effort.Maximum
findbugsEffort := FindbugsEffort.Maximum
findbugsMaxMemory := 2000

jacoco.settings

javacOptions in (Compile, compile) ++= Seq("-source", "1.6", "-target", "1.8",
javacOptions in (Compile, compile) ++= Seq("-source", "1.8", "-target", "1.8",
"-g", "-Xlint:unchecked")

// because we test some global state such as singleton caches,
Expand All @@ -86,5 +78,3 @@ javadocSourceBaseUrl := {
for (gitHead <- com.typesafe.sbt.SbtGit.GitKeys.gitHeadCommit.value)
yield s"https://github.com/lightbend/config/blob/$gitHead/config/src/main/java"
}

javaVersionPrefix in javaVersionCheck := Some("1.8")
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=0.13.16
sbt.version=1.1.6
7 changes: 4 additions & 3 deletions project/linksource.scala
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,16 @@ object LinkSourcePlugin extends AutoPlugin {

val dir = (target in doc in Compile).value

javadocSourceBaseUrl.value.foreach { url =>
rewriteSourceLinks(dir, url, streams.value.log)
(javadocSourceBaseUrl.value, streams.value) match {
case (Some(url), streamz) =>
rewriteSourceLinks(dir, url, streamz.log)
case _ =>
}

result
}
)


private def rewriteSourceLinks(dir: File, sourceBaseUrl: String, log: Logger): Unit = {
// Convert <a href="../../../src-html/com/typesafe/config/Config.html#line.165"> to
// "https://github.com/lightbend/config/blob/v1.2.1/config/src/main/java/com/typesafe/config/Config.java#L165"
Expand Down
13 changes: 6 additions & 7 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
addSbtPlugin("de.johoop" % "findbugs4sbt" % "1.4.0")
addSbtPlugin("de.johoop" % "jacoco4sbt" % "2.1.6")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0")
addSbtPlugin("com.github.sbt" % "sbt-findbugs" % "2.0.0")
addSbtPlugin("com.github.sbt" % "sbt-jacoco" % "3.1.0")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.1")
addSbtPlugin("com.typesafe.sbt" % "sbt-osgi" % "0.9.3")
addSbtPlugin("com.typesafe.sbt" % "sbt-scalariform" % "1.2.1")
addSbtPlugin("org.scalariform" % "sbt-scalariform" % "1.8.2")

addSbtPlugin("com.etsy" % "sbt-checkstyle-plugin" % "3.0.0")
addSbtPlugin("com.etsy" % "sbt-checkstyle-plugin" % "3.1.1")

addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "0.8.5")
addSbtPlugin("com.typesafe.sbt" % "sbt-javaversioncheck" % "0.1.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "1.0.0")

0 comments on commit 8cf5c7a

Please sign in to comment.