mirror of https://github.com/sbt/sbt.git
Mark compiler-project/macro-config pending
This commit is contained in:
parent
170685f4e1
commit
ae93e6cb47
|
|
@ -1,27 +1,33 @@
|
|||
// Defines "macro" configuration.
|
||||
// By default, this includes the dependencies of the normal sources.
|
||||
// Drop the `extend(Compile)` to include no dependencies (not even scala-library) by default.
|
||||
lazy val Macro = config("macro").hide.extend(Compile)
|
||||
val Macro = config("macro").hide.extend(Compile)
|
||||
|
||||
// Adds a "macro" configuration for macro dependencies.
|
||||
ivyConfigurations += Macro
|
||||
lazy val root = (project in file("."))
|
||||
.settings(
|
||||
scalaVersion := "2.12.2",
|
||||
|
||||
// add the compiler as a dependency for src/macro/
|
||||
libraryDependencies +=
|
||||
scalaVersion("org.scala-lang" % "scala-compiler" % _ % Macro).value
|
||||
// Adds a "macro" configuration for macro dependencies.
|
||||
ivyConfigurations.value += Macro,
|
||||
|
||||
// adds standard compile, console, package tasks for src/macro/
|
||||
inConfig(Macro)(Defaults.configSettings)
|
||||
// add the compiler as a dependency for src/macro/
|
||||
libraryDependencies += {
|
||||
"org.scala-lang" % "scala-compiler" % scalaVersion.value % Macro
|
||||
},
|
||||
|
||||
// puts the compiled macro on the classpath for the main sources
|
||||
unmanagedClasspath in Compile ++=
|
||||
(fullClasspath in Macro).value
|
||||
// adds standard compile, console, package tasks for src/macro/
|
||||
inConfig(Macro)(Defaults.configSettings),
|
||||
|
||||
// includes sources in src/macro/ in the main source package
|
||||
mappings in (Compile, packageSrc) ++=
|
||||
(mappings in (Macro, packageSrc)).value
|
||||
// puts the compiled macro on the classpath for the main sources
|
||||
unmanagedClasspath in Compile ++=
|
||||
(fullClasspath in Macro).value,
|
||||
|
||||
// Includes classes compiled from src/macro/ in the main binary
|
||||
// This can be omitted if the classes in src/macro/ aren't used at runtime
|
||||
mappings in (Compile, packageBin) ++=
|
||||
(mappings in (Macro, packageBin)).value
|
||||
// includes sources in src/macro/ in the main source package
|
||||
mappings in (Compile, packageSrc) ++=
|
||||
(mappings in (Macro, packageSrc)).value,
|
||||
|
||||
// Includes classes compiled from src/macro/ in the main binary
|
||||
// This can be omitted if the classes in src/macro/ aren't used at runtime
|
||||
mappings in (Compile, packageBin) ++=
|
||||
(mappings in (Macro, packageBin)).value
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in New Issue