apply plugin: 'com.android.library'

def safeExtGet(prop, fallback) {
    rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
}

android {
    compileSdkVersion safeExtGet("compileSdkVersion", 28)
    buildToolsVersion safeExtGet("buildToolsVersion", '28.0.3')

    defaultConfig {
        minSdkVersion safeExtGet('minSdkVersion', 20)
        targetSdkVersion safeExtGet('targetSdkVersion', 26)
        versionCode 1
        versionName "1.0"
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])

    // React Native
    implementation "com.facebook.react:react-native:+"

//     Mapbox SDK
    implementation 'flightmapsdk.flightmaplightsdk:flightmap:1.4.0'
//    implementation 'flightmap:mapbox-sdk-services:5.1.2'
//    implementation 'flightmap.flightmapnavigationsdk:mapbox-android-plugin-annotation-v9:1.45.0'
////        implementation 'com.mapbox.mapboxsdk:mapbox-sdk-services:5.1.0'
////    implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:9.1.0'
////    implementation 'com.mapbox.mapboxsdk:mapbox-android-plugin-annotation-v9:0.8.0'
//
//    // Dependencies
//    implementation "com.android.support:support-vector-drawable:${safeExtGet('supportLibVersion', '28.0.0')}"
//    implementation "com.android.support:support-annotations:${safeExtGet('supportLibVersion', '28.0.0')}"
//    implementation "com.android.support:appcompat-v7:${safeExtGet('supportLibVersion', '28.0.0')}"
//    implementation "com.squareup.okhttp3:okhttp:${safeExtGet('okhttpVersion', '3.12.1')}"
//
//    // Mapbox plugins
////    implementation 'com.mapbox.mapboxsdk:mapbox-android-gestures:0.6.0'
//    implementation 'com.mapbox.mapboxsdk:mapbox-android-plugin-localization-v9:0.12.0'
//    implementation 'com.mapbox.mapboxsdk:mapbox-android-plugin-markerview-v9:0.4.0'
//    implementation 'com.mapbox.mapboxsdk:mapbox-sdk-turf:5.1.0'
    implementation 'flightmap.flightmapnavigationsdk:flightmap-android-plugin-markerview-v9:1.2.1'
    implementation 'flightmap.flightmapnavigationsdk:mapbox-android-plugin-localization-v9:1.2.1'
    implementation 'flightmap:mapbox-sdk-turf:5.1.2'
}
