-2

I know there are ways to integrate scala into a java project if we are using maven. If you are using maven, you can refer the link below Integrating Scala into an existing project in Java

But can we do it using gradle?

You can see that java and scala classes coexist within the same package

1 Answers1

0

See https://docs.gradle.org/current/userguide/scala_plugin.html. There's no difference between integrating Scala into an existing Gradle project or a new one.

Of course, some plugins or code in the build may not expect to deal with Scala code, or even an extra source directory (if they are badly written). But without seeing the build files, it's hard to say any more.

Alexey Romanov
  • 167,066
  • 35
  • 309
  • 487