apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    buildToolsVersion "26.0.0"
    defaultConfig {
        applicationId "co.orah.stitch360"
        minSdkVersion 24
        targetSdkVersion 26
        ndk {
            abiFilters 'arm64-v8a'
        }
        externalNativeBuild {
            cmake {
                arguments "-DGPU_BACKEND_CUDA=OFF", 
                          "-DGPU_BACKEND_OPENCL=ON",
                          "-DBUILD_EXAMPLE=OFF",
                          "-DDISABLE_OPENCL_SPIR=ON",
                          "-DCL_ARGS_WORKAROUND=ON",
                          "-DLIB_TESTS=OFF",
                          "-DBUILD_APPS=OFF",
                          "-DCLI_TESTS=OFF"
            }
        }
    }
    buildTypes {
        release {
            minifyEnabled = false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    sourceSets {
       main {
           resources.srcDirs = ['res']
           jniLibs.srcDirs = ['../libs']
           assets.srcDirs = ['assets']
       }
    }
    externalNativeBuild {
        cmake {
            path "../CMakeLists.txt"
        }
    }
}


dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:26.+'
    compile 'com.android.support:support-v4:26.+'
    testCompile 'junit:junit:4.12'
}
