/*
 * Copyright (C) 2015-present, Ant Financial Services Group
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * 	http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
apply plugin: 'com.android.library'
apply plugin: 'org.greenrobot.greendao'

android {
    compileSdkVersion rootProject.ext.compileSdkVersion
    buildToolsVersion rootProject.ext.buildToolsVersion

    publishNonDefault true
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    defaultConfig {
        minSdkVersion 18
        targetSdkVersion rootProject.ext.targetSdkVersion
        versionCode 1
        versionName "1.0"
        ndk {
            abiFilters 'armeabi-v7a', 'arm64-v8a'
        }
    }

    buildTypes {
        release {
            consumerProguardFiles 'proguard-rules.pro'
        }
        debug {
            consumerProguardFiles 'proguard-rules.pro'
        }
    }


    externalNativeBuild {
        cmake {
            path 'src/main/cpp/CMakeLists.txt'
        }
    }
}

greendao{
    schemaVersion 5
    daoPackage 'com.alipay.hulu.shared.io.db'
    targetGenDir 'src/main/java'
}

dependencies {
    compileOnly "com.google.zxing:core:3.4.0"
    compileOnly "com.alibaba:fastjson:${FASTJSON_VERSION}"
    compileOnly "androidx.appcompat:appcompat:${ANDROIDX_APPCOMPAT_VERSION}"
    compileOnly "androidx.legacy:legacy-support-v4:${ANDROIDX_SUPPORT_V4_VERSION}"
    compileOnly 'com.liulishuo.filedownloader:library:1.7.7'
    compileOnly 'com.squareup.okhttp3:okhttp:3.12.3'
    compileOnly 'org.greenrobot:greendao:3.3.0'

    compileOnly "commons-io:commons-io:${COMMON_IO_VERSION}"
    api project(':common')
}
