SbtBuildGenMain

mill.main.sbt.SbtBuildGenMain
object SbtBuildGenMain extends BuildGenBase[Project, String, (BuildInfo, Tree[Node[Option[Project]]])]

Converts an sbt build to Mill by generating Mill build file(s). The implementation uses the sbt addPluginSbtFile command to add a plugin and a task to extract the settings for a project using a custom model.

The generated output should be considered scaffolding and will likely require edits to complete conversion.

===Capabilities=== The conversion

  • handles deeply nested modules
  • captures publish settings
  • configures dependencies for configurations:
    • no configuration
    • Compile
    • Test
    • Runtime
    • Provided
    • Optional
  • configures testing frameworks (@see mill.scalalib.TestModule):
    • Java:
      • JUnit 4
      • JUnit 5
      • TestNG
    • Scala:
      • ScalaTest
      • Specs2
      • µTest
      • MUnit
      • Weaver
      • ZIOTest
      • ScalaCheck ===Limitations=== The conversion does not support:
  • custom dependency configurations
  • custom settings including custom tasks
  • sources other than Scala on JVM and Java, such as Scala.js and Scala Native
  • cross builds

Attributes

Source
SbtBuildGenMain.scala
Graph
Supertypes
trait BuildGenBase[Project, String, (BuildInfo, Tree[Node[Option[Project]]])]
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

case class Config(shared: BasicConfig, baseProject: Option[String], customSbt: Option[String])

Attributes

Source
SbtBuildGenMain.scala
Supertypes
trait Serializable
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Types

override type C = Config

Attributes

Source
SbtBuildGenMain.scala
override type ModuleFqnMap = Map[String, String]

From the Project.projectRefProject to the package string built by BuildGenUtil.buildModuleFqn.

From the Project.projectRefProject to the package string built by BuildGenUtil.buildModuleFqn.

Attributes

Source
SbtBuildGenMain.scala

Value members

Concrete methods

override def extraImports: Seq[String]

Attributes

Definition Classes
Source
SbtBuildGenMain.scala
def extractConfigurationDeps(project: Project, toModuleFqn: PartialFunction[String, String], cfg: Config): IrScopedDeps

Value parameters

toModuleFqn

see ModuleFqnMap.

Attributes

Source
SbtBuildGenMain.scala
override def extractIrBuild(cfg: Config, build: Node[Project], moduleFqnMap: ModuleFqnMap): IrBuild

Attributes

Definition Classes
Source
SbtBuildGenMain.scala
def extractPomSettings(buildPublicationInfo: BuildPublicationInfo): IrPom

Attributes

Source
SbtBuildGenMain.scala
def getArtifactId(project: Project): String

Attributes

Source
SbtBuildGenMain.scala
override def getBaseInfo(input: (BuildInfo, Tree[Node[Option[Project]]]), cfg: Config, baseModule: String, packagesSize: Int): IrBaseInfo

Attributes

Definition Classes
Source
SbtBuildGenMain.scala
def getJavacOptions(buildInfo: BuildInfo): Seq[String]

Attributes

Source
SbtBuildGenMain.scala
def getMillSourcePath(project: Project): Path

Attributes

Source
SbtBuildGenMain.scala
override def getModuleFqnMap(moduleNodes: Seq[Node[Project]]): Map[String, String]

Attributes

Definition Classes
Source
SbtBuildGenMain.scala
def getModuleSupertypes(cfg: Config): Seq[String]

Attributes

Source
SbtBuildGenMain.scala
override def getModuleTree(input: (BuildInfo, Tree[Node[Option[Project]]])): Tree[Node[Option[Project]]]

Attributes

Definition Classes
Source
SbtBuildGenMain.scala
def getPublishVersion(buildInfo: BuildInfo): String | Null

Attributes

Source
SbtBuildGenMain.scala
def getRepositories(buildInfo: BuildInfo): Seq[String]

Attributes

Source
SbtBuildGenMain.scala
override def getSupertypes(cfg: Config, baseInfo: IrBaseInfo, build: Node[Project]): Seq[String]

Attributes

Definition Classes
Source
SbtBuildGenMain.scala
def main(args: Array[String]): Unit

Attributes

Source
SbtBuildGenMain.scala
def renderMvn(dependency: LibraryDependency): String

Attributes

Source
SbtBuildGenMain.scala

Inherited methods

def convert(input: (BuildInfo, Tree[Node[Option[Project]]]), cfg: C, shared: BasicConfig): Tree[Node[BuildObject]]

Attributes

Inherited from:
BuildGenBase
Source
BuildGenBase.scala
def convertWriteOut(cfg: C, shared: BasicConfig, input: (BuildInfo, Tree[Node[Option[Project]]])): Unit

Attributes

Inherited from:
BuildGenBase
Source
BuildGenBase.scala