react-native-orientation icon indicating copy to clipboard operation
react-native-orientation copied to clipboard

Change compile with api in build.gradle

Open bshubham80 opened this issue 3 years ago • 1 comments

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch [email protected] for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-orientation/android/build.gradle b/node_modules/react-native-orientation/android/build.gradle
index e09fb27..b35d87c 100644
--- a/node_modules/react-native-orientation/android/build.gradle
+++ b/node_modules/react-native-orientation/android/build.gradle
@@ -16,5 +16,5 @@ android {
 }
 
 dependencies {
-    compile "com.facebook.react:react-native:+"
+    api "com.facebook.react:react-native:+"
 }

This issue body was partially generated by patch-package.

bshubham80 avatar Nov 16 '22 10:11 bshubham80

implementation is good as well, but it seems that api is the way to go since the react-native sdk version targeted is the one available on the project.

xtealer avatar Nov 25 '22 08:11 xtealer