All Downloads are FREE. Search and download functionalities are using the official Maven repository.

mill.scalalib.IvyDepsTreeArgs.scala Maven / Gradle / Ivy

There is a newer version: 0.12.0-RC2-17-07e173
Show newest version
package mill.scalalib

import mainargs.Flag
import mainargs.arg

/**
 * Arguments for the ivDepsTree command.
 *
 * @param inverse Invert the tree representation, so that the root is on the bottom.
 * @param withCompile Include the compile-time only dependencies (`compileIvyDeps`, provided scope) into the tree.
 * @param withRuntime Include the runtime dependencies (`runIvyDeps`, runtime scope) into the tree.
 * @param whatDependsOn possible list of modules (org:artifact) to target in the tree in order to see
 *                      where a dependency stems from.
 */
class IvyDepsTreeArgs private (
    @arg(
      doc =
        "Invert the tree representation, so that the root is on the bottom val inverse (will be forced when used with whatDependsOn)"
    )
    val inverse: Flag,
    @arg(doc =
      "Include the compile-time only dependencies (`compileIvyDeps`, provided scope) into the tree."
    )
    val withCompile: Flag,
    @arg(doc = "Include the runtime dependencies (`runIvyDeps`, runtime scope) into the tree.")
    val withRuntime: Flag,
    @arg(
      doc =
        "Possible list of modules (org:artifact) to target in the tree in order to see where a dependency stems from."
    )
    val whatDependsOn: List[String]
)

object IvyDepsTreeArgs {
  def apply(
      inverse: Flag = Flag(),
      withCompile: Flag = Flag(),
      withRuntime: Flag = Flag(),
      whatDependsOn: List[String] = List.empty
  ) = new IvyDepsTreeArgs(inverse, withCompile, withRuntime, whatDependsOn)

  implicit val argsReader: mainargs.ParserForClass[IvyDepsTreeArgs] =
    mainargs.ParserForClass[IvyDepsTreeArgs]
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy