This does not work: (gwtCompile in ...) <<= (gwtCompile in ...).dependsOn(compile in Compile)

14 views
Skip to first unread message

Dmitry Grigoriev

unread,
Oct 11, 2013, 5:15:27 PM10/11/13
to simple-b...@googlegroups.com
Hello all.

Please help. I don't know GWT at all, I'm just trying to migrate my company's project from maven to sbt. Using https://github.com/thunderklaus/sbt-gwt-plugin, but since that project does not have its own mailing list, I'm asking here. Anyway problem looks like not plugin-specific, more likely I misunderstand something. Plugin source code is: https://github.com/thunderklaus/sbt-gwt-plugin/blob/master/src/main/scala/GwtPlugin.scala

The problem is: some GWT-specific annotations in subproject reference classes from same subproject, so I need to 'compile' before 'gwtCompile'. When I run both commands manually, everything's fine. But if I specify
    (gwtCompile in Gwt) <<= (gwtCompile in Gwt).dependsOn(compile in Compile)
or
   (gwtCompile in Compile) <<= (gwtCompile in Compile).dependsOn(compile in Compile)
then running gwtCompile does not run compile automatically.

What do I do wrong?

---------

A bit more detail what I do in my project file:
    private val myGWTSettings = gwtSettings ++ Seq(
        gwtVersion := lib.version.gwt,
        gwtTemporaryPath <<= (sourceDirectory) { _ / "main" / "webapp" },  // they version compiled permutations
        libraryDependencies += lib.`guava-gwt`,  // without this dependency, gwtCompile cannot find Base.gwt.xml
        (gwtCompile in Gwt) <<= (gwtCompile in Gwt).dependsOn(compile in Compile)
    )

    lazy val my_webapp = Project(...) settings(...) settings(myGWTSettings :_*) dependsOn(...)

In sbt:
project my_webapp
gwtCompile

Dmitry Grigoriev

unread,
Oct 11, 2013, 8:54:03 PM10/11/13
to simple-b...@googlegroups.com
Solved: gwtCompile <<= gwtCompile.dependsOn(compile in Compile).
Reply all
Reply to author
Forward
0 new messages