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

Fixed gradle configuration 'compile' deprecation #5

Closed
wants to merge 1 commit into from
Closed

Fixed gradle configuration 'compile' deprecation #5

wants to merge 1 commit into from

Conversation

Rapsssito
Copy link

@Rapsssito Rapsssito commented Sep 22, 2019

Fixed gradle compile deprecation warning as in tradle/react-native-udp#88 (comment).

Intent

This fixes a breaking API change with the Android Gradle plugin, which was deprecated as of version 3.0.0 and later made obsolete.

Changes

When adding Gradle dependencies, the compile command has been removed and replaced with implementation/api.

More information

* Gradle support docs: https://docs.gradle.org/5.4.1/userguide/java_library_plugin.html#sec:java_library_separation

* Android deprecation doc: https://developer.android.com/studio/build/dependencies?utm_source=android-studio#dependency_configurations

@Rapsssito Rapsssito changed the title Fixed gradle compile deprecation warning Fixed gradle configuration 'compile' deprecation WARNING Sep 22, 2019
@Rapsssito Rapsssito changed the title Fixed gradle configuration 'compile' deprecation WARNING Fixed gradle configuration 'compile' deprecation Sep 23, 2019
@Rapsssito
Copy link
Author

@aprock or @phillbaker
Hope you can merge this

@phillbaker
Copy link
Collaborator

Dupe of #3.

I'm not sure that this change is necessary as the typical outputs in Android studio are only deprecation warnings, not errors. This change is usually a suggestion, not a requirement. I believe that changing this would also break backward compatibility with other versions of gradle.

@phillbaker phillbaker mentioned this pull request Sep 23, 2019
@Rapsssito
Copy link
Author

Rapsssito commented Sep 23, 2019

I'll leave the PR open until it breaks Gradle compatibility. This is a fix for anyone getting this warning:

Configure project :react-native-tcp
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html

@Rapsssito Rapsssito closed this Nov 4, 2019
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 this pull request may close these issues.

2 participants