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

Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api' #642

Closed
bayazetyan opened this issue Sep 29, 2018 · 6 comments

Comments

@bayazetyan
Copy link

Description:
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

Environment
react-native 0.57
react-native-onesignal 3.2.7

@mnlbox
Copy link

mnlbox commented Oct 3, 2018

@bayazetyan I also see this in warning in release mode:

> Configure project :react-native-onesignal 
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
WARNING: Configuration 'testCompile' is obsolete and has been replaced with 'testImplementation' and 'testApi'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
WARNING: Configuration 'testApi' is obsolete and has been replaced with 'testImplementation'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html

I think it's related to gradle version and need some update.

/CC: @Nightsd01, @avishayil

@jkasten2
Copy link
Member

jkasten2 commented Oct 3, 2018

@bayazetyan @mnlbox Thanks for point this out, we have intentionally held out on leaving this as compile as implementation and api don't exist in a number of older React Native projects. This is due to some React Native projects still being on Gradle 2.3 which would case errors for these projects.

We will however update this soon since compile will be drop completely in a future Gradle or Android Plugin release.

@slorber
Copy link
Contributor

slorber commented Dec 13, 2018

@jkasten2 does this mean new RN projects won't be able to sync/build starting 2019?

@jayrenteria
Copy link

jayrenteria commented Jan 11, 2019

@slorber that is the case, I ran into it today. Was able to fix by manually changing the compile usages in the build.gradle file in the node_module package itself, which is not ideal. I opted to use api in place of compile for things I wasn't entirely sure when they needed to be accessible at what times. Hopefully we see a fix for this soon.

EDIT: It also appears that complileOnly works as a replacement for compile for things like 'com.facebook.react:react-native:+' that are only needed at compile time.

@rgomezp
Copy link
Contributor

rgomezp commented May 30, 2019

This has been fixed. Thanks for pointing it out

@rgomezp rgomezp closed this as completed May 30, 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

No branches or pull requests

7 participants