// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.3'
        classpath 'com.google.gms:google-services:3.1.0'
        classpath 'com.google.firebase:firebase-plugins:1.1.0'
    }
}

allprojects {
    repositories {
        jcenter()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url "$rootDir/../node_modules/react-native/android"
        }
        google()
    }
}

subprojects {
    ext {
        compileSdk = 25
        buildTools = "25.0.2"
        minSdk = 16
        targetSdk = 25
    }

    afterEvaluate { project ->
        if (!project.name.equalsIgnoreCase("app")
                && project.hasProperty("android")) {
            android {
                compileSdkVersion compileSdk
                buildToolsVersion buildTools
                defaultConfig {
                    minSdkVersion minSdk
                    targetSdkVersion targetSdk
                }
            }
        }
    }
}
