task checkArguments {
    try {
        getProperty('EXIST_DEFAULT_ARGS')
    } catch (Exception e) {
        def log = "You should define some arguments in *.properties, like this :\n" +
                "\n" +
                "EXIST_DEFAULT_ARGS\n" +
                "\n" +
                "ANDROID_GRADLE_VERSION=2.2.0-alpha3\n" +
                "COMPILE_SDK_VERSION=24\n" +
                "BUILD_TOOLS_VERSION=24.0.0\n" +
                "TARGET_SDK_VERSION=24\n" +
                "MIN_SDK_VERSION=21\n" +
                "SUPPORT_VERSION=24.0.0\n" +
                "DEFAULT_ENCODING=UTF-8"

        throw new NullPointerException(log)
    }
}

checkArguments

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath "com.android.tools.build:gradle:${ANDROID_GRADLE_VERSION}"
        classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
    }
}

apply from: "${rootProject.rootDir}/scripts/dependencyDefinitions.gradle"
apply from: "${rootProject.rootDir}/scripts/variants.gradle"

// See http://blog.joda.org/2014/02/turning-off-doclint-in-jdk-8-javadoc.html.
if (JavaVersion.current().isJava8Compatible()) {
    allprojects {
        tasks.withType(Javadoc) {
            options.addStringOption('Xdoclint:none', '-quiet')
        }
    }
}

subprojects { project ->
    repositories {
        jcenter()
        mavenCentral()
        maven {
            url getProperty('LOCAL_REPOSITORY_URL')
        }
        maven {
            url getProperty('SNAPSHOT_REPOSITORY_URL')
        }
    }

    tasks.withType(JavaCompile) {
        options.encoding = "UTF-8"
        sourceCompatibility = JavaVersion.VERSION_1_7
        targetCompatibility = JavaVersion.VERSION_1_7
    }
}

task wrapper(type: Wrapper) {
    gradleVersion = '3.3'
}

task clean(type: Delete) {
    delete rootProject.buildDir
}





