buildscript {
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.5.3'
        classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
    }
}

allprojects {
    group = 'org.mapsforge'
    version = 'master-SNAPSHOT'
    ext.isReleaseVersion = !version.endsWith("SNAPSHOT")

    ext.androidBuildVersionTools = "29.0.2"
    ext.gdxVersion = "1.9.10"
    ext.gwtVersion = "2.8.2"
    ext.slf4jVersion = "1.7.28"

    if (JavaVersion.current().isJava8Compatible()) {
        tasks.withType(Javadoc) {
            options.addStringOption('Xdoclint:none', '-quiet')
            logging.captureStandardError LogLevel.INFO
            logging.captureStandardOutput LogLevel.INFO
        }
    }
}

static def androidCompileSdk() { return 29 }

// 14 for Support Library, 16 for sqlite-android
static def androidMinSdk() { return 16 }

static def androidTargetSdk() { return 29 }

static def versionCode() { return 1 }

def versionName() { return version }

subprojects {
    repositories {
        google()
        maven { url 'https://repo.boundlessgeo.com/main/' }
        jcenter()
        maven { url 'https://jitpack.io' }
    }

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