You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lazy val extraClassPathTask = TaskKey[String]("extraClassPath")
// Requires luaBackendCore and lmsBackendLinAlg to be compiled but not on classpath,
// to demonstrate plugin system
lazy val examples = Project("scalan-examples", file("examples")).
dependsOn(core % "compile->compile;test->test;it->test", linalg).configs(IntegrationTest).settings(itSettings).
enablePlugins(BuildInfoPlugin).settings(
buildInfoKeys := Seq(extraClassPathTask),
buildInfoRenderer := ConfBuildInfoRenderer(buildInfoOptions.value)
)
extraClassPathTask in examples := ...
ConfBuildInfoRenderer is
import sbtbuildinfo._
case class ConfBuildInfoRenderer(options: Seq[BuildInfoOption]) extends BuildInfoRenderer {
def fileType = BuildInfoType.Resource
def extension = "conf"
def header = Nil
def footer = Nil
// TODO any other needed types
def render(result: BuildInfoResult) = {
val rhs = result.typeExpr match {
case TypeExpression("String", Nil) =>
"\"" + result.value.toString + "\""
case _ =>
result.value.toString
}
s"""${result.identifier}=$rhs"""
}
def renderKeys(infoKeysNameAndValues: Seq[BuildInfoResult]): Seq[String] = infoKeysNameAndValues.map(render)
}
and show scalan-examples/buildInfoRenderer shows [info] ConfBuildInfoRenderer(List()).
However, I still get src_managed/main/sbt-buildinfo/BuildInfo.scala instead of expected resource_managed/sbt-buildinfo/BuildInfo.conf.
In
build.sbt
I haveConfBuildInfoRenderer
isand
show scalan-examples/buildInfoRenderer
shows[info] ConfBuildInfoRenderer(List())
.However, I still get
src_managed/main/sbt-buildinfo/BuildInfo.scala
instead of expectedresource_managed/sbt-buildinfo/BuildInfo.conf
.You can see the full build.sbt at https://github.com/scalan/scalan/blob/fc8fdd33d8a086ee776fba0429416252aea6ae17/build.sbt. Am I missing something? Plugin version is 0.6.1.
The text was updated successfully, but these errors were encountered: