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

patch-package cannot apply the following patch file:- node_modules/react-native-custom-tabs #80

Open
kallolmondal opened this issue Jul 15, 2024 · 0 comments

Comments

@kallolmondal
Copy link

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch react-native-custom-tabs@0.1.7 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-custom-tabs/android/build.gradle b/node_modules/react-native-custom-tabs/android/build.gradle
index 53a1a73..f76b61c 100644
--- a/node_modules/react-native-custom-tabs/android/build.gradle
+++ b/node_modules/react-native-custom-tabs/android/build.gradle
@@ -13,11 +13,7 @@ android {
 }
 
 dependencies {
-    compile "com.facebook.react:react-native:+"  // From node_modules
-    compile 'com.android.support:customtabs:25.0.1'
-    compile ('com.github.droibit.customtabslauncher:launcher:1.0.8') {
-        exclude module: 'customtabs'
-    }
-
-    testCompile 'junit:junit:4.12'
+    implementation 'com.facebook.react:react-native:+'
+    implementation 'androidx.browser:browser:1.5.0'
+    implementation 'com.github.droibit.customtabslauncher:launcher:1.0.8'
 }
\ No newline at end of file
diff --git a/node_modules/react-native-custom-tabs/android/src/main/java/com/github/droibit/android/reactnative/customtabs/CustomTabsModule.java b/node_modules/react-native-custom-tabs/android/src/main/java/com/github/droibit/android/reactnative/customtabs/CustomTabsModule.java
index 29a0fe6..f66b403 100644
--- a/node_modules/react-native-custom-tabs/android/src/main/java/com/github/droibit/android/reactnative/customtabs/CustomTabsModule.java
+++ b/node_modules/react-native-custom-tabs/android/src/main/java/com/github/droibit/android/reactnative/customtabs/CustomTabsModule.java
@@ -5,7 +5,7 @@ import android.content.Context;
 import android.graphics.Color;
 import android.os.Bundle;
 import android.provider.Browser;
-import android.support.customtabs.CustomTabsIntent;
+import androidx.browser.customtabs.CustomTabsIntent;
 import android.text.TextUtils;
 
 import com.droibit.android.customtabs.launcher.CustomTabsLauncher;

This issue body was partially generated by patch-package.

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

1 participant