object MacroParameters
These helpers allow you to save various build-time properties defined by Scala 2
-Xmacro-settings
commandline argument.
Add the following properties into your build.sbt
to make this work:
scalacOptions ++= Seq( s"-Xmacro-settings:product-version=${version.value}", s"-Xmacro-settings:product-group=${organization.value}", s"-Xmacro-settings:product-name=${name.value}", s"-Xmacro-settings:sbt-version=${sbtVersion.value}", s"-Xmacro-settings:scala-versions=${crossScalaVersions.value.mkString(":")}", s"-Xmacro-settings:scalatest-version=${V.scalatest}", s"-Xmacro-settings:git-repo-clean=${gitUncommittedChanges.value}", s"-Xmacro-settings:git-branch=${gitCurrentBranch.value}", s"-Xmacro-settings:is-ci=${insideCI.value}", )
Git snippets:
gitDescribedVersion.value.map(v => s"-Xmacro-settings:git-described-version=$v"), gitHeadCommit.value.map(v => s"-Xmacro-settings:git-head-commit=$v"),
Or
s"-Xmacro-settings:git-described-version=${gitDescribedVersion.value.getOrElse("")}", s"-Xmacro-settings:git-head-commit=${gitHeadCommit.value.getOrElse("")}",
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- MacroParameters
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- macro def artifactName(): Option[String]
- macro def artifactVersion(): Option[String]
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- macro def gitBranch(): Option[String]
- macro def gitDescribedVersion(): Option[String]
- macro def gitHeadCommit(): Option[String]
- macro def gitRepoClean(): Option[Boolean]
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- macro def macroSetting(name: String): Option[String]
- macro def macroSettingBool(name: String): Option[Boolean]
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- macro def projectGroupId(): Option[String]
- macro def sbtIsInsideCI(): Option[Boolean]
- macro def sbtVersion(): Option[String]
- macro def scalaCrossVersions(): Option[String]
- macro def scalaVersion(): Option[String]
- macro def scalatestVersion(): Option[String]
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()