Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ lazy val sharedSettings: Seq[Setting[_]] = Seq(
organization := "org.duhemm",
resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots",
libraryDependencies += "org.scalameta" %% "scalameta" % "1.6.0",
libraryDependencies <+= (scalaVersion)("org.scala-lang" % "scala-reflect" % _),
libraryDependencies += (scalaVersion)("org.scala-lang" % "scala-reflect" % _).value,
scalaHome := sys.props get scalaHomeProperty map file
) ++ bintraySettings

Expand All @@ -36,7 +36,7 @@ lazy val testSettings: Seq[Setting[_]] = Seq(
val pluginJarName = "fat-plugin.jar"

lazy val usePluginSettings = Seq(
scalacOptions in Compile <++= (Keys.`package` in (plugin, Compile)) map { (jar: File) =>
scalacOptions in Compile ++= ((Keys.`package` in (plugin, Compile)) map { (jar: File) =>
val fatJar = file(jar.getParent + "/" + pluginJarName)
System.setProperty("sbt.paths.plugin.jar", fatJar.getAbsolutePath)
val addPlugin = "-Xplugin:" + fatJar.getAbsolutePath
Expand All @@ -45,7 +45,7 @@ lazy val usePluginSettings = Seq(
// main after editing the plugin. (Otherwise a 'clean' is needed.)
val dummy = "-Jdummy=" + fatJar.lastModified
Seq(addPlugin, dummy)
}
}).value
)

val duplicatedFiles = Set(
Expand All @@ -60,8 +60,8 @@ lazy val plugin: Project =
) settings (
addCompilerPlugin(
"org.scalamacros" % "paradise" % "2.1.0" cross CrossVersion.full),
libraryDependencies <+=
(scalaVersion)("org.scala-lang" % "scala-compiler" % _ % "provided"),
libraryDependencies +=
(scalaVersion)("org.scala-lang" % "scala-compiler" % _ % "provided").value,
libraryDependencies +=
"org.scalameta" % "scalahost" % "1.6.0" cross CrossVersion.full,
assemblyOption in assembly := (assemblyOption in assembly).value.copy(includeScala = false, includeDependency = true),
Expand All @@ -75,8 +75,8 @@ lazy val plugin: Project =
// Produce a fat jar containing dependencies of the plugin after compilation. This is required because the plugin
// depends on scala.meta, which must therefore be available when the plugin is run.
// It looks like this task is defined in the wrong order (assembly and then compilation), but it seems to work fine.
compile <<= (compile in Compile) dependsOn assembly,
resourceDirectory in Compile <<= baseDirectory(_ / "src" / "main" / "scala" / "org" / "duhemm" / "parsermacro" / "embedded"),
compile := ((compile in Compile) dependsOn assembly).value,
resourceDirectory in Compile := baseDirectory(_ / "src" / "main" / "scala" / "org" / "duhemm" / "parsermacro" / "embedded").value,
initialCommands in console := """
import scala.meta._
import scala.meta.dialects.Scala211
Expand All @@ -103,21 +103,21 @@ lazy val sandboxMacros: Project =
sharedSettings ++ usePluginSettings: _*
) settings (
publishArtifact in Compile := false,
compile <<= (compile in Compile)
compile := (compile in Compile).value
)

lazy val sandboxClients =
(project in file("sandbox-clients")) settings (
sharedSettings ++ usePluginSettings: _*
) settings (
// Always clean before running compile in this subproject
compile <<= (compile in Compile) dependsOn clean,
compile := ((compile in Compile) dependsOn clean).value,
scalacOptions ++= Seq("-Ymacro-debug-verbose")
) dependsOn sandboxMacros

lazy val tests =
(project in file("tests")) settings (
sharedSettings ++ usePluginSettings ++ testSettings: _*
) settings (
libraryDependencies <+= (scalaVersion)("org.scala-lang" % "scala-compiler" % _)
libraryDependencies += (scalaVersion)("org.scala-lang" % "scala-compiler" % _).value
) dependsOn plugin
1 change: 1 addition & 0 deletions project/bintray.sbt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
addSbtPlugin("me.lessis" % "bintray-sbt" % "0.3.0")
// addSbtPlugin("ch.epfl.scala" % "sbt-migrator" % "0.1.0-SNAPSHOT")
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=0.13.9
sbt.version=0.13.15