MindscapeHQ / raygun4reactnative

ReactNative crash reporting SDK for Raygun
MIT License
3 stars 3 forks source link

Builds Failing- Jcenter is down, replace with mavenCentral #63

Closed etaiklein closed 8 hours ago

etaiklein commented 2 years ago

Bintray support has ended a while back (official announcement: https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/).Today, Jcenter went down and so installing from this location is causing builds to fail (See https://github.com/facebook/react-native/issues/35136)

FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:lintVitalAlphaRelease'.
> Could not resolve all artifacts for configuration ':raygun4reactnative:releaseRuntimeClasspath'.
   > Could not resolve com.facebook.react:react-native:+.
     Required by:
         project :raygun4reactnative
      > Failed to list versions for com.facebook.react:react-native.
         > Unable to load Maven meta-data from https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml.
            > Could not get resource '[https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml'](https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml).
               > Could not GET '[https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml'](https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml).
                  > Read timed out

In your build.gradle file you need to remove reference to jcenter and replace it the more reliable mavenCentral. Example:

diff --git a/node_modules/raygun4reactnative/android/build.gradle b/node_modules/raygun4reactnative/android/build.gradle
index 9b2b2c2..5215439 100644
--- a/node_modules/raygun4reactnative/android/build.gradle
+++ b/node_modules/raygun4reactnative/android/build.gradle
@@ -30,7 +30,7 @@ buildscript {
     if (project == rootProject) {
         repositories {
             google()
-            jcenter()
+            mavenCentral()
         }
         dependencies {
             classpath 'com.android.tools.build:gradle:3.4.1'
@@ -71,7 +71,7 @@ repositories {
         url "$rootDir/../lib"
     }
     google()
-    jcenter()
+    mavenCentral()
 }

 dependencies {
miquelbeltran commented 8 hours ago

Closing as this was already fixed