apply plugin: 'com.android.library'
apply from: "android_common.gradle"

android {
    defaultConfig {

        ndk {
            abiFilters 'armeabi-v7a'//, 'armeabi', 'arm64-v8a','x86', 'x86_64'
        }
        externalNativeBuild {
            cmake {
                arguments '-DANDROID_PLATFORM=android-21',
                        '-DANDROID_TOOLCHAIN=clang', '-DANDROID_STL=gnustl_static', '-DENABLE_TESTS=TRUE'
            }
        }
    }

    externalNativeBuild {
        cmake {
            path '../../../CMakeLists.txt'
        }
    }

    sourceSets {
        main {
            java.srcDirs = ['src/main/java', '../../../DiligentCore/External/Android/ndk_helper/src/java']
        }
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

buildDir './build'

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])

    implementation 'com.android.support:appcompat-v7:25.1.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.1'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
}
