jiakuan / gwt-gradle-plugin

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

Add input and output annotations to task properties #32

Closed evpaassen closed 4 years ago

evpaassen commented 4 years ago

In order to prepare for Gradle 7.0 and to remove deprecation warnings when used with Gradle 6, task properties need to be annotated with input and output annotations.

Upgrading to Gradle 6.6 adds a validatePlugins task, which yields the following errors:

$ ./gradlew validatePlugins

> Task :gwt-gradle-plugin:compileJava
Note: C:\git\gwt-gradle-plugin\gwt-gradle-plugin\src\main\java\org\wisepersist\gradle\plugins\gwt\GwtWarPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

> Task :gwt-gradle-plugin:validatePlugins FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':gwt-gradle-plugin:validatePlugins'.
> Plugin validation failed. See https://docs.gradle.org/6.6/userguide/more_about_tasks.html#sec:task_input_output_annotations for more information on how to annotate task properties.
   > Warning: Type 'AbstractGwtActionTask': property 'debug' is not annotated with an input or output annotation.
   > Warning: Type 'AbstractGwtActionTask': property 'devTask' is not annotated with an input or output annotation.
   > Warning: Type 'AbstractGwtActionTask': property 'incremental' is not annotated with an input or output annotation.
   > Warning: Type 'AbstractGwtActionTask': property 'jsInteropExports' is not annotated with an input or output annotation.
   > Warning: Type 'AbstractGwtActionTask': property 'jsInteropMode' is not annotated with an input or output annotation.
   > Warning: Type 'AbstractGwtActionTask': property 'logLevel' is not annotated with an input or output annotation.
   > Warning: Type 'AbstractGwtActionTask': property 'maxHeapSize' is not annotated with an input or output annotation.
   > Warning: Type 'AbstractGwtActionTask': property 'methodNameDisplayMode' is not annotated with an input or output annotation.
   > Warning: Type 'AbstractGwtActionTask': property 'minHeapSize' is not annotated with an input or output annotation.
   > Warning: Type 'AbstractGwtActionTask': property 'sourceLevel' is not annotated with an input or output annotation.
   > Warning: Type 'AbstractGwtCompile': property 'cacheDir' is not annotated with an input or output annotation.
   > Warning: Type 'AbstractGwtCompile': property 'closureFormattedOutput' is not annotated with an input or output annotation.
   > Warning: Type 'AbstractGwtCompile': property 'debug' is not annotated with an input or output annotation.
   > Warning: Type 'AbstractGwtCompile': property 'deploy' is not annotated with an input or output annotation.
   > Warning: Type 'AbstractGwtCompile': property 'devTask' is not annotated with an input or output annotation.
   > Warning: Type 'AbstractGwtCompile': property 'enforceStrictResources' is not annotated with an input or output annotation.
   > Warning: Type 'AbstractGwtCompile': property 'extra' is not annotated with an input or output annotation.
   > Warning: Type 'AbstractGwtCompile': property 'gen' is not annotated with an input or output annotation.
   > Warning: Type 'AbstractGwtCompile': property 'incremental' is not annotated with an input or output annotation.
   > Warning: Type 'AbstractGwtCompile': property 'incrementalCompileWarnings' is not annotated with an input or output annotation.
   > Warning: Type 'AbstractGwtCompile': property 'jsInteropExports' is not annotated with an input or output annotation.
   > Warning: Type 'AbstractGwtCompile': property 'jsInteropMode' is not annotated with an input or output annotation.
   > Warning: Type 'AbstractGwtCompile': property 'localWorkers' is not annotated with an input or output annotation.
   > Warning: Type 'AbstractGwtCompile': property 'logLevel' is not annotated with an input or output annotation.
   > Warning: Type 'AbstractGwtCompile': property 'maxHeapSize' is not annotated with an input or output annotation.
   > Warning: Type 'AbstractGwtCompile': property 'methodNameDisplayMode' is not annotated with an input or output annotation.
   > Warning: Type 'AbstractGwtCompile': property 'minHeapSize' is not annotated with an input or output annotation.
   > Warning: Type 'AbstractGwtCompile': property 'missingDepsFile' is not annotated with an input or output annotation.
   > Warning: Type 'AbstractGwtCompile': property 'namespace' is not annotated with an input or output annotation.
   > Warning: Type 'AbstractGwtCompile': property 'overlappingSourceWarnings' is not annotated with an input or output annotation.
   > Warning: Type 'AbstractGwtCompile': property 'saveSource' is not annotated with an input or output annotation.
   > Warning: Type 'AbstractGwtCompile': property 'saveSourceOutput' is not annotated with an input or output annotation.
   > Warning: Type 'AbstractGwtCompile': property 'sourceLevel' is not annotated with an input or output annotation.
   > Warning: Type 'AbstractGwtCompile': property 'war' is not annotated with an input or output annotation.
   > Warning: Type 'AbstractGwtCompile': property 'workDir' is not annotated with an input or output annotation.
   > Warning: Type 'AbstractGwtTask': property 'cacheDir' is not annotated with an input or output annotation.
   > Warning: Type 'AbstractGwtTask': property 'debug' is not annotated with an input or output annotation.
   > Warning: Type 'AbstractGwtTask': property 'deploy' is not annotated with an input or output annotation.
   > Warning: Type 'AbstractGwtTask': property 'devTask' is not annotated with an input or output annotation.
   > Warning: Type 'AbstractGwtTask': property 'extra' is not annotated with an input or output annotation.
   > Warning: Type 'AbstractGwtTask': property 'gen' is not annotated with an input or output annotation.
   > Warning: Type 'AbstractGwtTask': property 'incremental' is not annotated with an input or output annotation.
   > Warning: Type 'AbstractGwtTask': property 'jsInteropExports' is not annotated with an input or output annotation.
   > Warning: Type 'AbstractGwtTask': property 'jsInteropMode' is not annotated with an input or output annotation.
   > Warning: Type 'AbstractGwtTask': property 'logLevel' is not annotated with an input or output annotation.
   > Warning: Type 'AbstractGwtTask': property 'maxHeapSize' is not annotated with an input or output annotation.
   > Warning: Type 'AbstractGwtTask': property 'methodNameDisplayMode' is not annotated with an input or output annotation.
   > Warning: Type 'AbstractGwtTask': property 'minHeapSize' is not annotated with an input or output annotation.
   > Warning: Type 'AbstractGwtTask': property 'sourceLevel' is not annotated with an input or output annotation.
   > Warning: Type 'AbstractGwtTask': property 'war' is not annotated with an input or output annotation.
   > Warning: Type 'AbstractGwtTask': property 'workDir' is not annotated with an input or output annotation.
   > Warning: Type 'ExplodedWar': property 'destinationDir' is not annotated with an input or output annotation.
   > Warning: Type 'ExplodedWar': property 'webInf' is not annotated with an input or output annotation.
   > Warning: Type 'GenerateGdt': property 'lastWarOutDir' has @Input annotation used on property of type 'File'.
   > Warning: Type 'GenerateGdt': property 'warSrcDir' has @Input annotation used on property of type 'File'.
   > Warning: Type 'GwtCheck': property 'cacheDir' is not annotated with an input or output annotation.
   > Warning: Type 'GwtCheck': property 'closureFormattedOutput' is not annotated with an input or output annotation.
   > Warning: Type 'GwtCheck': property 'debug' is not annotated with an input or output annotation.
   > Warning: Type 'GwtCheck': property 'deploy' is not annotated with an input or output annotation.
   > Warning: Type 'GwtCheck': property 'devTask' is not annotated with an input or output annotation.
   > Warning: Type 'GwtCheck': property 'enforceStrictResources' is not annotated with an input or output annotation.
   > Warning: Type 'GwtCheck': property 'extra' is not annotated with an input or output annotation.
   > Warning: Type 'GwtCheck': property 'gen' is not annotated with an input or output annotation.
   > Warning: Type 'GwtCheck': property 'incremental' is not annotated with an input or output annotation.
   > Warning: Type 'GwtCheck': property 'incrementalCompileWarnings' is not annotated with an input or output annotation.
   > Warning: Type 'GwtCheck': property 'jsInteropExports' is not annotated with an input or output annotation.
   > Warning: Type 'GwtCheck': property 'jsInteropMode' is not annotated with an input or output annotation.
   > Warning: Type 'GwtCheck': property 'localWorkers' is not annotated with an input or output annotation.
   > Warning: Type 'GwtCheck': property 'logLevel' is not annotated with an input or output annotation.
   > Warning: Type 'GwtCheck': property 'maxHeapSize' is not annotated with an input or output annotation.
   > Warning: Type 'GwtCheck': property 'methodNameDisplayMode' is not annotated with an input or output annotation.
   > Warning: Type 'GwtCheck': property 'minHeapSize' is not annotated with an input or output annotation.
   > Warning: Type 'GwtCheck': property 'missingDepsFile' is not annotated with an input or output annotation.
   > Warning: Type 'GwtCheck': property 'namespace' is not annotated with an input or output annotation.
   > Warning: Type 'GwtCheck': property 'overlappingSourceWarnings' is not annotated with an input or output annotation.
   > Warning: Type 'GwtCheck': property 'saveSource' is not annotated with an input or output annotation.
   > Warning: Type 'GwtCheck': property 'saveSourceOutput' is not annotated with an input or output annotation.
   > Warning: Type 'GwtCheck': property 'sourceLevel' is not annotated with an input or output annotation.
   > Warning: Type 'GwtCheck': property 'war' is not annotated with an input or output annotation.
   > Warning: Type 'GwtCheck': property 'workDir' is not annotated with an input or output annotation.
   > Warning: Type 'GwtCompile': property 'cacheDir' is not annotated with an input or output annotation.
   > Warning: Type 'GwtCompile': property 'closureFormattedOutput' is not annotated with an input or output annotation.
   > Warning: Type 'GwtCompile': property 'debug' is not annotated with an input or output annotation.
   > Warning: Type 'GwtCompile': property 'deploy' is not annotated with an input or output annotation.
   > Warning: Type 'GwtCompile': property 'devTask' is not annotated with an input or output annotation.
   > Warning: Type 'GwtCompile': property 'enforceStrictResources' is not annotated with an input or output annotation.
   > Warning: Type 'GwtCompile': property 'extra' is not annotated with an input or output annotation.
   > Warning: Type 'GwtCompile': property 'gen' is not annotated with an input or output annotation.
   > Warning: Type 'GwtCompile': property 'incremental' is not annotated with an input or output annotation.
   > Warning: Type 'GwtCompile': property 'incrementalCompileWarnings' is not annotated with an input or output annotation.
   > Warning: Type 'GwtCompile': property 'jsInteropExports' is not annotated with an input or output annotation.
   > Warning: Type 'GwtCompile': property 'jsInteropMode' is not annotated with an input or output annotation.
   > Warning: Type 'GwtCompile': property 'localWorkers' is not annotated with an input or output annotation.
   > Warning: Type 'GwtCompile': property 'logLevel' is not annotated with an input or output annotation.
   > Warning: Type 'GwtCompile': property 'maxHeapSize' is not annotated with an input or output annotation.
   > Warning: Type 'GwtCompile': property 'methodNameDisplayMode' is not annotated with an input or output annotation.
   > Warning: Type 'GwtCompile': property 'minHeapSize' is not annotated with an input or output annotation.
   > Warning: Type 'GwtCompile': property 'missingDepsFile' is not annotated with an input or output annotation.
   > Warning: Type 'GwtCompile': property 'namespace' is not annotated with an input or output annotation.
   > Warning: Type 'GwtCompile': property 'overlappingSourceWarnings' is not annotated with an input or output annotation.
   > Warning: Type 'GwtCompile': property 'saveSource' is not annotated with an input or output annotation.
   > Warning: Type 'GwtCompile': property 'saveSourceOutput' is not annotated with an input or output annotation.
   > Warning: Type 'GwtCompile': property 'sourceLevel' is not annotated with an input or output annotation.
   > Warning: Type 'GwtCompile': property 'src' is declared without normalization specified. Properties of cacheable work must declare their normalization via @PathSensitive, @Classpath or @CompileClasspath. Defaulting to PathSensitivity.ABSOLUTE.
   > Warning: Type 'GwtCompile': property 'workDir' is not annotated with an input or output annotation.
   > Warning: Type 'GwtDev': property 'autoCodeServerPort' is not annotated with an input or output annotation.
   > Warning: Type 'GwtDev': property 'autoPort' is not annotated with an input or output annotation.
   > Warning: Type 'GwtDev': property 'bindAddress' is not annotated with an input or output annotation.
   > Warning: Type 'GwtDev': property 'blacklist' is not annotated with an input or output annotation.
   > Warning: Type 'GwtDev': property 'cacheDir' is not annotated with an input or output annotation.
   > Warning: Type 'GwtDev': property 'codeServerPort' is not annotated with an input or output annotation.
   > Warning: Type 'GwtDev': property 'debug' is not annotated with an input or output annotation.
   > Warning: Type 'GwtDev': property 'deploy' is not annotated with an input or output annotation.
   > Warning: Type 'GwtDev': property 'devTask' is not annotated with an input or output annotation.
   > Warning: Type 'GwtDev': property 'extra' is not annotated with an input or output annotation.
   > Warning: Type 'GwtDev': property 'gen' is not annotated with an input or output annotation.
   > Warning: Type 'GwtDev': property 'incremental' is not annotated with an input or output annotation.
   > Warning: Type 'GwtDev': property 'jsInteropExports' is not annotated with an input or output annotation.
   > Warning: Type 'GwtDev': property 'jsInteropMode' is not annotated with an input or output annotation.
   > Warning: Type 'GwtDev': property 'logDir' is not annotated with an input or output annotation.
   > Warning: Type 'GwtDev': property 'logLevel' is not annotated with an input or output annotation.
   > Warning: Type 'GwtDev': property 'maxHeapSize' is not annotated with an input or output annotation.
   > Warning: Type 'GwtDev': property 'methodNameDisplayMode' is not annotated with an input or output annotation.
   > Warning: Type 'GwtDev': property 'minHeapSize' is not annotated with an input or output annotation.
   > Warning: Type 'GwtDev': property 'modulePathPrefix' is not annotated with an input or output annotation.
   > Warning: Type 'GwtDev': property 'noserver' is not annotated with an input or output annotation.
   > Warning: Type 'GwtDev': property 'port' is not annotated with an input or output annotation.
   > Warning: Type 'GwtDev': property 'server' is not annotated with an input or output annotation.
   > Warning: Type 'GwtDev': property 'sourceLevel' is not annotated with an input or output annotation.
   > Warning: Type 'GwtDev': property 'startServer' is not annotated with an input or output annotation.
   > Warning: Type 'GwtDev': property 'startupUrl' is not annotated with an input or output annotation.
   > Warning: Type 'GwtDev': property 'superDevMode' is not annotated with an input or output annotation.
   > Warning: Type 'GwtDev': property 'war' is not annotated with an input or output annotation.
   > Warning: Type 'GwtDev': property 'whitelist' is not annotated with an input or output annotation.
   > Warning: Type 'GwtDev': property 'workDir' is not annotated with an input or output annotation.
   > Warning: Type 'GwtDraftCompile': property 'cacheDir' is not annotated with an input or output annotation.
   > Warning: Type 'GwtDraftCompile': property 'closureFormattedOutput' is not annotated with an input or output annotation.
   > Warning: Type 'GwtDraftCompile': property 'debug' is not annotated with an input or output annotation.
   > Warning: Type 'GwtDraftCompile': property 'deploy' is not annotated with an input or output annotation.
   > Warning: Type 'GwtDraftCompile': property 'devTask' is not annotated with an input or output annotation.
   > Warning: Type 'GwtDraftCompile': property 'enforceStrictResources' is not annotated with an input or output annotation.
   > Warning: Type 'GwtDraftCompile': property 'extra' is not annotated with an input or output annotation.
   > Warning: Type 'GwtDraftCompile': property 'gen' is not annotated with an input or output annotation.
   > Warning: Type 'GwtDraftCompile': property 'incremental' is not annotated with an input or output annotation.
   > Warning: Type 'GwtDraftCompile': property 'incrementalCompileWarnings' is not annotated with an input or output annotation.
   > Warning: Type 'GwtDraftCompile': property 'jsInteropExports' is not annotated with an input or output annotation.
   > Warning: Type 'GwtDraftCompile': property 'jsInteropMode' is not annotated with an input or output annotation.
   > Warning: Type 'GwtDraftCompile': property 'localWorkers' is not annotated with an input or output annotation.
   > Warning: Type 'GwtDraftCompile': property 'logLevel' is not annotated with an input or output annotation.
   > Warning: Type 'GwtDraftCompile': property 'maxHeapSize' is not annotated with an input or output annotation.
   > Warning: Type 'GwtDraftCompile': property 'methodNameDisplayMode' is not annotated with an input or output annotation.
   > Warning: Type 'GwtDraftCompile': property 'minHeapSize' is not annotated with an input or output annotation.
   > Warning: Type 'GwtDraftCompile': property 'missingDepsFile' is not annotated with an input or output annotation.
   > Warning: Type 'GwtDraftCompile': property 'namespace' is not annotated with an input or output annotation.
   > Warning: Type 'GwtDraftCompile': property 'overlappingSourceWarnings' is not annotated with an input or output annotation.
   > Warning: Type 'GwtDraftCompile': property 'saveSource' is not annotated with an input or output annotation.
   > Warning: Type 'GwtDraftCompile': property 'saveSourceOutput' is not annotated with an input or output annotation.
   > Warning: Type 'GwtDraftCompile': property 'sourceLevel' is not annotated with an input or output annotation.
   > Warning: Type 'GwtDraftCompile': property 'src' is declared without normalization specified. Properties of cacheable work must declare their normalization via @PathSensitive, @Classpath or @CompileClasspath. Defaulting to PathSensitivity.ABSOLUTE.
   > Warning: Type 'GwtDraftCompile': property 'workDir' is not annotated with an input or output annotation.
   > Warning: Type 'GwtSuperDev': property 'allowMissingSrc' is not annotated with an input or output annotation.
   > Warning: Type 'GwtSuperDev': property 'bindAddress' is not annotated with an input or output annotation.
   > Warning: Type 'GwtSuperDev': property 'closureFormattedOutput' is not annotated with an input or output annotation.
   > Warning: Type 'GwtSuperDev': property 'compileTest' is not annotated with an input or output annotation.
   > Warning: Type 'GwtSuperDev': property 'compileTestRecompiles' is not annotated with an input or output annotation.
   > Warning: Type 'GwtSuperDev': property 'debug' is not annotated with an input or output annotation.
   > Warning: Type 'GwtSuperDev': property 'devTask' is not annotated with an input or output annotation.
   > Warning: Type 'GwtSuperDev': property 'failOnError' is not annotated with an input or output annotation.
   > Warning: Type 'GwtSuperDev': property 'incremental' is not annotated with an input or output annotation.
   > Warning: Type 'GwtSuperDev': property 'jsInteropExports' is not annotated with an input or output annotation.
   > Warning: Type 'GwtSuperDev': property 'jsInteropMode' is not annotated with an input or output annotation.
   > Warning: Type 'GwtSuperDev': property 'launcherDir' is not annotated with an input or output annotation.
   > Warning: Type 'GwtSuperDev': property 'logLevel' is not annotated with an input or output annotation.
   > Warning: Type 'GwtSuperDev': property 'maxHeapSize' is not annotated with an input or output annotation.
   > Warning: Type 'GwtSuperDev': property 'methodNameDisplayMode' is not annotated with an input or output annotation.
   > Warning: Type 'GwtSuperDev': property 'minHeapSize' is not annotated with an input or output annotation.
   > Warning: Type 'GwtSuperDev': property 'noPrecompile' is not annotated with an input or output annotation.
   > Warning: Type 'GwtSuperDev': property 'port' is not annotated with an input or output annotation.
   > Warning: Type 'GwtSuperDev': property 'sourceLevel' is not annotated with an input or output annotation.
   > Warning: Type 'GwtSuperDev': property 'useClasspathForSrc' is not annotated with an input or output annotation.
   > Warning: Type 'GwtSuperDev': property 'workDir' is not annotated with an input or output annotation.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.6/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 2s
4 actionable tasks: 4 executed

If desired, maybe I could try to create a PR which upgrades to Gradle 6.6 and addresses these issues.

jiakuan commented 4 years ago

I've fixed all the warnings after upgrading to Gradle 6.6. But the release plugin seems not working on multi-project structure with Gradle 6. https://github.com/researchgate/gradle-release/issues/330 https://github.com/gradle/gradle/issues/12872

Will need to find a way to get around this.

jiakuan commented 4 years ago

All fixed and released a new version to Maven Central. Gradle plugin portal will soon be available.

evpaassen commented 4 years ago

Thanks you very much for addressing this. Unfortunately, I'm facing build errors in a project that uses the new plugin version. I created a new issue (#33) for it.