summaryrefslogtreecommitdiff
path: root/scalalib/src
diff options
context:
space:
mode:
Diffstat (limited to 'scalalib/src')
-rw-r--r--scalalib/src/mill/scalalib/GenIdea.scala2
-rw-r--r--scalalib/src/mill/scalalib/MiscModule.scala26
-rw-r--r--scalalib/src/mill/scalalib/ScalaModule.scala6
3 files changed, 17 insertions, 17 deletions
diff --git a/scalalib/src/mill/scalalib/GenIdea.scala b/scalalib/src/mill/scalalib/GenIdea.scala
index 99b820b0..60153f1f 100644
--- a/scalalib/src/mill/scalalib/GenIdea.scala
+++ b/scalalib/src/mill/scalalib/GenIdea.scala
@@ -116,7 +116,7 @@ object GenIdea {
val normalSourcePaths = (allSourcesPathRefs.map(_.path).toSet -- generatedSourcePaths.toSet).toSeq
val paths = Evaluator.resolveDestPaths(
- evaluator.workspacePath,
+ evaluator.outPath,
mod.compile.ctx.segments
)
diff --git a/scalalib/src/mill/scalalib/MiscModule.scala b/scalalib/src/mill/scalalib/MiscModule.scala
index e20fe7be..440b7dcd 100644
--- a/scalalib/src/mill/scalalib/MiscModule.scala
+++ b/scalalib/src/mill/scalalib/MiscModule.scala
@@ -14,7 +14,7 @@ object CrossModuleBase{
}
trait CrossModuleBase extends mill.Module{
def crossScalaVersion: String
- override def basePath = super.basePath / ammonite.ops.up
+ override def millSourcePath = super.millSourcePath / ammonite.ops.up
implicit def crossSbtModuleResolver: Resolver[CrossModuleBase] = new Resolver[CrossModuleBase]{
def resolve[V <: CrossModuleBase](c: Cross[V]): V = {
crossScalaVersion.split('.')
@@ -37,14 +37,14 @@ trait CrossModuleBase extends mill.Module{
trait CrossScalaModule extends ScalaModule with CrossModuleBase{ outer =>
override def sources = T.input{
super.sources() ++
- CrossModuleBase.scalaVersionPaths(crossScalaVersion, s => basePath / s"src-$s" )
+ CrossModuleBase.scalaVersionPaths(crossScalaVersion, s => millSourcePath / s"src-$s" )
}
trait Tests extends super.Tests {
override def sources = T.input{
super.sources() ++
- CrossModuleBase.scalaVersionPaths(crossScalaVersion, s => basePath / s"src-$s" )
+ CrossModuleBase.scalaVersionPaths(crossScalaVersion, s => millSourcePath / s"src-$s" )
}
}
}
@@ -52,20 +52,20 @@ trait CrossScalaModule extends ScalaModule with CrossModuleBase{ outer =>
trait SbtModule extends ScalaModule { outer =>
override def sources = T.input{
Agg(
- PathRef(basePath / 'src / 'main / 'scala),
- PathRef(basePath / 'src / 'main / 'java)
+ PathRef(millSourcePath / 'src / 'main / 'scala),
+ PathRef(millSourcePath / 'src / 'main / 'java)
)
}
- override def resources = T.input{ Agg(PathRef(basePath / 'src / 'main / 'resources)) }
+ override def resources = T.input{ Agg(PathRef(millSourcePath / 'src / 'main / 'resources)) }
trait Tests extends super.Tests {
- override def basePath = outer.basePath
+ override def millSourcePath = outer.millSourcePath
override def sources = T.input{
Agg(
- PathRef(basePath / 'src / 'test / 'scala),
- PathRef(basePath / 'src / 'test / 'java)
+ PathRef(millSourcePath / 'src / 'test / 'scala),
+ PathRef(millSourcePath / 'src / 'test / 'java)
)
}
- override def resources = T.input{ Agg(PathRef(basePath / 'src / 'test / 'resources)) }
+ override def resources = T.input{ Agg(PathRef(millSourcePath / 'src / 'test / 'resources)) }
}
}
@@ -76,17 +76,17 @@ trait CrossSbtModule extends SbtModule with CrossModuleBase{ outer =>
super.sources() ++
CrossModuleBase.scalaVersionPaths(
crossScalaVersion,
- s => basePath / 'src / 'main / s"scala-$s"
+ s => millSourcePath / 'src / 'main / s"scala-$s"
)
}
trait Tests extends super.Tests {
- override def basePath = outer.basePath
+ override def millSourcePath = outer.millSourcePath
override def sources = T.input{
super.sources() ++
CrossModuleBase.scalaVersionPaths(
crossScalaVersion,
- s => basePath / 'src / 'main / s"scala-$s"
+ s => millSourcePath / 'src / 'main / s"scala-$s"
)
}
}
diff --git a/scalalib/src/mill/scalalib/ScalaModule.scala b/scalalib/src/mill/scalalib/ScalaModule.scala
index 47326c6c..47309350 100644
--- a/scalalib/src/mill/scalalib/ScalaModule.scala
+++ b/scalalib/src/mill/scalalib/ScalaModule.scala
@@ -126,8 +126,8 @@ trait ScalaModule extends mill.Module with TaskModule { outer =>
def prependShellScript: T[String] = T{ "" }
- def sources = T.input{ Agg(PathRef(basePath / 'src)) }
- def resources = T.input{ Agg(PathRef(basePath / 'resources)) }
+ def sources = T.input{ Agg(PathRef(millSourcePath / 'src)) }
+ def resources = T.input{ Agg(PathRef(millSourcePath / 'resources)) }
def generatedSources = T { Agg.empty[PathRef] }
def allSources = T{ sources() ++ generatedSources() }
@@ -249,7 +249,7 @@ trait ScalaModule extends mill.Module with TaskModule { outer =>
// publish artifact with name "mill_2.12.4" instead of "mill_2.12"
def crossFullScalaVersion: T[Boolean] = false
- def artifactName: T[String] = basePath.last.toString
+ def artifactName: T[String] = millSourcePath.last.toString
def artifactScalaVersion: T[String] = T {
if (crossFullScalaVersion()) scalaVersion()
else Lib.scalaBinaryVersion(scalaVersion())