apply plugin: 'com.android.library'
apply plugin: 'org.jetbrains.kotlin.android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-parcelize'
apply plugin: 'com.google.devtools.ksp'

android {
    compileSdkVersion rootProject.ext.compileSdkVersion

    defaultConfig {
        if (!isRelease.toBoolean()) {
            applicationId "com.gh.floatingwindow"
            multiDexEnabled true
        }
        minSdk rootProject.ext.minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion
        versionCode rootProject.ext.versionCode
        versionName rootProject.ext.versionName

        buildConfigField "String", "API_HOST", "\"${API_HOST}\""

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildFeatures {
        viewBinding true
    }

    sourceSets {
        main {
            manifest.srcFile 'src/main/AndroidManifest.xml'
            java {
                exclude 'manifest/**'
            }
        }
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    kotlinOptions {
        jvmTarget = '1.8'
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }

}

dependencies {
    implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs')
    ksp "cn.therouter:apt:${routerVersion}"
    kapt "com.google.auto.service:auto-service:${autoServiceVersion}"
    implementation(project(path: ":module_common")) {
        exclude group: 'androidx.swiperefreshlayout'
    }
    implementation(project(':module_core_feature')) {
        exclude group: 'androidx.swiperefreshlayout'
    }
    implementation(project(path: ":module_login")) {
        exclude group: 'androidx.swiperefreshlayout'
    }
    implementation ("com.lg:easyfloat:${easyFloat}")
}