Scala Working With Gradle
1.Create a file named SCALA_PROJECT/build.gradle with these contents:
2. Run gradle tasks to see available tasks.
3. Run gradle create-dirs to create a src/scala, src/resources directory.
4. Run gradle build to build the project and download dependencies.
Create your own Gradle Scala plugin
After going through the Basic Setup example, you may find yourself repeating most part of it in every single Scala Gradle project. Smells like boilerplate code...
What if, instead of applying the Scala plugin offered by Gradle, you could apply your own Scala plugin, which would be responsible for handling all your common build logic, extending, at the same time, the already existing plugin.
This example is going to transform the previous build logic into a reusable Gradle plugin.
Luckyly, in Gradle, you can easily write custom plugins with the help of the Gradle API, as outlined in the documentation. As language of implementation, you can use Scala itself or even Java.