BuildInfo
Generate scala code from your buildfile. This plugin generates a single object containing information from your build.
To declare a module that uses BuildInfo you must extend the mill.contrib.buildinfo.BuildInfo trait when defining your module.
Quickstart:
build.scimport $ivy.`com.lihaoyi::mill-contrib-buildinfo:`
import mill.contrib.buildinfo.BuildInfo
object project extends BuildInfo {
val name = "poject-name"
def buildInfoMembers: T[Map[String, String]] = T {
Map(
"name" -> name),
"scalaVersion" -> scalaVersion()
)
}
}
Configuration options
-
def buildInfoMembers: T[Map[String, String]]The map containing all member names and values for the generated info object. -
def buildInfoObjectName: String, default:BuildInfoThe name of the object which contains all the members frombuildInfoMembers. -
def buildInfoPackageName: Option[String], default:NoneThe package name of the object.