gwt-gradle-plugin icon indicating copy to clipboard operation
gwt-gradle-plugin copied to clipboard

Cannot set jsInteropExports when using Draft mode

Open psimonazzi opened this issue 3 years ago • 3 comments

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
    }
}

psimonazzi avatar Jan 28 '22 14:01 psimonazzi

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: @.***>

jiakuan avatar Jan 29 '22 00:01 jiakuan

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

psimonazzi avatar Feb 09 '22 08:02 psimonazzi

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.

jiakuan avatar Feb 13 '22 00:02 jiakuan