|  | apply plugin: 'com.android.application'
android {
    compileSdkVersion 23
    buildToolsVersion "25.0.2"
    externalNativeBuild {
        cmake {
            path "CMakeLists.txt"
        }
    }
    signingConfigs {
        release {
            storeFile     file("${System.properties['user.home']}${File.separator}.android${File.separator}debug.keystore")
            storePassword "android"
            keyAlias      "androiddebugkey"
            keyPassword   "android"
            storeType     "jks"
        }
    }
    defaultConfig {
        applicationId "com.juce.jucedemoplugin"
        minSdkVersion    23
        targetSdkVersion 23
        externalNativeBuild {
            cmake {
                arguments "-DANDROID_TOOLCHAIN=clang", "-DANDROID_PLATFORM=android-23", "-DANDROID_STL=c++_static", "-DANDROID_CPP_FEATURES=exceptions rtti", "-DANDROID_ARM_MODE=arm", "-DANDROID_ARM_NEON=TRUE"
                cFlags "-fsigned-char"
                cppFlags "-fsigned-char", "-std=c++11"
            }
        }
    }
    buildTypes {
         debug {
             initWith debug
             debuggable    true
             jniDebuggable true
         }
         release {
             initWith release
             debuggable    false
             jniDebuggable false
             signingConfig signingConfigs.release
         }
    }
    productFlavors {
        debug_ {
            ndk {
                abiFilters "armeabi", "x86"
            }
            externalNativeBuild {
                cmake {
                    arguments "-DJUCE_BUILD_CONFIGFURATION=DEBUG"
                    cFlags    "-O0"
                    cppFlags  "-O0"
                }
            }
       }
        release_ {
            externalNativeBuild {
                cmake {
                    arguments "-DJUCE_BUILD_CONFIGFURATION=RELEASE"
                    cFlags    "-O3"
                    cppFlags  "-O3"
                }
            }
       }
    }
    variantFilter { variant ->
        def names = variant.flavors*.name
        if (names.contains ("debug_")
              && variant.buildType.name != "debug") {
            setIgnore(true)
        }
        if (names.contains ("release_")
              && variant.buildType.name != "release") {
            setIgnore(true)
        }
    }
}
 |