summaryrefslogtreecommitdiff
path: root/scalalib
diff options
context:
space:
mode:
authorLi Haoyi <haoyi.sg@gmail.com>2017-12-31 01:13:59 -0800
committerLi Haoyi <haoyi.sg@gmail.com>2017-12-31 01:21:13 -0800
commit7e8d847b29c733b43ae150d5a199f0a71ee02bf3 (patch)
treea6def0f3cc641d5e456c40ab3d8fdd77bbd2d1f5 /scalalib
parent13f896a36eb275de9784ce3400dde09311afd6bd (diff)
downloadmill-7e8d847b29c733b43ae150d5a199f0a71ee02bf3.tar.gz
mill-7e8d847b29c733b43ae150d5a199f0a71ee02bf3.tar.bz2
mill-7e8d847b29c733b43ae150d5a199f0a71ee02bf3.zip
Split out generic `T.input` tasks from the `T.source` helpers, allowing `T.source` to behave as before but `T.input` can be used for other things. Fixes https://github.com/lihaoyi/mill/issues/77
Diffstat (limited to 'scalalib')
-rw-r--r--scalalib/src/main/scala/mill/scalalib/Module.scala12
1 files changed, 6 insertions, 6 deletions
diff --git a/scalalib/src/main/scala/mill/scalalib/Module.scala b/scalalib/src/main/scala/mill/scalalib/Module.scala
index 76c50aed..1ff4c240 100644
--- a/scalalib/src/main/scala/mill/scalalib/Module.scala
+++ b/scalalib/src/main/scala/mill/scalalib/Module.scala
@@ -191,8 +191,8 @@ trait Module extends mill.Module with TaskModule { outer =>
def prependShellScript: T[String] = T{ "" }
- def sources = T.source{ PathRef(basePath / 'src) }
- def resources = T.source{ PathRef(basePath / 'resources) }
+ def sources = T.source{ basePath / 'src }
+ def resources = T.source{ basePath / 'resources }
def allSources = T{ Seq(sources()) }
def compile: T[CompilationResult] = T.persistent{
compileScala(
@@ -346,11 +346,11 @@ trait PublishModule extends Module { outer =>
trait SbtModule extends Module { outer =>
def basePath: Path
- override def sources = T.source{ PathRef(basePath / 'src / 'main / 'scala) }
- override def resources = T.source{ PathRef(basePath / 'src / 'main / 'resources) }
+ override def sources = T.source{ basePath / 'src / 'main / 'scala }
+ override def resources = T.source{ basePath / 'src / 'main / 'resources }
trait Tests extends super.Tests{
def basePath = outer.basePath
- override def sources = T.source{ PathRef(basePath / 'src / 'test / 'scala) }
- override def resources = T.source{ PathRef(basePath / 'src / 'test / 'resources) }
+ override def sources = T.source{ basePath / 'src / 'test / 'scala }
+ override def resources = T.source{ basePath / 'src / 'test / 'resources }
}
}