I have used patch-package to patch react-native-screen-corner-radius@0.2.3 for the project I'm working on.
Unfortunately, after the sunset of JCenter, the library doesn't build for Android:
FAILURE: Build failed with an exception.
* Where:
Build file '<redacted>/node_modules/react-native-screen-corner-radius/android/build.gradle' line: 7
* What went wrong:
A problem occurred evaluating project ':react-native-screen-corner-radius'.
> Could not find method jcenter() for arguments [] on repository container of type org.gradle.api.internal.artifacts.dsl.DefaultRepositoryHandler.
Here is the diff that solved my problem, using this solution:
diff --git a/node_modules/react-native-screen-corner-radius/android/build.gradle b/node_modules/react-native-screen-corner-radius/android/build.gradle
index 48d7647..3178796 100644
--- a/node_modules/react-native-screen-corner-radius/android/build.gradle
+++ b/node_modules/react-native-screen-corner-radius/android/build.gradle
@@ -4,7 +4,8 @@ buildscript {
repositories {
google()
- jcenter()
+ mavenCentral()
+ maven { url 'https://jitpack.io' }
}
dependencies {
@@ -52,7 +53,7 @@ android {
repositories {
mavenCentral()
- jcenter()
+ maven { url 'https://jitpack.io' }
google()
def found = false
This issue body was partially generated by patch-package.
I have used patch-package to patch
react-native-screen-corner-radius@0.2.3for the project I'm working on.Unfortunately, after the sunset of JCenter, the library doesn't build for Android:
Here is the diff that solved my problem, using this solution:
This issue body was partially generated by patch-package.