jiakuan / gwt-gradle-plugin

Gradle plugin to support GWT related tasks.
https://gwt-gradle.docstr.org
Other
63 stars 34 forks source link

Cannot set jsInteropExports when using Draft mode #56

Open psimonazzi opened 2 years ago

psimonazzi commented 2 years ago

It seems impossible to enable jsInteropExport together with Draft mode (not sure if it is a limitation also of the GWT compiler). Options for jsInteropExports can be set only in the gwt extension, not in draftCompileGwt.

gwt {
    // works correctly
    jsInteropExports {
        shouldGenerate = true
    }
}

draftCompileGwt {
    // compiler error
    jsInteropExports {
        shouldGenerate = true
    }
}
jiakuan commented 2 years ago

You can try run the GWT compiler manually via “java -jar” with jsInteropExport in draft mode and see if it works.

If it works, then something needs to be improved in the plugin.

On Fri, 28 Jan 2022 at 10:42 pm, psimonazzi @.***> wrote:

It seems impossible to enable jsInteropExport together with Draft mode (not sure if it is a limitation also of the GWT compiler). Options for jsInteropExports can be set only in the gwt extension, not in draftCompileGwt.

gwt { // works correctly jsInteropExports { shouldGenerate = true } }

draftCompileGwt { // compiler error jsInteropExports { shouldGenerate = true } }

— Reply to this email directly, view it on GitHub https://github.com/jiakuan/gwt-gradle-plugin/issues/56, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAECF5ABABK3TVEQKPLUWB3UYKTMZANCNFSM5NA5ZTSQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

psimonazzi commented 2 years ago

The GWT compiler seems to work with these options, so it could be allowed in the plugin too.

jiakuan commented 2 years ago

Thanks for checking this. If you could dig in the plugin code and create a pull request (should be not hard), that'd the quickest way. Or, I will have a look when I have a chance.