Skip to content

Instantly share code, notes, and snippets.

@pedrofurla
Last active December 20, 2015 14:39
Show Gist options
  • Select an option

  • Save pedrofurla/6147883 to your computer and use it in GitHub Desktop.

Select an option

Save pedrofurla/6147883 to your computer and use it in GitHub Desktop.
Transforming a project setting
source:
lazy val sxr = scalaz.configure{
p =>
Project(
id=p.id+"-sxr",
base = file("."),
settings = p.settings ++
Seq(
addCompilerPlugin("org.scala-sbt.sxr" % "sxr_2.10" % "0.3.0-SNAPSHOT"),
scalacOptions <+= scalaSource in Compile map { _ => "-P:sxr:base-directory:" + file(".").getAbsolutePath }
)
)
}
Notes:
scalaz:Project
Project.configure : Project => Project
Current workaround: p.asInstanceOf[ProjectDefinition[_]].settings ...
Error:
/scalaz/project/build.scala:171: ambiguous reference to overloaded definition,
[error] both method settings in trait Project of type (ss: sbt.Def.Setting[_]*)sbt.Project
[error] and method settings in trait ProjectDefinition of type => Seq[sbt.Def.Setting[_]]
[error] match expected type ?
[error] settings = p.settings ++
[error] ^
Which is line 8 here.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment