The war output directory is treated as an optional exec argument, but it's a required task property in AbstractGwtTask. I think it was originally meant to be optional because it's added as an argument with dirArgIfSet. Since it's required, we have to set the war property on checkGwt in order to run that task.
tasks.named('checkGwt').configure {
// The GWT plugin requires a configured value for this property even though it isn't used.
// This value will create an empty folder instead of potentially interfering with the output
// of another GWT task.
war = file("$buildDir/gwt/check")
}
But this can be fixed by adding the @Optional annotation to AbstractGwtTask#getWar().
The war output directory is treated as an optional exec argument, but it's a required task property in AbstractGwtTask. I think it was originally meant to be optional because it's added as an argument with
dirArgIfSet
. Since it's required, we have to set the war property oncheckGwt
in order to run that task.https://github.com/jiakuan/gwt-gradle-plugin/blob/dbbd6c613d6e850e462193e2394091c3db90c534/src/main/java/org/docstr/gradle/plugins/gwt/AbstractGwtTask.java#L41
https://github.com/jiakuan/gwt-gradle-plugin/blob/dbbd6c613d6e850e462193e2394091c3db90c534/src/main/java/org/docstr/gradle/plugins/gwt/AbstractGwtTask.java#L55-L58
This is the workaround we're using:
But this can be fixed by adding the
@Optional
annotation toAbstractGwtTask#getWar()
.