jbuildinfo


License

License

GroupId

GroupId

com.github.carueda
ArtifactId

ArtifactId

jbuildinfo_2.12
Last Version

Last Version

0.1.2
Release Date

Release Date

Type

Type

jar
Description

Description

jbuildinfo
jbuildinfo
Project URL

Project URL

https://github.com/carueda/mill-jbuildinfo
Project Organization

Project Organization

com.github.carueda
Source Code Management

Source Code Management

https://github.com/carueda/mill-jbuildinfo

Download jbuildinfo_2.12

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.carueda/jbuildinfo_2.12/ -->
<dependency>
    <groupId>com.github.carueda</groupId>
    <artifactId>jbuildinfo_2.12</artifactId>
    <version>0.1.2</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.carueda/jbuildinfo_2.12/
implementation 'com.github.carueda:jbuildinfo_2.12:0.1.2'
// https://jarcasting.com/artifacts/com.github.carueda/jbuildinfo_2.12/
implementation ("com.github.carueda:jbuildinfo_2.12:0.1.2")
'com.github.carueda:jbuildinfo_2.12:jar:0.1.2'
<dependency org="com.github.carueda" name="jbuildinfo_2.12" rev="0.1.2">
  <artifact name="jbuildinfo_2.12" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.carueda', module='jbuildinfo_2.12', version='0.1.2')
)
libraryDependencies += "com.github.carueda" % "jbuildinfo_2.12" % "0.1.2"
[com.github.carueda/jbuildinfo_2.12 "0.1.2"]

Dependencies

compile (2)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.12.2
com.lihaoyi : mill-scalalib_2.12 jar 0.5.1

Project Modules

There are no modules declared in this project.

JBuildInfo

This is a mill module similar to BuildInfo but for Java. It will generate a Java class containing information from your build.

Project home: https://github.com/carueda/mill-jbuildinfo

To declare a module that uses this plugin, extend the com.github.carueda.mill.JBuildInfo trait and provide the desired information via the buildInfoMembers method:

// build.sc
import $ivy.`com.github.carueda::jbuildinfo:0.1.2`
import com.github.carueda.mill.JBuildInfo
import mill.T

object project extends JBuildInfo {
  def buildInfoMembers: T[Map[String, String]] = T {
    Map(
      "name" -> "some name",
      "version" -> "x.y.z"
    )
  }
}

This will generate:

// BuildInfo.java
public class BuildInfo {
  public static final String getName() { return "some name"; }
  public static final String getVersion() { return "x.y.z"; }
}

Configuration options

  • def buildInfoMembers: T[Map[String, String]]

    The map containing all member names and values for the generated class.

  • def buildInfoClassName: String, default: BuildInfo

    The name of the class that will contain all the members from buildInfoMembers.

  • def buildInfoPackageName: Option[String], default: None

    The package name for the generated class.

Versions

Version
0.1.2
0.1.1
0.1.0