How to automatically compile Scala source when running a JUnit test?

Answered

Hi, I just installed IDEA 2018.1 on a virtual machine. I have a gradle code base that is dependent on a scala module.

On my local machine, also running IDEA 2018.1, if I run a unit test that has Scala code, it will compile the Scala code if changed, then compiles and runs the unit test.

But the same is not happening on the new installation. Instead it gives compile errors for the Scala objects, saying cannot find symbol.

Can you please advise? How can I get IDEA to compile the Scala before building and running the unit test?

0
1 comment

When you launch Run/Debug Configuration it firstly performs actions, specified in Before launch section of Run/Debug Configuration. For IDE to make all project before you launch configuration, there should be a Make step added.

0

Please sign in to leave a comment.