Re: [sbt] Concatenating ModuleID in Sbt 0.11.2

391 views
Skip to first unread message

Doug Tangren

unread,
Aug 6, 2012, 9:32:49 AM8/6/12
to simple-b...@googlegroups.com


On Mon, Aug 6, 2012 at 9:22 AM, edmondo1984 <edmond...@gmail.com> wrote:
Dear all,
I have defined a SettingKey inside my Build.scala and I try to do the following:



name := "Web-common"

version := "0.1-SNAPSHOT"

playVersion in ThisBuild := "2.0.2"

libraryDependencies <++=  (playVersion) { v => "play" %% "play" % v }

libraryDependencies <++=  (playVersion) { v => "play" %% "play-test" % v % "test" }


your functions are return ModuleID not Seq[ModuleID]. Remove one "+" from your bindings. From "<++=" to "<+=".


Martin Grigorov

unread,
Aug 6, 2012, 10:00:57 AM8/6/12
to simple-b...@googlegroups.com
On Mon, Aug 6, 2012 at 4:22 PM, edmondo1984 <edmond...@gmail.com> wrote:
> Dear all,
> I have defined a SettingKey inside my Build.scala and I try to do the
> following:
>
>
>
> name := "Web-common"
>
> version := "0.1-SNAPSHOT"
>
> playVersion in ThisBuild := "2.0.2"
>
> libraryDependencies <++= (playVersion) { v => "play" %% "play" % v }

I think you miss the 'map' call: (playVersion) map { v => "play" %% "play" % v }

I am not sure about the usage of <++=, I think it should be <<+=, but
it could be that I'm wrong. The DSL is quite confusing unless you
write SBT code every day.

>
> libraryDependencies <++= (playVersion) { v => "play" %% "play-test" % v %
> "test" }
>
> However this fails:
>
> [info] Loading project definition from G:\GottwareWeb\modules\common\project
> G:\GottwareWeb\modules\common\build.sbt:9: error: No implicit for
> Append.Values[Seq[sbt.ModuleID], sbt.ModuleID] found,
> so sbt.ModuleID cannot be appended to Seq[sbt.ModuleID]
> libraryDependencies <++= (playVersion) { v => "play" %% "play" % v }
>
> where am I wrong?
>
> Best Regards
>
> --
> You received this message because you are subscribed to the Google Groups
> "simple-build-tool" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/simple-build-tool/-/6B5ltSuETcsJ.
> To post to this group, send email to simple-b...@googlegroups.com.
> To unsubscribe from this group, send email to
> simple-build-t...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/simple-build-tool?hl=en.
Reply all
Reply to author
Forward
0 new messages