From 7c75abb2da251ae85de0bf17ed311cf3b1b57ea3 Mon Sep 17 00:00:00 2001 From: Tobias Roeser Date: Tue, 24 Sep 2019 12:41:06 +0200 Subject: Restored alphabetical order of modules --- docs/pages/10 - Thirdparty Modules.md | 109 +++++++++++++++++----------------- 1 file changed, 55 insertions(+), 54 deletions(-) diff --git a/docs/pages/10 - Thirdparty Modules.md b/docs/pages/10 - Thirdparty Modules.md index a6b87b81..0267f5cc 100644 --- a/docs/pages/10 - Thirdparty Modules.md +++ b/docs/pages/10 - Thirdparty Modules.md @@ -232,6 +232,61 @@ Start a local Web-Server on Port 8820 with the generated site: bash> mill site.jbakeServe ``` +## JBuildInfo + +This is a [mill](https://www.lihaoyi.com/mill/) module similar to +[BuildInfo](https://www.lihaoyi.com/mill/page/contrib-modules.html#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: + +```scala +// 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: + +```java +// 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. + + ## Mill Wrapper Scripts Small script to automatically fetch and execute mill build tool. @@ -351,57 +406,3 @@ Publishing to custom local Maven repository [40/40] project.publishM2Local Publishing to /tmp/m2repo ``` - -## JBuildInfo - -This is a [mill](https://www.lihaoyi.com/mill/) module similar to -[BuildInfo](https://www.lihaoyi.com/mill/page/contrib-modules.html#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: - -```scala -// 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: - -```java -// 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. -- cgit v1.2.3