summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean Helou <jhe@codamens.fr>2019-02-15 15:02:44 +0100
committerTobias Roeser <le.petit.fou@web.de>2019-03-11 07:41:03 +0100
commit1b2e42c1aab0a7ab02056e6d9e2aa65b137adc83 (patch)
treefa42cefd93439df61d6b8c2302fd687af51dd0d0
parent0abad7b38ccf072b95572b3acecac648dbc95491 (diff)
downloadmill-1b2e42c1aab0a7ab02056e6d9e2aa65b137adc83.tar.gz
mill-1b2e42c1aab0a7ab02056e6d9e2aa65b137adc83.tar.bz2
mill-1b2e42c1aab0a7ab02056e6d9e2aa65b137adc83.zip
Play modules : api only, full play and mono module project.
-rw-r--r--contrib/playlib/src/mill/playlib/PlayModule.scala23
-rw-r--r--contrib/playlib/src/mill/playlib/SingleModule.scala6
2 files changed, 29 insertions, 0 deletions
diff --git a/contrib/playlib/src/mill/playlib/PlayModule.scala b/contrib/playlib/src/mill/playlib/PlayModule.scala
new file mode 100644
index 00000000..2d526101
--- /dev/null
+++ b/contrib/playlib/src/mill/playlib/PlayModule.scala
@@ -0,0 +1,23 @@
+package mill
+package playlib
+
+import mill.scalalib._
+import api.Versions
+
+trait PlayApiModule extends Dependencies with Router with Server{
+ trait PlayTests extends super.Tests{
+ def testFrameworks = Seq("org.scalatest.tools.Framework")
+ override def ivyDeps = T{
+ playMinorVersion() match {
+ case Versions.PLAY_2_6=>
+ Agg(ivy"org.scalatestplus.play::scalatestplus-play::3.1.2")
+ case Versions.PLAY_2_7=>
+ Agg(ivy"org.scalatestplus.play::scalatestplus-play::4.0.1")
+ }
+ }
+ override def sources = T.sources{ millSourcePath }
+ }
+
+ def start(args: String*) = T.command{ run(args:_*) }
+}
+trait PlayModule extends PlayApiModule with Twirl
diff --git a/contrib/playlib/src/mill/playlib/SingleModule.scala b/contrib/playlib/src/mill/playlib/SingleModule.scala
new file mode 100644
index 00000000..d98d67f7
--- /dev/null
+++ b/contrib/playlib/src/mill/playlib/SingleModule.scala
@@ -0,0 +1,6 @@
+package mill
+package playlib
+
+trait SingleModule extends Module {
+ override def millSourcePath: os.Path = super.millSourcePath / os.up
+}