i've used sbt-eclipse in past import simple sbt project eclipse. i'm trying leverage crossproject mechanism of sbt use scala-js environment (makes 2 subprojects in sbt--one javascript , 1 jvm code). recommendation (see sbt docs link here) add setting 'eclipsekeys.useprojectid := true' in build.sbt file support importing (now) 2 projects 1 eclipse project. give 'eclipse' command in running sbt session create eclipse project , launch eclipse , attempt import new project. when this, import dialog wizard in eclipse show me 2 sub-projects, when try finish import, eclipse complains project exists , 2 strange looking links in eclipse project seem nothing.
what correct procedure getting crossproject sbt build eclipse?
ok, seems eclipse did not had 1 'name' project in shared settings area of build.sbt had this:
lazy val sp = crossproject.in(file(".")). settings( version := "0.1", name := "sjstut", scalaversion := "2.11.7" ). jvmsettings( // add jvm-specific settings here librarydependencies ++= seq(...) ). jssettings( // add js-specific settings here librarydependencies ++= seq(...) ) and should have done this:
lazy val sp = crossproject.in(file(".")). settings( version := "0.1", scalaversion := "2.11.7" ). jvmsettings( // add jvm-specific settings here name := "sjstutjvm", librarydependencies ++= seq(...) ). jssettings( // add js-specific settings here name := "sjstutjs", librarydependencies ++= seq(...) ) note removal of 'name' assignment settings , instead, placements both jvmsettings , jssettings area uniquely different names.
now i'm able pull eclipse (as 2 separate projects). if else has better setup, i'd love hear it.
Comments
Post a Comment