Skip to content
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

Fix Gradle warnings and depreciations #4482

Open
7 tasks
EwoutH opened this issue Jan 27, 2021 · 0 comments
Open
7 tasks

Fix Gradle warnings and depreciations #4482

EwoutH opened this issue Jan 27, 2021 · 0 comments

Comments

@EwoutH
Copy link
Contributor

EwoutH commented Jan 27, 2021

Gradle 5.6.4 currently logs the following warnings. These block the update to Gradle 6.x:

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.)
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.)
WARNING: The option setting 'android.enableUnitTestBinaryResources=true' is experimental and unsupported.
The current default is 'false'.
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
/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.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant