// Top-level build file where you can add configuration options common to all sub-projects/modules.
/*
See these issues for linking problems: https://github.com/android-ndk/ndk/issues/126
and https://github.com/android-ndk/ndk/issues/153.

@1bsyl from our experience at MicroBlink we recommend having compileSdkVersion always set to latest
stable API level (currently this is 24), targetSdkVersion set to latest API level with which you
have extensively tested your app (for us this is still 23, as we cannot test with 24 because
Android N is still not released - bugs and failures on preview versions can be attributed to both
bugs in your app as well as bugs in platform itself - this is why we usually wait for Google to
release official build of new Android version and then we test on it) and minSdkVersion set to
minimum API level your app supports (for us this is still 10 :-( ).

One example where you may put your targetSdkVersion to 21, while using compileSdkVersion on 24
would be case when you have not implemented Android M permission model in your app. Similarly, if
you have not prepared your app to work in multi-window environment introduced in Android N (will it
be called Nutella?) you should not set targetSdkVersion to 24 (setting it so would mean that you
have tested your app in multi window environment and this feature will be enabled for your app on
devices running Android N).

On NDK side, you should set APP_PLATFORM to same as minSdkVersion in build.grade to be absolutely
sure your app will work correctly. However, if you need NDK features that were introduced in
later API levels, you should set APP_PLATFORM to minimum API level which gives a feature you need
and then test intensively on lower API levels to ensure everything works (this may require some
weird hacks to ensure binary built with APP_PLATFORM=android-23 to work on Gingerbread :-P ).

So we should have:

compileSdkVersion 23
buildToolsVersion 23.0.3
targetSdkVersion 21
minSdkVersion 21
APP_PLATFORM android-21

*/
buildscript {
    repositories {
        jcenter()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:4.2.1'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()
    }
    allprojects {
        gradle.projectsEvaluated {
            tasks.withType(JavaCompile) {
                options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
            }
        }
    }
}


