ext {
    android = [
            compileSdkVersion   : 28,
            minSdkVersion       : 16,
            targetSdkVersion    : 28,
    ]

    /* build plugins versions */
    build = [
            gradle   : "7.0.2",
            kotlin   : "1.5.31",
    ]

    buildPlugins = [
            gradle      : "com.android.tools.build:gradle:$build.gradle",
            kotlin      : "org.jetbrains.kotlin:kotlin-gradle-plugin:$build.kotlin",
    ]

    /* dependencies versions */
    def androidx_app_compat_version = '1.3.1'
    def androidx_material_version = '1.4.0'
    def junit_version = '4.13.2'

    def libs = [
            /* android support */
            supportAppCompat            :   "androidx.appcompat:appcompat:$androidx_app_compat_version",
            supportDesign               :   "com.google.android.material:material:$androidx_material_version",

            /* kotlin */
            kotlinStdlib                :   "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$build.kotlin",
    ]

    def testLibs = [
            jnuit                       :   "junit:junit:$junit_version",
    ]

    def modules = [
            library     :   ":library"
    ]

    libraryModuleDependencies = [
            /* android support */
            [configuration: "implementation", dependency: libs.supportDesign],

            /* kotlin */
            [configuration: "implementation", dependency: libs.kotlinStdlib],

            /* test */
            [configuration: "testImplementation", dependency: testLibs.jnuit],
    ]

    sampleModuleDependencies = [
            /* android support */
            [configuration: "implementation", dependency: libs.supportAppCompat],
            [configuration: "implementation", dependency: libs.supportDesign],

            /* kotlin */
            [configuration: "implementation", dependency: libs.kotlinStdlib],

            /* modules */
            [configuration: "implementation", dependency: project(modules.library)],
    ]

    def plugins = [
            android_library             : 'com.android.library',
            android_application         : 'com.android.application',
            kotlin_android              : 'kotlin-android',
            kotlin_android_extensions   : 'kotlin-android-extensions',
            kotlin_kapt                 : 'kotlin-kapt',
            maven_publish               : 'maven-publish',
    ]

    libraryModulePlugins = [
            plugins.android_library,
            plugins.kotlin_android,
            plugins.maven_publish,
    ]

    sampleModulePlugins = [
            plugins.android_application,
            plugins.kotlin_android,
    ]
}