react-native-screen-brightness icon indicating copy to clipboard operation
react-native-screen-brightness copied to clipboard

Upgrade gradle setup

Open SaeedZhiany opened this issue 5 years ago • 0 comments

  1. Loaded Android Gradle Plugin conditionally

This wraps the Android Gradle plugin dependency in the buildscripts section of android/build.gradle in a conditional:

if (project == rootProject) {
    // ... (dependency here)
}

The Android Gradle plugin is only required when opening the project stand-alone, not when it is included as a dependency. By doing this, the project opens correctly in Android Studio, and it can also be consumed as a native module dependency from an application project without affecting the app project (avoiding unnecessary downloads/conflicts/etc).

for more info, you can refer to this thread and especially this comment.

  1. bumped default version of CompileSdkVersion, TargetSdkVersion,... to match with RN templates.

  2. upgraded Gradle wrapper version to 6.0.1, and script file as well.

  3. migrated to mavenCentral due to https://blog.gradle.org/jcenter-shutdown

SaeedZhiany avatar Jan 16 '20 06:01 SaeedZhiany