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

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

apply plugin: 'com.android.library'

def safeExtGet(prop, fallback) {
    rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
}

android {
    compileSdkVersion safeExtGet('K4lVideoTrimmer_compileSdkVersion', 30)
    defaultConfig {
        minSdkVersion safeExtGet('K4lVideoTrimmer_minSdkVersion', 21)
        targetSdkVersion safeExtGet('K4lVideoTrimmer_targetSdkVersion', 30)
        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")
    }
    google()
    mavenCentral()
    jcenter()
    maven { url 'https://jitpack.io' }
}

dependencies {
    implementation "com.android.support:design:28.0.0"
    //noinspection GradleDynamicVersion
    implementation "com.facebook.react:react-native:+"
    implementation 'com.android.support.constraint:constraint-layout:2.0.4'// From node_modules
    // implementation group: 'com.google.code.gson', name: 'gson', version: '2.8.8'
//    implementation 'life.knowledge4:k4l-video-trimmer:1.0'
//    implementation 'com.github.Phoenix986:k4l-video-trimmer:a029aebb2a'
//    implementation 'com.github.AndroidDeveloperLB:VideoTrimmer:master-SNAPSHOT'
//  implementation 'com.google.android.material:material:1.3.0'
    implementation 'com.github.a914-gowtham:android-video-trimmer:1.7.0'
}
