scala - How can I use a library dependency in the definition of an sbt task? -


i defining sbt task needs call code in library. here build.sbt file i've tried far:

librarydependencies ++= seq("com.some.company" %% "some-lib" % "1.0.0")  val dosomething = taskkey[unit]("does something")  dosomething := {   import com.some.company.function   function() } 

the imports not work. how define task depends on code in external library?

to build .sbt file in root directory, sbt uses information in project directory. put build.sbt in project directory , set librarydependencies key there:

librarydependencies ++= seq("com.some.company" %% "some-lib" % "1.0.0") 

so, clarify, have 2 build.sbt files:

  1. ./build.sbt
  2. ./project/build.sbt

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -