apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'

android {
    compileSdkVersion 30
    buildToolsVersion "30.0.2"
    defaultConfig {
        applicationId "mono.hg"
        minSdkVersion 14
        targetSdkVersion 30
        versionCode 1510000
        versionName "1.5.1"
        vectorDrawables.useSupportLibrary = true
        buildFeatures {
            viewBinding = true
        }
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    kotlinOptions {
        jvmTarget = JavaVersion.VERSION_1_8.toString()
    }

    lintOptions {
        abortOnError false
        disable 'MissingTranslation'
    }

    buildTypes {
        debug {
            versionNameSuffix "-debug"
            resValue "string", "app_version",
                    "${defaultConfig.versionName}${versionNameSuffix}"
        }
        debugProguard {
            initWith(buildTypes.debug)
            minifyEnabled true
            shrinkResources true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            matchingFallbacks = ['debug']
        }
        release {
            minifyEnabled true
            zipAlignEnabled true
            shrinkResources true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            resValue "string", "app_version", "${defaultConfig.versionName}"
        }
    }
}

dependencies {
    testImplementation 'junit:junit:4.13.1'

    // Kotlin libraries
    implementation "androidx.core:core-ktx:+"
    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9'
    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.9'
    implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.0-beta01'
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

    // Android support libraries
    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation 'androidx.recyclerview:recyclerview:1.2.0-beta01'
    implementation 'androidx.preference:preference-ktx:1.1.1'
    implementation 'com.google.android.material:material:1.3.0-alpha04'
    implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
    implementation 'androidx.viewpager2:viewpager2:1.1.0-alpha01'

    // Other third-party libraries
    implementation 'com.simplecityapps:recyclerview-fastscroll:2.0.1'
    implementation 'eu.davidea:flexible-adapter:5.1.0'
    implementation 'com.jaredrummler:colorpicker:1.1.0'
    implementation project(':slidinguppanel:library')
}

repositories {
    mavenCentral()
}
