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:
./build.sbt./project/build.sbt
Comments
Post a Comment