surialabs / react-native-geo-fencing

Native modules to determine if a location is within defined geographical boundaries using Google Geometry library
139 stars 33 forks source link

Fix for breaking Android changes with React Native 0.71 #28

Open carteak004 opened 1 year ago

carteak004 commented 1 year ago

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch react-native-geo-fencing@0.1.0 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-geo-fencing/android/build.gradle b/node_modules/react-native-geo-fencing/android/build.gradle
index 8413f68..dff75c2 100644
--- a/node_modules/react-native-geo-fencing/android/build.gradle
+++ b/node_modules/react-native-geo-fencing/android/build.gradle
@@ -13,7 +13,7 @@ android {
 }

 dependencies {
-    compile 'com.facebook.react:react-native:0.19.+'
-    compile 'com.google.android.gms:play-services-maps:8.4.0'
-    compile 'com.google.maps.android:android-maps-utils:0.4'
+    implementation 'com.facebook.react:react-native:0.19.+'
+    implementation 'com.google.android.gms:play-services-maps:8.4.0'
+    implementation 'com.google.maps.android:android-maps-utils:0.4'
 }
diff --git a/node_modules/react-native-geo-fencing/android/src/main/java/com/surialabs/rn/geofencing/GeoFencingPackage.java b/node_modules/react-native-geo-fencing/android/src/main/java/com/surialabs/rn/geofencing/GeoFencingPackage.java
index f527f90..f9f1c10 100644
--- a/node_modules/react-native-geo-fencing/android/src/main/java/com/surialabs/rn/geofencing/GeoFencingPackage.java
+++ b/node_modules/react-native-geo-fencing/android/src/main/java/com/surialabs/rn/geofencing/GeoFencingPackage.java
@@ -20,7 +20,6 @@ public class GeoFencingPackage implements ReactPackage {
         return modules;
     }

-    @Override
     public List<Class<? extends JavaScriptModule>> createJSModules() {
         return Collections.emptyList();
     }

This issue body was partially generated by patch-package.

kyadalu1 commented 1 year ago

Try this https://www.youtube.com/watch?v=A5nvMQe-fpc