5

I have a multi-module, mono repo style SBT project that uses 64-bit java that we use IntelliJ to develop. At the root of the project we have a build.sbt file that imports subprojects. We recently introduced a new module that has a dll dependency that requires 32-bit java.

As I understand it, our base build.sbt is being treated as a single module. I'd like to be able to treat it as two different modules, and specify 32/64 bit jdk in my run configurations, but I don't see a way to do that.

Alternatively I'd like to be able to invoke sbt to build from the subproject build.sbt rather than the root build.sbt, but I don't see a way to do that, either.

Right now I'm swapping between SDKs when I need to run different submodules, which isn't terrible but is a little janky. I just want to check to here to see if I'm missing something.

canisrufus
  • 665
  • 2
  • 6
  • 19

1 Answers1

1

I only used this on x64 but You are able to use the following:

https://www.jetbrains.com/help/idea/2016.2/configuring-global-project-and-module-sdks.html#module_sdk

Hash
  • 4,647
  • 5
  • 21
  • 39
  • The problem with this is that from intellij's perspective, it's actually only building one module. When I want to build a particular subproject, I make an SBT task that is something like "run/web" or "run/engine", where web or engine are defined in my build.sbt. Intellij treats them all as one module with one sdk – canisrufus Jul 26 '16 at 17:58
  • If you imprted the whole project as one module into Idea, You'll not be able to achieve your goal. The projects need to be separated by modules. In this case you can create an own build sequence. (With and without sbt.) – Hash Jul 28 '16 at 08:27