question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Yet another Gradle update issue: 7.4 deprecated FileTrees using @SkipWhenEmpty

See original GitHub issue

Gradle 7.4 (release notes [1]) deprecated @SkipWhenEmpty [2], builds (with strict deprecation check) fail with:

> Task <project>:forbiddenApisTest NO-SOURCE
Relying on FileTrees for ignoring empty directories when using @SkipWhenEmpty has been deprecated. This is scheduled to be removed in Gradle 8.0. Annotate the property classFiles with @IgnoreEmptyDirectories or remove @SkipWhenEmpty. Consult the upgrading guide for further information: https://docs.gradle.org/7.4/userguide/upgrading_version_7.html#empty_directories_file_tree

[1] https://docs.gradle.org/7.4/release-notes.html [2] https://docs.gradle.org/current/userguide/upgrading_version_7.html#empty_directories_file_tree

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:19 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
uschindlercommented, Mar 24, 2022

Looks like all is working fine without any warnings in Gradle 7.4.1: https://jenkins.thetaphi.de/job/Forbidden-APIs-testonly-GradleLatest-Linux/82/console

1reaction
uschindlercommented, Mar 24, 2022

I only fixed another issue with forbiddens’s own annotation processing (it wanted runtime annotations to be on classpath). This was a long standing issue, now also fixed: #194

Read more comments on GitHub >

github_iconTop Results From Across the Web

Upgrading your build from Gradle 7.x to the latest
The previous step will help you identify potential problems by issuing deprecation warnings when a plugin does try to use a deprecated part...
Read more >
Build finished event now deprecated · Issue #20151 · gradle ...
Starting in Gradle 7.4, both the Gradle.buildFinished and BuildListener.buildFinished are deprecated. Apparently, it was not possible to get ...
Read more >
angular - Execution Failed capacitor-cordova-android-plugins ...
clean your project. Run gradlew clean in andorid directory. Then run below command ,it copies and paste your node module packages in android ......
Read more >
Build Scan™ for 'spring-boot-build' on Jun 26 2022 at 12:43 ...
Gradle 7.4.2, Gradle Enterprise plugin 3.10.2 ... on FileTrees for ignoring empty directories when using @SkipWhenEmpty has been deprecated.
Read more >
Gradle User Guide - gvSIG Association
16.5. Using Groovy in Gradle's tasks. 16.6. Declaration of task that depends on other task. 16.7. Lazy dependsOn - the other task does...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found