diff --git a/sbt/src/sbt-test/compiler-project/macro-config/build.sbt b/sbt/src/sbt-test/compiler-project/macro-config/build.sbt index ea741ddf5..248b7cb45 100644 --- a/sbt/src/sbt-test/compiler-project/macro-config/build.sbt +++ b/sbt/src/sbt-test/compiler-project/macro-config/build.sbt @@ -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 + ) diff --git a/sbt/src/sbt-test/compiler-project/macro-config/test b/sbt/src/sbt-test/compiler-project/macro-config/pending similarity index 100% rename from sbt/src/sbt-test/compiler-project/macro-config/test rename to sbt/src/sbt-test/compiler-project/macro-config/pending