nodejs-mobile / nodejs-mobile-react-native

Node.js for Mobile Apps React Native plugin
https://nodejs-mobile.github.io
MIT License
180 stars 42 forks source link

jcenter() deprecation #80

Closed Besermenji closed 3 months ago

Besermenji commented 3 months ago

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch nodejs-mobile-react-native@18.17.7 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/nodejs-mobile-react-native/android/build.gradle b/node_modules/nodejs-mobile-react-native/android/build.gradle
index 8143849..53fb229 100644
--- a/node_modules/nodejs-mobile-react-native/android/build.gradle
+++ b/node_modules/nodejs-mobile-react-native/android/build.gradle
@@ -1,11 +1,11 @@

 buildscript {
     repositories {
-        jcenter()
+       mavenCentral()
     }

     dependencies {
-        classpath 'com.android.tools.build:gradle:2.2.3'
+        classpath 'com.android.tools.build:gradle:2.3.0'
     }
 }

App was failing with this error message:

A problem occurred configuring project ':nodejs-mobile-react-native'.
      > Could not resolve all files for configuration ':nodejs-mobile-react-native:classpath'.
      > Could not find com.android.tools.build:gradle:2.2.3.
      Searched in the following locations:
      - https://jcenter.bintray.com/com/android/tools/build/gradle/2.2.3/gradle-2.2.3.pom

jcenter() is deprecated, and that is what caused the issue with android build.

staltz commented 3 months ago

Great, thank you for finding this. I'll review your PR this month.

amishukla1 commented 3 months ago

Our maven build is broken. Anyway this can pushed earlier.

staltz commented 3 months ago

The PR that fixes this was merged, and version 18.17.8 was just now released.