diff options
Diffstat (limited to 'scalalib')
-rw-r--r-- | scalalib/src/mill/scalalib/GenIdea.scala | 18 | ||||
-rw-r--r-- | scalalib/src/mill/scalalib/PublishModule.scala | 5 |
2 files changed, 16 insertions, 7 deletions
diff --git a/scalalib/src/mill/scalalib/GenIdea.scala b/scalalib/src/mill/scalalib/GenIdea.scala index 2f76b666..4b283e7c 100644 --- a/scalalib/src/mill/scalalib/GenIdea.scala +++ b/scalalib/src/mill/scalalib/GenIdea.scala @@ -12,15 +12,23 @@ import mill.util.Strict.Agg object GenIdeaModule extends ExternalModule { - def idea() = T.command{ mill.scalalib.GenIdea() } + + def idea(ev: Evaluator[Any]) = T.command{ + mill.scalalib.GenIdea( + implicitly, + ev.rootModule, + ev.discover + ) + } + + implicit def millScoptEvaluatorReads[T] = new mill.main.EvaluatorScopt[T]() def millDiscover = Discover[this.type] } object GenIdea { - def apply()(implicit ctx: Log, - rootModule0: BaseModule.Implicit, - discover: Discover[_]): Unit = { - val rootModule = rootModule0.value + def apply(ctx: Log, + rootModule: BaseModule, + discover: Discover[_]): Unit = { val pp = new scala.xml.PrettyPrinter(999, 4) rm! pwd/".idea" rm! pwd/".idea_modules" diff --git a/scalalib/src/mill/scalalib/PublishModule.scala b/scalalib/src/mill/scalalib/PublishModule.scala index 993fe7e6..e7f36609 100644 --- a/scalalib/src/mill/scalalib/PublishModule.scala +++ b/scalalib/src/mill/scalalib/PublishModule.scala @@ -2,7 +2,7 @@ package mill package scalalib import ammonite.ops._ -import mill.define.{ExternalModule, TargetScopt, Task} +import mill.define.{ExternalModule, Task} import mill.eval.{PathRef, Result} import mill.scalalib.publish.{Artifact, SonatypePublisher} import mill.util.Loose.Agg @@ -88,7 +88,7 @@ trait PublishModule extends ScalaModule { outer => object PublishModule extends ExternalModule{ def publishAll(sonatypeCreds: String, gpgPassphrase: String, - publishArtifacts: TargetScopt.Targets[(mill.scalalib.publish.Artifact, Seq[(PathRef, String)])], + publishArtifacts: mill.main.MagicScopt.Tasks[(mill.scalalib.publish.Artifact, Seq[(PathRef, String)])], sonatypeUri: String = "https://oss.sonatype.org/service/local", sonatypeSnapshotUri: String = "https://oss.sonatype.org/content/repositories/snapshots") = T.command{ val x: Seq[(Seq[(Path, String)], Artifact)] = Task.sequence(publishArtifacts.items)().map{ @@ -104,6 +104,7 @@ object PublishModule extends ExternalModule{ x:_* ) } + implicit def millScoptTargetReads[T] = new mill.main.MagicScopt[T]() def millDiscover: mill.define.Discover[this.type] = mill.define.Discover[this.type] }
\ No newline at end of file |