lgrignon / jsweet-gradle-plugin

Brings the power of JSweet to Gradle
Apache License 2.0
17 stars 15 forks source link

Custom input directory #34

Open schwichti opened 2 years ago

schwichti commented 2 years ago

Hi,

in my project I am using Xtend source files that are in the directory src. The Xtend files are transcompiled to Java and stored in build/xtend/main. Can I configure the jsweet-gradle-plugin that it uses Java files from that folder? I see the following error message:

Execution failed for task ':jsweet'.
> java.lang.IllegalStateException: basedir src\main\java does not exist
lgrignon commented 2 years ago

Hi,

It's not properly documented, but you can specify another source set: https://github.com/lgrignon/jsweet-gradle-plugin/blob/master/src/main/java/org/jsweet/gradle/JSweetPlugin.java#L50

If it works, could you please create a PR to enhance README for this aspect? Or at least post here your build.gradle to show an example of a working case of alternative source set :)

I hope it will work for you! Bye