.mill-aliases_mill0.10_2.13.0.5.0.source-code.Utils.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mill-aliases_mill0.10_2.13 Show documentation
Show all versions of mill-aliases_mill0.10_2.13 Show documentation
A Mill plugin to allow the creation of aliases to common-use tasks.
The newest version!
package com.carlosedp.aliases
import mill._
import mill.api.Result
import mill.define.SelectMode
private object Utils {
def taskResolver(ev: eval.Evaluator, tasks: Seq[String]): Result[List[String]] = {
val resolved: Either[String, List[String]] =
main.RunScript.resolveTasks(
main.ResolveMetadata,
ev,
tasks,
SelectMode.Multi,
)
resolved match {
case Left(err) => Result.Failure(err)
case Right(rs) =>
// rs.sorted.foreach(Console.out.println) // Print all resolved tasks
Result.Success(rs)
}
}
}