Skip to content
This repository has been archived by the owner on Oct 26, 2022. It is now read-only.

Exclude source files from gwt build that are located inside a jar file #42

Closed
porst17 opened this issue Jul 1, 2014 · 2 comments
Closed

Comments

@porst17
Copy link

porst17 commented Jul 1, 2014

I read #23, #33 and #39 to find out how I can add dependent sources which are located inside a jar file. But unfortunately, this is not a pure gwt-based library, i.e. there are classes which have various other (binary) dependencies.

Of course, my project only relies on the source files inside the library which do not need anything besides gwt and Eclipse seems to be able to figure that out at build time and compiles only what's needed. Using gradle and your plugin (thanks a lot!), it seems that all source files available in the class path are compiled, which of course leads to errors like

[ERROR] Line xxx: No source code is available for type xxx.xxxx.XXXXX; did you forget to inherit a required module?

Is it possible to exclude some of the files contained in the jar from the gwt build? I fiddled around with http://forums.gradle.org/gradle/topics/how_can_i_configure_certain_java_files_not_to_be_compiled, but since the problem is not related to one of my source files but to a file inside a dependency, I couldn't get it to work.

@tbroyer
Copy link

tbroyer commented Jul 12, 2014

These errors come from GWT, and it scans the whole classpath for sources matching the "source path".
That means the plugin can't do anything about it, and you have to exclude the offending sources from the source path within a .gwt.xml file.

@porst17
Copy link
Author

porst17 commented Jul 14, 2014

Ok, thanks. I will dig into .gwt.xml configuration.

Just as a comment: Wouldn't it be good to be able to provide the .gwt.xml information directly within the build.gradle file (in gradle syntax, not XML)? Otherwise you have most of the information for your GWT build located inside the .gwt.xml, i.e. you have actually to build files: the build.gradle file and the .gwt.xml file. Maybe is worth discussing this in a separate issue

@porst17 porst17 closed this as completed Jul 14, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants