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

[Android] API 'variant.getJavaCompile()' is obsolete #264

Closed
3 of 4 tasks
yohannpoli opened this issue Jan 8, 2020 · 1 comment · Fixed by #265
Closed
3 of 4 tasks

[Android] API 'variant.getJavaCompile()' is obsolete #264

yohannpoli opened this issue Jan 8, 2020 · 1 comment · Fixed by #265

Comments

@yohannpoli
Copy link

yohannpoli commented Jan 8, 2020

Description

Building app with Android Studio result in: API 'variant.getJavaCompile()' is obsolete and has been replaced with 'variant.getJavaCompileProvider()'.

Prerequisites

  • Did you check the documentation? [Add a link]
  • Did you check the Auth0 Community?
  • Are you reporting this to the correct repository?
  • Are there any related or duplicate Issues or PRs for this issue?

Environment

System:
OS: macOS Mojave 10.14.6
CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
Memory: 2.57 GB / 16.00 GB
Shell: 5.3 - /bin/zsh
Binaries:
Node: 12.14.0 - /usr/local/bin/node
npm: 6.13.4 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 13.1, DriverKit 19.0, macOS 10.15, tvOS 13.0, watchOS 6.0
Android SDK:
API Levels: 21, 22, 23, 24, 26, 27, 28, 29
Build Tools: 27.0.3, 28.0.2, 28.0.3
System Images: android-22 | Google APIs Intel x86 Atom, android-26 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom_64, android-28 | Google Play Intel x86 Atom, android-29 | Google APIs Intel x86 Atom
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.6010548
Xcode: 11.1/11A1027 - /usr/bin/xcodebuild
npmPackages:
react: 16.9.0 => 16.9.0
react-native: 0.61.5 => 0.61.5

Reproduction

Start from a fresh install, add the last version of react-native-auth0 (build with Android Studio while Invalidate cahes / Restart).

Error details is:

INFO: 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 more information.
Affected Modules: react-native-auth0

"javaCompile" is call in build.gradle line 109

android.libraryVariants.all { variant ->
  def name = variant.name.capitalize()
  task "jar${name}"(type: Jar, dependsOn: variant.javaCompile) {
    from variant.javaCompile.destinationDir
  }
}
@lbalmaceda
Copy link
Contributor

@yohannpoli I'm aware of this as it has also been a warning for many other android libraries throughout the year 2019.

I don't think the removal will affect any given library unless the main Gradle version used on your app (the one making use of these dependencies) gets bumped to the latest major where this code gets actually removed.

I'll make a PR with the changes.

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

Successfully merging a pull request may close this issue.

2 participants