-
Notifications
You must be signed in to change notification settings - Fork 468
Gradle issue: Using the incremental task API without declaring any outputs has been deprecated. #427
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for finding this! Each spotless/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/SpotlessTask.java Lines 119 to 129 in b6b7f96
We could easily list this file as an output, but the trick is we also need to list it as an input (it fixes a tricky up-to-date corner-case, described here). If having this file as both an input and an output triggers their warnings (which would be reasonable), then we can just make another synthetic output and list that as our output. Until these deprecated warnings become errors, this won't be high on my todo list. Happy to merge a PR before then, or I'll get to it when it becomes urgent. |
I'll see what I can do as a PR 👍. They're not errors, but they do warn on every build in gradle 5.x+ |
Released in 3.24.2 |
…puts to incremental task" Previous version was 3.24.0. When building, it produced the following exception: ```bash $ ./gradlew build > Configure project :app > Task :spotlessKotlin FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':spotlessKotlin'. > You must declare outputs or use `TaskOutputs.upToDateWhen()` when using the incremental task API ``` This issue was fixed in Spotless 3.24.2 as per [Issue #427](diffplug/spotless#427). I optimistically upgraded to the latest release (4.3.0, June 2020). There are also higher minor releases (3.30.0, May 2020) and patch releases (3.24.3, Sep 2019) available in [mvnrepository](https://mvnrepository.com/artifact/com.diffplug.spotless/spotless-plugin-gradle) as alternatives. The build passes on all three.
Gradle 5.5.1
Spotless 3.24.0
MacOS 10.14.6
Github repo: https://github.com/zacsweers/catchup
Full trace reported from gradle below. Unfortunately it doesn't say where the issue is from in code, just that it occurs when running the
spotlessKotlin
task on any project that applies itThe text was updated successfully, but these errors were encountered: