//apply plugin: 'kotlin-android-extensions'
//apply plugin: 'kotlin-kapt'

plugins {
    id 'com.android.application'
    id 'kotlin-android'
    id 'kotlin-kapt'
}

//apply plugin: 'me.yifeiyuan.flap.plugin'

//buildscript {
//    repositories {
//
//        maven {
//            url = "$rootProject.projectDir/repos"
//        }
//
//        google()
//        jcenter()
//    }
//
//    dependencies {
//        //添加插件
////        classpath files("../flap-gradle-plugin/build/generated/libs/flap-gradle-plugin.jar")
////        classpath "me.yifeiyuan.flap:plugin:1.1.0-test"
//    }
//}

android {
    compileSdkVersion 29
    defaultConfig {
        applicationId "me.yifeiyuan.flapdev"
        minSdkVersion 17
        targetSdkVersion 29
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'

//        javaCompileOptions{
//            annotationProcessorOptions{
//                arguments = [autoRegister:'true']
//            }
//        }

        multiDexEnabled true
    }

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

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    kotlinOptions {
        jvmTarget = "1.8"
    }

    buildFeatures {
        dataBinding true
        viewBinding true
    }

    kapt {
        arguments {
            arg("packageName", "me.yifeiyuan.flapdev")
        }
    }
}


dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
    implementation 'com.google.android.material:material:1.4.0'
    implementation 'androidx.navigation:navigation-fragment:2.3.5'
    implementation 'androidx.navigation:navigation-ui:2.3.5'
    implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.3.1'
    implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1'
    implementation 'androidx.navigation:navigation-fragment-ktx:2.3.5'
    implementation 'androidx.navigation:navigation-ui-ktx:2.3.5'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.2'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'

    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

    def multidex_version = "2.0.1"
    implementation "androidx.multidex:multidex:$multidex_version"

    implementation 'androidx.recyclerview:recyclerview:1.2.1'


    implementation project(':flap')
    implementation project(':flap-animation')
    implementation project(':flap-dsl-viewbinding')
    implementation project(':flap-dsl-databinding')
//    implementation project(':flap-annotations')
//    implementation project(':flap-gradle-plugin')
//    kapt project(':flap-compiler')

    implementation 'jp.wasabeef:recyclerview-animators:4.0.2'
//    implementation 'com.google.code.gson:gson:2.9.1'

    implementation 'com.github.bumptech.glide:glide:4.13.2'
    kapt 'com.github.bumptech.glide:compiler:4.13.2'
}
