Packages

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
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MacroParameters
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. macro def artifactName(): Option[String]
  5. macro def artifactVersion(): Option[String]
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  11. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. macro def gitBranch(): Option[String]
  13. macro def gitDescribedVersion(): Option[String]
  14. macro def gitHeadCommit(): Option[String]
  15. macro def gitRepoClean(): Option[Boolean]
  16. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  17. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  18. macro def macroSetting(name: String): Option[String]
  19. macro def macroSettingBool(name: String): Option[Boolean]
  20. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  21. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  22. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  23. macro def projectGroupId(): Option[String]
  24. macro def sbtIsInsideCI(): Option[Boolean]
  25. macro def sbtVersion(): Option[String]
  26. macro def scalaCrossVersions(): Option[String]
  27. macro def scalaVersion(): Option[String]
  28. macro def scalatestVersion(): Option[String]
  29. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  30. def toString(): String
    Definition Classes
    AnyRef → Any
  31. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  32. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  33. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped