Fix Gradle warnings and depreciations
- Dominant language
- Java
- Stars
- 35k
- Forks
- 6.2k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 8
Description
Gradle 5.6.4 currently logs the following warnings. These block the update to Gradle 6.x:
- [ ] [Configure project :integration:concurrent](https://github.com/EwoutH/glide/runs/1765915456#step:4:25)
```
The ProjectLayout.fileProperty() method has been deprecated. This is scheduled to be removed in Gradle 6.0. Please use the ObjectFactory.fileProperty() method instead.
at build_a7swcd4tdsth896gjqmqt2f5t$_run_closure1.doCall(/home/runner/work/glide/glide/glide/build.gradle:27)
(Run with --stacktrace to get the full stack trace of this deprecation warning.)
The ProjectLayout.directoryProperty() method has been deprecated. This is scheduled to be removed in Gradle 6.0. Please use the ObjectFactory.directoryProperty() method instead.
at build_a7swcd4tdsth896gjqmqt2f5t$_run_closure1.doCall(/home/runner/work/glide/glide/glide/build.gradle:27)
(Run with --stacktrace to get the full stack trace of this deprecation warning.)
```
- [ ] [Configure project :library:findbugs](https://github.com/EwoutH/glide/runs/1765915456#step:4:33)
```
The findbugs plugin has been deprecated. This is scheduled to be removed in Gradle 6.0. Consider using the com.github.spotbugs plugin instead.
at build_epfkfk204hv5uhd8mt9e68gn8.run(/home/runner/work/glide/glide/library/findbugs/build.gradle:1)
(Run with --stacktrace to get the full stack trace of this deprecation warning.)
```
- [ ] [Configure project :library:test](https://github.com/EwoutH/glide/runs/1765915456#step:4:25)
```
WARNING: The option setting 'android.enableUnitTestBinaryResources=true' is experimental and unsupported.
The current default is 'false'.
```
- [ ] [Task :library:findbugs:findbugs](https://github.com/EwoutH/glide/runs/1765915456#step:4:440)
```
WARNING: API 'variant.getJavaCompile()' is obsolete and has been replaced with 'variant.getJavaCompileProvider()'.
It will be removed at the end of 2019.
For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
To determine what is calling variant.getJavaCompile(), use -Pandroid.debug.obsoleteApi=true on the command line to display a stack trace.
The configuration :library:compile was resolved without accessing the project in a safe manner. This may happen when a configuration is resolved from a thread not managed by Gradle or from a different project. See https://docs.gradle.org/5.6.4/userguide/troubleshooting_dependency_resolution.html#sub:configuration_resolution_constraints for more details. This behaviour has been deprecated and is scheduled to be removed in Gradle 6.0.
The following classes needed for analysis were missing:
java.rmi.Remote
```
- [ ] [javadoc: warning - Error reading file: /usr/local/lib/android/sdk/docs/reference/package-list](https://github.com/EwoutH/glide/runs/1765915456#step:4:331)
```
/home/runner/work/glide/glide/library/src/main/java/com/bumptech/glide/GlideBuilder.java:223: warning - Tag @see: can't find setDefaultRequestOptions(RequestOptionsFactory) in com.bumptech.glide.GlideBuilder
/home/runner/work/glide/glide/library/src/main/java/com/bumptech/glide/GlideBuilder.java:248: warning - Tag @see: can't find setDefaultRequestOptions(RequestOptionsFactory) in com.bumptech.glide.GlideBuilder
/home/runner/work/glide/glide/library/src/main/java/com/bumptech/glide/GlideBuilder.java:588: warning - Tag @link: can't find setWaitForFramesAfterTrimMemory(boolean) in com.bumptech.glide.GlideBuilder.WaitForFramesAfterTrimMemory
> Task :glide:debugJavadoc
/home/runner/work/glide/glide/library/src/main/java/com/bumptech/glide/TransitionOptions.java:43: warning - Tag @link: reference not found: android.view.animation
> Task :third_party:disklrucache:createFullJarDebug
> Task :third_party:gif_decoder:createFullJarDebug
/home/runner/work/glide/glide/library/src/main/java/com/bumptech/glide/load/model/stream/HttpUriLoader.java:29: warning - Tag @link: reference not found: UrlUriLoader.StreamFactory
/home/runner/work/glide/glide/library/src/main/java/com/bumptech/glide/load/model/stream/HttpUriLoader.java:29: warning - Tag @link: reference not found: UrlUriLoader.StreamFactory
/home/runner/work/glide/glide/library/src/main/java/com/bumptech/glide/load/engine/executor/GlideExecutor.java:91: warning - Tag @link: can't find setUncaughtThrowableStrategy(UncaughtThrowableStrategy) in com.bumptech.glide.load.engine.executor.GlideExecutor.Builder
/home/runner/work/glide/glide/library/src/main/java/com/bumptech/glide/load/engine/executor/GlideExecutor.java:164: warning - Tag @link: can't find SOURCE_UNLIMITED_EXECUTOR_NAME in com.bumptech.glide.load.engine.executor.GlideExecutor
/home/runner/work/glide/glide/library/src/main/java/com/bumptech/glide/load/resource/bitmap/Downsampler.java:109: warning - Tag @link: reference not found: Bitmap.Config#HARDWARE
/home/runner/work/glide/glide/library/src/main/java/com/bumptech/glide/load/resource/bitmap/Downsampler.java:109: warning - Tag @link: reference not found: Bitmap.Config#HARDWARE
/home/runner/work/glide/glide/integration/concurrent/src/main/java/com/bumptech/glide/integration/concurrent/GlideFutures.java:68: warning - Tag @link: can't find preload(RequestManager,
RequestBuilder, Executor) in com.bumptech.glide.integration.concurrent.GlideFutures
/home/runner/work/glide/glide/integration/concurrent/src/main/java/com/bumptech/glide/integration/concurrent/GlideFutures.java:68: warning - Tag @link: reference not found: com.google.common.util.concurrent.ClosingFuture
/home/runner/work/glide/glide/library/src/main/java/com/bumptech/glide/load/resource/gif/GifDrawable.java:406: warning - Tag @link: reference not found: Animatable2Compat.AnimationCallback
> Task :glide:debugJavadoc
/home/runner/work/glide/glide/library/src/main/java/com/bumptech/glide/request/transition/ViewPropertyTransition.java:12: warning - Tag @link: reference not found: android.animation.ObjectAnimator
/home/runner/work/glide/glide/library/src/main/java/com/bumptech/glide/request/BaseRequestOptions.java:662: warning - Tag @link: reference not found: Bitmap.Config#HARDWARE
/home/runner/work/glide/glide/library/src/main/java/com/bumptech/glide/request/RequestListener.java:82: warning - Tag @link: can't find onResourceReady(Drawable) in com.bumptech.glide.request.target.Target
> Task :library:createFullJarDebug
/home/runner/work/glide/glide/library/src/main/java/com/bumptech/glide/request/RequestListener.java:82: warning - Tag @link: can't find onResourceReady(Drawable) in com.bumptech.glide.request.target.Target
/home/runner/work/glide/glide/library/src/main/java/com/bumptech/glide/load/model/stream/HttpUriLoader.java:29: warning - Tag @link: reference not found: UrlUriLoader.StreamFactory
/home/runner/work/glide/glide/library/src/main/java/com/bumptech/glide/request/transition/ViewPropertyTransition.java:12: warning - Tag @link: reference not found: android.animation.ObjectAnimator
> Task :glide:debugJavadoc
/home/runner/work/glide/glide/library/src/main/java/com/bumptech/glide/load/resource/bitmap/Downsampler.java:109: warning - Tag @link: reference not found: Bitmap.Config#HARDWARE
24 warnings
/home/runner/work/glide/glide/library/src/main/java/com/bumptech/glide/load/model/stream/HttpUriLoader.java:29: warning - Tag @link: reference not found: UrlUriLoader.StreamFactory
/home/runner/work/glide/glide/library/src/main/java/com/bumptech/glide/request/transition/ViewPropertyTransition.java:12: warning - Tag @link: reference not found: android.animation.ObjectAnimator
/home/runner/work/glide/glide/library/src/main/java/com/bumptech/glide/load/model/stream/HttpUriLoader.java:29: warning - Tag @link: reference not found: UrlUriLoader.StreamFactory
```
[Full build log](https://github.com/EwoutH/glide/runs/1765915456#step:4:8).
**Reproduce:** Build with Gradle 5.6.4 with `--warning-mode=all`
```
./gradlew wrapper --gradle-version=5.6.4
./gradlew build \
-x :samples:flickr:build \
-x :samples:giphy:build \
-x :samples:contacturi:build \
-x :samples:gallery:build \
-x :samples:imgur:build \
-x :samples:svg:build \
--parallel --warning-mode=all
./gradlew :instrumentation:assembleAndroidTest --warning-mode=all
```
**Goals:**
- [ ] Building with Gradle 5.6.4 and `--warning-mode=fail` should pass
- [ ] Building with latest Gradle (6.8.1) and `--warning-mode=fail` should pass
Contributor guide
Assessment
This issue has not been assessed yet.