sbt/sbt-scalabuff

ScalaBuffPlugin is not a member of sbt.TaskKey[Seq[java.io.File]]

Opened this issue · 7 comments

With following configuration,

build.sbt

import scalabuff.ScalaBuffPlugin._


object build extends Build {
   lazy val root = Project("main", file("."), settings = Defaults.defaultSettings ++ scalabuffSettings).configs(ScalaBuff)
}

project/plugins.sbt

//sbt-scalabuff
addSbtPlugin("com.github.sbt" %% "sbt-scalabuff" % "0.2")

I am getting following 'not a member of sbt.TaskKey' error :

$ ./sbt 
[info] Loading project definition from /home/prayagupd/hacker_/moonmarket-sbt/project
/home/prayagupd/hacker_/moonmarket-sbt/build.sbt:2: error: value ScalaBuffPlugin is not a member of sbt.TaskKey[Seq[java.io.File]]
import scalabuff.ScalaBuffPlugin._
                 ^

That should be placed in project/Build.scala

@jilen: What do you mean by "that"??? Are you referring to @iPrayag's build.sbt snippet or plugins.sbt??

@pathikrit

import scalabuff.ScalaBuffPlugin._


object build extends Build {
   lazy val root = Project("main", file("."), settings = Defaults.defaultSettings ++ scalabuffSettings).configs(ScalaBuff)
}

I mean this

I did this and I am still getting same error. I am using Play 2.2.3 with sbt 0.13.2 and this is a snippet from my Build.scala:

lazy val mainProject = Project(
    id="main",
    base=file("."),
    settings = (Project.defaultSettings ++ Seq(
      migrate <<= merlin2GandalfTask,
      slick <<= slickCodeGenTask,
      sourceGenerators in Compile <+= slickCodeGenTask // register automatic code generation on every compile, remove for only manual use
    ) ++ scalabuffSettings)
  ).dependsOn(dbGen, merlin2Gandalf, ScalaBuff)

What sbt version do you use?

@pathikrit 0.13.2