apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
group = 'com.github.0xm1nam0'
//apply plugin: 'me.tatarka.retrolambda'

// Java8 not fully supported in library projects yet, https://code.google.com/p/android/issues/detail?id=211386
// this is a temporary workaround to get at least lambdas compiling
/*gradle.projectsEvaluated {
    tasks.withType(JavaCompile) {
        options.compilerArgs << "-Xbootclasspath/a:" + System.properties.get("java.home") + "/lib/rt.jar"
    }
}*/

android {

    def globalConfiguration = rootProject.extensions.getByName("ext")

    compileSdkVersion globalConfiguration["androidCompileSdkVersion"]

    defaultConfig {
        minSdkVersion globalConfiguration["androidMinSdkVersion"]
        targetSdkVersion globalConfiguration["androidTargetSdkVersion"]
        versionCode globalConfiguration["androidVersionCode"]
        versionName globalConfiguration["androidVersionName"]

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

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    lintOptions {
        abortOnError false
    }
}

dependencies {
    api fileTree(dir: 'libs', include: ['*.jar'])

    implementation "androidx.appcompat:appcompat:$rootProject.ext.supportXVersion"
    implementation "com.google.android.material:material:$rootProject.ext.supportXVersion"
    implementation "androidx.recyclerview:recyclerview:$rootProject.ext.supportXVersion"
    implementation "androidx.legacy:legacy-support-v4:$rootProject.ext.supportXVersion"

    annotationProcessor "com.jakewharton:butterknife-compiler:$rootProject.ext.butterknifeVersion"
    implementation "com.jakewharton:butterknife:$rootProject.ext.butterknifeVersion"
    implementation 'com.github.bumptech.glide:glide:4.10.0'

    implementation "io.reactivex.rxjava2:rxjava:$rootProject.ext.rxjava2Version"
    implementation "com.squareup.retrofit2:retrofit:$rootProject.ext.retrofit2Version"
    implementation "com.squareup.retrofit2:adapter-rxjava2:$rootProject.ext.retrofit2Version"
    implementation "com.squareup.retrofit2:converter-gson:$rootProject.ext.retrofit2Version"
//    api 'com.jakewharton.retrofit:retrofit2-rxjava2-adapter:1.0.0'
    implementation 'com.squareup.okhttp3:logging-interceptor:3.6.0'
    implementation "io.reactivex.rxjava2:rxandroid:$rootProject.ext.rxAndroidVersion"
    implementation 'in.srain.cube:ultra-ptr:1.0.11'
    implementation 'com.drakeet.multitype:multitype:4.1.1'
    debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.5'
    releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.5'
    implementation "com.google.code.gson:gson:$rootProject.ext.gsonVersion"
    implementation "com.flyco.systembar:FlycoSystemBar_Lib:1.0.0@aar"
    implementation "com.github.0xm1nam0:Common:$rootProject.ext.commonVersion"
//    debugApi 'com.github.BolexLiu.AutoEx:AutoEx-Lib:v1.0.8'
//    releaseApi 'com.github.BolexLiu.AutoEx:AutoEx-Lib-No-Op:v1.0.8'
}


//apply from: 'publish.gradle'