jiakuan / gwt-gradle-plugin

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

Outputs of compileGwt task are polluted #36

Closed evpaassen closed 4 years ago

evpaassen commented 4 years ago

Since #32 / #33 have been fixed, the outputs of the compileGwt task include the work and cache dirs. This leads to a polluted build artifact (jar/war) when these outputs used to package it, as the documentation shows:

apply plugin: 'war'

war {
    from project(':compile-only').tasks.compileGwt.outputs
}

The unit cache can grow quite large. In my case it added more than 100MB to the jar.

And furthermore, because the -extra and -gen parameters are set by default, the contents of the build/gwt/extra and build/gwt/gen directories are also included. These parameters should be optional, I think. These directories do belong to the outputs of the task, but should not be included in the build artifact by default. If these parameters are omitted, the directories are never created and the problem is solved.

I'll create a PR to solve the issues.