MinaSamir11 / react-native-in-app-review

The Google Play In-App Review API, App store rating API lets you prompt users to submit Play Store or App store ratings and reviews without the inconvenience of leaving your app or game.
MIT License
647 stars 57 forks source link

buildToolsVersion causing Gradle failure #78

Closed dnedrow closed 2 years ago

dnedrow commented 2 years ago

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch react-native-in-app-review@3.2.2 for the project I'm working on.

I just added react-native-in-app-review@3.2.2 to my project and immediately ran into an issue where the package attempted to use build tools 28.0.3 for the Android. This caused Gradle to fail.

The Android build tools are now automatically selected based on the compileSdkVersion, so there is really no longer any need for buildToolsVersion safeExtGet('buildToolsVersion').

I figured I'd open a issue for you to consider.

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-in-app-review/android/build.gradle b/node_modules/react-native-in-app-review/android/build.gradle
index 4dcb5b9..4e301f7 100755
--- a/node_modules/react-native-in-app-review/android/build.gradle
+++ b/node_modules/react-native-in-app-review/android/build.gradle
@@ -29,7 +29,6 @@ def safeExtGet(name) {

 android {
   compileSdkVersion safeExtGet('compileSdkVersion')
-  buildToolsVersion safeExtGet('buildToolsVersion')

   defaultConfig {
     minSdkVersion safeExtGet('minSdkVersion')

This issue body was partially generated by patch-package.

MinaSamir11 commented 2 years ago

@dnedrow Thank you, l appreciate your help and giving me a shout 😀 I will test it and make a change in v3.2.3

EvanSays commented 2 years ago

@MinaSamir11 We're appreciative of your package at Cerebral. We're about to update to the latest. When can we expect the 3.2.3 update?

MinaSamir11 commented 2 years ago

@EvanSays Sorry for late, going to fix these issue tonight within the following hours.

Thank you ❤️