Skip to content

Commit

Permalink
Merge pull request #191 from mzuehlke/simplify-scripted-tests
Browse files Browse the repository at this point in the history
Simplify scripted tests using globs
  • Loading branch information
eed3si9n authored Jan 5, 2025
2 parents a03a1a4 + 7480df5 commit a5db4ac
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 19 deletions.
6 changes: 6 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,11 @@ lazy val plugin = (project in file("plugin"))
case _ => "2.0.0-M3"
}
},
scriptedSbt := {
scalaBinaryVersion.value match {
case "2.12" => "1.10.7"
case _ => "2.0.0-M3"
}
},
publishLocal := (publishLocal dependsOn (library / publishLocal)).value,
)
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ lazy val root = (project in file(".")).
if (substitutions contains name) substitutions(name) :: Nil
else ((Compile / generateContrabands / contrabandFormatsForType).value)(tpe)
},
TaskKey[Unit]("check") := {
val dir = (Compile / generateContrabands / sourceManaged).value
val src = dir / "generated" / "CustomProtocol.scala"
assert(src.isFile)
},
libraryDependencies += "com.eed3si9n" %% "sjson-new-scalajson" % contrabandSjsonNewVersion.value
// scalacOptions += "-Xlog-implicits"
)
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

> compile

> check
$ exists target/**/src_managed/main/generated/CustomProtocol.scala

> run
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ lazy val root = (project in file(".")).
if (substitutions contains name) substitutions(name) :: Nil
else ((Compile / generateContrabands / contrabandFormatsForType).value)(tpe)
},
TaskKey[Unit]("check") := {
val dir = (Compile / generateContrabands / sourceManaged).value
val src = dir / "generated" / "CustomProtocol.scala"
assert(src.isFile)
},
libraryDependencies += "com.eed3si9n" %% "sjson-new-scalajson" % contrabandSjsonNewVersion.value
// scalacOptions += "-Xlog-implicits"
)
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

> compile

> check
$ exists target/**/src_managed/main/generated/CustomProtocol.scala

> run
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@ lazy val root = (project in file(".")).
settings(
name := "example",
scalaVersion := "2.13.15",
TaskKey[Unit]("check") := {
val dir = (Compile / generateContrabands / sourceManaged).value
val src = dir / "com" / "example" / "codec" / "CustomJsonProtocol.scala"
assert(src.isFile)
},
libraryDependencies += "com.eed3si9n" %% "sjson-new-scalajson" % contrabandSjsonNewVersion.value
// scalacOptions += "-Xlog-implicits"
)
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

> compile

> check
$ exists target/**/src_managed/main/com/example/codec/CustomJsonProtocol.scala

> run
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.10.3
sbt.version=1.10.7

0 comments on commit a5db4ac

Please sign in to comment.