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.
|
// Defines "macro" configuration.
|
||||||
// By default, this includes the dependencies of the normal sources.
|
// By default, this includes the dependencies of the normal sources.
|
||||||
// Drop the `extend(Compile)` to include no dependencies (not even scala-library) by default.
|
// 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.
|
lazy val root = (project in file("."))
|
||||||
ivyConfigurations += Macro
|
.settings(
|
||||||
|
scalaVersion := "2.12.2",
|
||||||
|
|
||||||
// add the compiler as a dependency for src/macro/
|
// Adds a "macro" configuration for macro dependencies.
|
||||||
libraryDependencies +=
|
ivyConfigurations.value += Macro,
|
||||||
scalaVersion("org.scala-lang" % "scala-compiler" % _ % Macro).value
|
|
||||||
|
|
||||||
// adds standard compile, console, package tasks for src/macro/
|
// add the compiler as a dependency for src/macro/
|
||||||
inConfig(Macro)(Defaults.configSettings)
|
libraryDependencies += {
|
||||||
|
"org.scala-lang" % "scala-compiler" % scalaVersion.value % Macro
|
||||||
|
},
|
||||||
|
|
||||||
// puts the compiled macro on the classpath for the main sources
|
// adds standard compile, console, package tasks for src/macro/
|
||||||
unmanagedClasspath in Compile ++=
|
inConfig(Macro)(Defaults.configSettings),
|
||||||
(fullClasspath in Macro).value
|
|
||||||
|
|
||||||
// includes sources in src/macro/ in the main source package
|
// puts the compiled macro on the classpath for the main sources
|
||||||
mappings in (Compile, packageSrc) ++=
|
unmanagedClasspath in Compile ++=
|
||||||
(mappings in (Macro, packageSrc)).value
|
(fullClasspath in Macro).value,
|
||||||
|
|
||||||
// Includes classes compiled from src/macro/ in the main binary
|
// includes sources in src/macro/ in the main source package
|
||||||
// This can be omitted if the classes in src/macro/ aren't used at runtime
|
mappings in (Compile, packageSrc) ++=
|
||||||
mappings in (Compile, packageBin) ++=
|
(mappings in (Macro, packageSrc)).value,
|
||||||
(mappings in (Macro, packageBin)).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