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

Update the Gradle Build Version #189

Open
stperona opened this issue Jun 22, 2023 · 6 comments
Open

Update the Gradle Build Version #189

stperona opened this issue Jun 22, 2023 · 6 comments

Comments

@stperona
Copy link

While attempting to build our project today we've began to experience the following error:

A problem occurred configuring project ':react-native-ssl-pinning'.
> Could not determine the dependencies of null.
   > Could not resolve all task dependencies for configuration ':react-native-ssl-pinning:classpath'.
      > Could not find com.android.tools.build:gradle:2.2.0.
        Searched in the following locations:
          - https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/2.2.0/gradle-2.2.0.pom
          - https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/2.2.0/gradle-2.2.0.pom
          - https://jcenter.bintray.com/com/android/tools/build/gradle/2.2.0/gradle-2.2.0.pom
        Required by:
            project :react-native-ssl-pinning

It appears the library still depends on Gradle v2.2.0 which is seemingly no longer available in the repos. Is it possible to get a version bump on this dependency and a new release issued?

@dhinesh-elumalai
Copy link

dhinesh-elumalai commented Jun 22, 2023

+1. Facing the same issue. Please update the version to 2.3.0 which is now available in jcenter

@m00nreal
Copy link

Facing same issue on react-native 0.70

@saravana-mitrah
Copy link

Facing the same issue any solution for that?

@JoNesVai
Copy link

facing the same issue with .71

@akucharczyk
Copy link

We fixed it with patch-package and just upgraded the version in the build.gradle

diff --git a/node_modules/react-native-ssl-pinning/android/build.gradle b/node_modules/react-native-ssl-pinning/android/build.gradle
index efb23b8..2fa38bd 100644
--- a/node_modules/react-native-ssl-pinning/android/build.gradle
+++ b/node_modules/react-native-ssl-pinning/android/build.gradle
@@ -5,7 +5,7 @@ buildscript {
     }
 
     dependencies {
-        classpath 'com.android.tools.build:gradle:2.2.0'
+        classpath 'com.android.tools.build:gradle:2.3.0'
     }
 }
 

@aykutuludag
Copy link

aykutuludag commented Jul 20, 2023

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':tasks'.
> Could not create task ':react-native-ssl-pinning:compileDebugJavaWithJavac'.
   > In order to compile Java 9+ source, please set compileSdkVersion to 30 or above

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.

TEMPORARY SOLUTION: change react-native-ssl-pinning/build.gradle as following:

buildscript {
    repositories {
        jcenter()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:2.2.0'
    }
}

apply plugin: 'com.android.library'

android {
    compileSdkVersion 33
    buildToolsVersion "33.0.2"

    defaultConfig {
        minSdkVersion 16
        targetSdkVersion 33
        compileSdkVersion 33
        versionCode 1
        versionName "1.0"
    }
    lintOptions {
        abortOnError false
    }
}

repositories {
    mavenCentral()
}

dependencies {
   implementation "com.facebook.react:react-native:+"
    implementation "com.squareup.okhttp3:okhttp:4.9.0"
    implementation "com.squareup.okio:okio:2.6.0"
    implementation "com.github.franmontiel:PersistentCookieJar:v1.0.1"
    implementation "com.squareup.okhttp3:logging-interceptor:4.9.0"
    implementation "com.squareup.okhttp3:okhttp-urlconnection:4.9.0"
}

Unfortunately this changes removes every npm/yarn install. There is a need to release update for this library.

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

7 participants