GradleBuildGenMain

mill.main.gradle.GradleBuildGenMain
object GradleBuildGenMain extends MavenAndGradle[ProjectModel, Dep]

Converts a Gradle build to Mill by generating Mill build file(s). The implementation uses the Gradle Tooling API 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:
    • implementation / api
    • compileOnly / compileOnlyApi
    • runtimeOnly
    • testImplementation
    • testCompileOnly
  • configures testing frameworks:
    • JUnit 4
    • JUnit 5
    • TestNG

===Limitations=== The conversion does not support:

  • custom dependency configurations
  • custom tasks
  • non-Java sources

Attributes

Source
GradleBuildGenMain.scala
Graph
Supertypes
trait MavenAndGradle[ProjectModel, Dep]
trait BuildGenBase[ProjectModel, Dep, Tree[Node[ProjectModel]]]
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

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

Attributes

Source
GradleBuildGenMain.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
GradleBuildGenMain.scala
override type ModuleFqnMap = Map[String, String]

A Map mapping from a key retrieved from the original build tool (for example, the GAV coordinate for Maven, ProjectRef.project for sbt) to the module FQN reference string in code such as parentModule.childModule.

A Map mapping from a key retrieved from the original build tool (for example, the GAV coordinate for Maven, ProjectRef.project for sbt) to the module FQN reference string in code such as parentModule.childModule.

If there is no need for such a map, override it with Unit.

Attributes

Source
GradleBuildGenMain.scala

Value members

Concrete methods

override def extractIrBuild(cfg: Config, build: Node[ProjectModel], moduleFqnMap: ModuleFqnMap): IrBuild

Attributes

Definition Classes
Source
GradleBuildGenMain.scala
def extractPomSettings(project: ProjectModel): IrPom | Null

Attributes

Source
GradleBuildGenMain.scala
def extractScopedDeps(project: ProjectModel, getModuleFqn: PartialFunction[String, String], cfg: Config): IrScopedDeps

Attributes

Source
GradleBuildGenMain.scala
override def getArtifactId(project: ProjectModel): String

Attributes

Definition Classes
Source
GradleBuildGenMain.scala
override def getBaseInfo(input: Tree[Node[ProjectModel]], cfg: Config, baseModule: String, packagesSize: Int): IrBaseInfo

Attributes

Definition Classes
Source
GradleBuildGenMain.scala
def getDepGav(dep: ExternalDep): (String, String, String)

Attributes

Source
GradleBuildGenMain.scala
def getJavacOptions(project: ProjectModel): Seq[String]

Attributes

Source
GradleBuildGenMain.scala
def getMillSourcePath(project: ProjectModel): Path

Attributes

Source
GradleBuildGenMain.scala
override def getModuleFqnMap(moduleNodes: Seq[Node[ProjectModel]]): ModuleFqnMap

Attributes

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

Attributes

Source
GradleBuildGenMain.scala
def getPomPackaging(project: ProjectModel): String

Attributes

Source
GradleBuildGenMain.scala
def getPublishProperties(project: ProjectModel, cfg: Config): Seq[(String, String)]

Attributes

Source
GradleBuildGenMain.scala
def getPublishVersion(project: ProjectModel): String | Null

Attributes

Source
GradleBuildGenMain.scala
def getRepositories(project: ProjectModel): Seq[String]

Attributes

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

Attributes

Definition Classes
Source
GradleBuildGenMain.scala
def interpMvn(dep: ExternalDep): String

Attributes

Source
GradleBuildGenMain.scala
def main(args: Array[String]): Unit

Attributes

Source
GradleBuildGenMain.scala

Inherited methods

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

Attributes

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

Attributes

Inherited from:
BuildGenBase
Source
BuildGenBase.scala
override def extraImports: Seq[String]

Attributes

Definition Classes
Inherited from:
MavenAndGradle
Source
BuildGenBase.scala
override def getModuleTree(input: Tree[Node[ProjectModel]]): Tree[Node[Option[ProjectModel]]]

Attributes

Definition Classes
Inherited from:
MavenAndGradle
Source
BuildGenBase.scala