Reputation: 10581
I have a gradle project written in Java and want to turn the whole thing into a scala project (still gradle). Which steps are necessary to do so?
Since java code should be fully supported in scala, this shouldn't be to hard. I tried it, but I cannot write scala code within my code now.
I started defining the main method in scala and it seems like Intellij has no idea what I try to do.
What I did so far:
There is no compile error if I let the code as it is right now.
Upvotes: 3
Views: 2048
Reputation: 170919
First, try if it compiles in Gradle from command line (gradle compile
). Based on what you say, it should; if it doesn't, fix this first.
If it does, add Scala plugin in IDEA (if it isn't already installed) and you may need to activate Scala support explicitly as mentioned in @0__'s comment.
Upvotes: 0
Reputation: 6395
As I understand you have issues with compiling scala code witnin new project (rec-imported).
Do you have scala-library as dependency in your project? If not, you can add Global library to Project structure.
Upvotes: 1