apply plugin: 'com.android.library'
apply from: '../module.gradle'
apply from: '../upload.gradle'

android {

    defaultConfig {

        testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'

        javaCompileOptions {
            annotationProcessorOptions {
                arguments = [HUMMER_MODULE_NAME: project.getName()]
            }
        }
    }

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

dependencies {

    implementation fileTree(dir: 'libs', include: ['*.jar'])

    api  rootProject.ext.androidx["appcompat"]
    api  rootProject.ext.androidx["annotation"]


    // Hummer
    if (project.publishArchivesType == '3') {
        api 'io.github.didi.hummer:hummer-annotation:0.2.3'
    } else {
        api 'com.didi.hummer:hummer-annotation:0.2.2'
    }
    api project(":hummer-core")
    annotationProcessor project(":hummer-compiler")

    // Yoga
    api ('com.facebook.yoga.android:yoga-layout:1.19.0') {
        exclude(group: 'com.facebook.yoga', module: 'proguard-annotations')
    }
    implementation 'com.facebook.soloader:soloader:0.10.1'

    // relinker
    implementation 'com.getkeepsafe.relinker:relinker:1.4.1'

    // Glide
    api 'com.github.bumptech.glide:glide:4.9.0'

    // OkHttp
    api 'com.squareup.okhttp3:okhttp:3.10.0'

    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.0.2'
}

uploadArchives.dependsOn(':hummer-core:uploadArchives')