Advertisement
Guest User

Untitled

a guest
Feb 13th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Groovy 1.97 KB | None | 0 0
  1. // Top-level build file where you can add configuration options common to all sub-projects/modules.
  2.  
  3. buildscript {
  4.     ext {
  5.         buildToolsVersion = "28.0.2"
  6.         minSdkVersion = 19
  7.         compileSdkVersion = 28
  8.         targetSdkVersion = 27
  9.         supportLibVersion = "28.0.0"
  10.     }
  11.     repositories {
  12.         google()
  13.         jcenter()
  14.         mavenLocal()
  15.         mavenCentral()
  16.     }
  17.     dependencies {
  18.         classpath 'com.android.tools.build:gradle:3.2.1'
  19.  
  20.         // NOTE: Do not place your application dependencies here; they belong
  21.         // in the individual module build.gradle files
  22.     }
  23. }
  24.  
  25. allprojects {
  26.     repositories {
  27.         mavenCentral()
  28.         mavenLocal()
  29.         google()
  30.         jcenter()
  31.         maven {
  32.             // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
  33.             url 'https://jitpack.io'
  34.         }
  35.     }
  36. }
  37.  
  38.  
  39. task wrapper(type: Wrapper) {
  40.     gradleVersion = '4.7'
  41.     distributionUrl = distributionUrl.replace("bin", "all")
  42. }
  43.  
  44. subprojects {
  45.     subproject ->
  46.         afterEvaluate {
  47.             if ((subproject.plugins.hasPlugin('android') || subproject.plugins.hasPlugin('android-library'))) {
  48.                 android {
  49.                     variantFilter { variant ->
  50.                         def names = variant.flavors*.name
  51.                         if (names.contains("reactNative51") || names.contains("reactNative55") || names.contains("reactNative56") || names.contains("reactNative57_5")) {
  52.                             setIgnore(true)
  53.                         }
  54.                     }
  55.                 }
  56.             }
  57.         }
  58.  
  59.         project.configurations.all {
  60.             resolutionStrategy.eachDependency { details ->
  61.                 if (details.requested.group == 'com.android.support'
  62.                         && !details.requested.name.contains('multidex') ) {
  63.                     details.useVersion "26.1.0"
  64.                 }
  65.             }
  66.         }
  67. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement