diff options
author | Li Haoyi <haoyi.sg@gmail.com> | 2017-12-31 22:56:45 -0800 |
---|---|---|
committer | Li Haoyi <haoyi.sg@gmail.com> | 2018-01-01 10:10:19 -0800 |
commit | cf5fb5fdfd477e0bb4ffa0e4fec3a8ec01bf5cf1 (patch) | |
tree | f3897463b6f55019f2bbd59ba5cff73cf0fb571f /integration/src/test/resource/jawn/build.sc | |
parent | 6996c01a391cb9aaa27268dd1f0cf0a1749ade21 (diff) | |
download | mill-cf5fb5fdfd477e0bb4ffa0e4fec3a8ec01bf5cf1.tar.gz mill-cf5fb5fdfd477e0bb4ffa0e4fec3a8ec01bf5cf1.tar.bz2 mill-cf5fb5fdfd477e0bb4ffa0e4fec3a8ec01bf5cf1.zip |
Split Acyclic/Jawn/BetterFiles tests into their own `integration/` test suite.
Those tests now download a snapshot of the relevant git repo rather than vendoring the files, and use a bare `build.sc` instead of having the build object be included in the test classpath.
Tests pass using `sbt integration/test`, but `mill integration.test` still doesn't work
Diffstat (limited to 'integration/src/test/resource/jawn/build.sc')
-rw-r--r-- | integration/src/test/resource/jawn/build.sc | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/integration/src/test/resource/jawn/build.sc b/integration/src/test/resource/jawn/build.sc new file mode 100644 index 00000000..9c9b41dc --- /dev/null +++ b/integration/src/test/resource/jawn/build.sc @@ -0,0 +1,58 @@ +import mill.scalalib +import mill.define.Cross +import mill.scalalib.{Dep, TestModule, Module} + +val jawn = Cross("2.10.6", "2.11.11", "2.12.3").map(new Jawn(_)) +class Jawn(crossVersion: String) extends mill.Module{ + trait JawnModule extends scalalib.SbtModule{ outer => + def scalaVersion = crossVersion + def scalacOptions = Seq( + "-deprecation", + "-optimize", + "-unchecked" + ) + def testProjectDeps: Seq[TestModule] = Nil + object test extends this.Tests{ + def projectDeps = super.projectDeps ++ testProjectDeps + def ivyDeps = Seq( + Dep("org.scalatest", "scalatest", "3.0.3"), + Dep("org.scalacheck", "scalacheck", "1.13.5") + ) + def testFramework = "org.scalatest.tools.Framework" + } + } + object Parser extends JawnModule{ + def basePath = ammonite.ops.pwd / 'target / 'workspace / 'jawn / 'parser + } + object Util extends JawnModule{ + def projectDeps = Seq(Parser) + def testProjectDeps = Seq(Parser.test) + def basePath = ammonite.ops.pwd / 'target / 'workspace / 'jawn / 'util + } + object Ast extends JawnModule{ + def projectDeps = Seq(Parser, Util) + def testProjectDeps = Seq(Parser.test, Util.test) + def basePath = ammonite.ops.pwd / 'target / 'workspace / 'jawn / 'acyclic + } + class Support(name: String, ivyDeps0: Dep*) extends JawnModule{ + def projectDeps = Seq[Module](Parser) + def basePath = ammonite.ops.pwd / 'target / 'workspace / 'jawn / 'support / name + def ivyDeps = ivyDeps0 + } + object Argonaut extends Support("argonaut", Dep("io.argonaut", "argonaut", "6.2")) + object Json4s extends Support("json4s", Dep("org.json4s", "json4s-ast", "3.5.2")) + + object Play extends Support("play"){ + def ivyDeps = mill.T{ + scalaBinaryVersion() match{ + case "2.10" => Seq(Dep("com.typesafe.play", "play-json", "2.4.11")) + case "2.11" => Seq(Dep("com.typesafe.play", "play-json", "2.5.15")) + case _ => Seq(Dep("com.typesafe.play", "play-json", "2.6.0")) + } + } + } + + object Rojoma extends Support("rojoma", Dep("com.rojoma", "rojoma-json", "2.4.3")) + object RojomaV3 extends Support("rojoma-v3", Dep("com.rojoma", "rojoma-json-v3", "3.7.2")) + object Spray extends Support("spray", Dep("io.spray", "spray-json", "1.3.3")) +}
\ No newline at end of file |