
buildscript {
    if (project == rootProject) {
        repositories {
            google()
            jcenter()
        }

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

apply plugin: 'com.android.library'
apply plugin: 'maven-publish'
def safeExtGet(prop, fallback) {
    rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
}

android {
    compileSdkVersion safeExtGet('RNDyteSDK_compileSdkVersion', 31)
    buildToolsVersion safeExtGet('RNDyteSDK_buildToolsVersion', '29.0.3')
    defaultConfig {
        minSdkVersion safeExtGet('RNDyteSDK_minSdkVersion', 16)
        targetSdkVersion safeExtGet('RNDyteSDK_targetSdkVersion', 31)
        versionCode 1
        versionName "1.0"

    }

    buildTypes {
        release {
            minifyEnabled false
        }
    }
    lintOptions {
        disable 'GradleCompatible'
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

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

dependencies {
    //noinspection GradleDynamicVersion
    implementation "com.facebook.react:react-native:+"  // From node_modules
    implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
    implementation "androidx.exifinterface:exifinterface:1.3.1"
    implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'
    
    

    implementation('com.google.protobuf:protobuf-javalite') {
        version {
            strictly '[3.0, 4.0['
        }
    }
    implementation files('libs/classes.jar')


}
