Skip to content

Commit

Permalink
Update SBT to 0.13.16 and fix deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
stringbean committed Sep 7, 2017
1 parent 8f50c85 commit e72c865
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 17 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ checkstyleConfigLocation := CheckstyleConfigLocation.Classpath("com/etsy/checkst

To run Checkstyle automatically after compilation:
```scala
(checkstyle in Compile) <<= (checkstyle in Compile) triggeredBy (compile in Compile)
(checkstyle in Compile) := (checkstyle in Compile).triggeredBy(compile in Compile).value
```

To run Checkstyle automatically after test compilation:
```scala
(checkstyle in Test) <<= (checkstyle in Test) triggeredBy (compile in Test)
(checkstyle in Test) := (checkstyle in Test).triggeredBy(compile in Test).value
```

### XSLT transformations
Expand Down Expand Up @@ -92,8 +92,8 @@ lazy val root = (project in file(".")).configs(IntegrationTest)
Defaults.itSettings

checkstyleConfigLocation := CheckstyleConfigLocation.File("my-checkstyle-config.xml"),
checkstyle in IntegrationTest <<= checkstyleTask(IntegrationTest),
checkstyleOutputFile in IntegrationTest <<= target(_ / "checkstyle-integration-test-report.xml")
checkstyle in IntegrationTest := checkstyleTask(IntegrationTest).value,
checkstyleOutputFile in IntegrationTest := target.value / "checkstyle-integration-test-report.xml"
```

You can then run the tasks `it:checkstyle` and `it:checkstyle-check`.
Expand Down
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.9
sbt.version=0.13.16
4 changes: 1 addition & 3 deletions project/scripted.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
libraryDependencies <+= (sbtVersion) { sv =>
"org.scala-sbt" % "scripted-plugin" % sv
}
libraryDependencies += "org.scala-sbt" % "scripted-plugin" % sbtVersion.value
10 changes: 5 additions & 5 deletions src/main/scala/com/etsy/sbt/checkstyle/CheckstylePlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ object CheckstylePlugin extends AutoPlugin {
)

override lazy val projectSettings: Seq[Def.Setting[_]] = Seq(
checkstyleOutputFile <<= target(_ / "checkstyle-report.xml"),
checkstyleOutputFile in Test <<= target(_ / "checkstyle-test-report.xml"),
checkstyleOutputFile := target.value / "checkstyle-report.xml",
checkstyleOutputFile in Test := target.value / "checkstyle-test-report.xml",
checkstyleConfigLocation := com.etsy.sbt.checkstyle.CheckstyleConfigLocation.File("checkstyle-config.xml"),
checkstyleConfigLocation in Test <<= checkstyleConfigLocation,
checkstyle <<= checkstyleTask(Compile),
checkstyle in Test <<= checkstyleTask(Test)
checkstyleConfigLocation in Test := checkstyleConfigLocation.value,
checkstyle := checkstyleTask(Compile).value,
checkstyle in Test := checkstyleTask(Test).value
) ++ commonSettings
}
2 changes: 1 addition & 1 deletion src/sbt-test/checkstyle/checkstyle-auto/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ organization := "com.etsy"

checkstyleConfigLocation := CheckstyleConfigLocation.File("checkstyle-config.xml")

(checkstyle in Compile) <<= (checkstyle in Compile) triggeredBy (compile in Compile)
(checkstyle in Compile) := (checkstyle in Compile).triggeredBy(compile in Compile).value
4 changes: 2 additions & 2 deletions src/sbt-test/checkstyle/checkstyle-integration-test/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ lazy val root = (project in file(".")).configs(IntegrationTest)
Defaults.itSettings

checkstyleConfigLocation := CheckstyleConfigLocation.File("my-checkstyle-config.xml")
checkstyle in IntegrationTest <<= checkstyleTask(IntegrationTest)
checkstyleOutputFile in IntegrationTest <<= target(_ / "checkstyle-integration-test-report.xml")
checkstyle in IntegrationTest := checkstyleTask(IntegrationTest).value
checkstyleOutputFile in IntegrationTest := target.value / "checkstyle-integration-test-report.xml"
2 changes: 1 addition & 1 deletion src/sbt-test/checkstyle/checkstyle-test-auto/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ name := "checkstyle-test-auto"

organization := "com.etsy"

(checkstyle in Test) <<= (checkstyle in Test) triggeredBy (compile in Test)
(checkstyle in Test) := (checkstyle in Test).triggeredBy(compile in Test).value

0 comments on commit e72c865

Please sign in to comment.