Keith Pinson
Keith Pinson

Reputation: 7995

Is there a way to use the Scala 3 compiler (Dotty) from Gradle yet?

I am new to both Gradle and Dotty (and still relatively new to Scala overall). I was able to create a Scala project with Gradle like this:

gradle init --dsl kotlin --type scala-library --package com.stackoverflow.example

and I know that Dotty can be used with SBT. But is there a way to wire up Dotty with Gradle (yet)?

Upvotes: 6

Views: 1305

Answers (1)

Alex
Alex

Reputation: 7926

There’s dotty examples repository with demonstrations of how to build dotty with various build tools including gradle.

https://github.com/michelou/dotty-examples/blob/master/examples/dotty-example-project/build.gradle

As you can see there’s nothing standard yet, but when there will be, I believe maintainers will update this repo.

In my personal project I did something similar to this with some simplifications:

https://github.com/SimY4/xpath-to-xml/blob/master/xpath-to-xml-scala/build-3.gradle

Upvotes: 3

Related Questions