// Top-level build file where you can add configuration options common to all sub-projects/modules.
apply plugin: "com.github.ben-manes.versions"
apply from: "common/constants.gradle"

buildscript {
    ext.kotlin_version = "1.3.41"

    repositories {
        google()
        jcenter()
    }

    dependencies {
        classpath "com.android.tools.build:gradle:3.2.1"
        classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4"
        classpath "com.github.dcendents:android-maven-gradle-plugin:2.1"
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4"
        classpath "com.github.ben-manes:gradle-versions-plugin:0.22.0"

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()
        maven {
            url "https://oss.sonatype.org/content/repositories/snapshots"
        }
    }

    project.ext {
        releaseRepoName = rootProject.releaseRepoName
        releaseUserOrg = rootProject.releaseUserOrg
        releaseGroupId = rootProject.releaseGroupId
        releaseVersion = rootProject.releaseVersion
        releaseVersionCode = rootProject.releaseVersionCode
        releaseWebsite = rootProject.releaseWebsite
        releaseLicense = rootProject.releaseLicense

        licenseName = rootProject.licenseName
        licenseUrl = rootProject.licenseUrl
        allLicenses = rootProject.allLicenses

        developerId = rootProject.developerId
        developerName = rootProject.developerName
        developerEmail = rootProject.developerEmail

        siteUrl = rootProject.siteUrl
        gitUrl = rootProject.gitUrl
        issueTracker = rootProject.issueTracker
        releaseNotesFile = rootProject.releaseNotesFile
    }
}

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