plugins {
    id 'com.android.application'
    id 'kotlin-android'
}
apply plugin: 'kotlin-android'

repositories {
    google()
    mavenCentral()

    String storageUrl = System.env.FLUTTER_STORAGE_BASE_URL ?: "https://storage.googleapis.com"
    maven {
        url '../../flutter_nps/build/host/outputs/repo'
    }
    maven {
        url "$storageUrl/download.flutter.io"
    }
}

android {
    compileSdk 31

    defaultConfig {
        applicationId "com.example.newsfeed_android"
        minSdk 23
        targetSdk 31
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        profile {
            initWith debug
        }
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = '1.8'
    }
    testOptions {
        unitTests.returnDefaultValues = true
    }
    buildFeatures{
        dataBinding true
        viewBinding true
    }
}

dependencies {
    implementation 'androidx.appcompat:appcompat:1.4.1'
    implementation 'com.google.android.material:material:1.5.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
    implementation 'androidx.test.espresso:espresso-core:3.4.0'
    implementation 'androidx.test:runner:1.4.0'
    implementation 'androidx.test:rules:1.4.0'
    implementation 'androidx.test.espresso:espresso-contrib:3.4.0'
    debugImplementation 'androidx.test.ext:junit:1.1.3'
    implementation "androidx.core:core-ktx:1.7.0"
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.20-M1"
    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.9"
    debugImplementation 'com.example.flutter_nps:flutter_debug:1.0'
    profileImplementation 'com.example.flutter_nps:flutter_profile:1.0'
    releaseImplementation 'com.example.flutter_nps:flutter_release:1.0'
}