ext.alwaysLib = true //虽然apply了cc-settings-2.gradle，但一直作为library编译，否则别的组件依赖此module时会报错
apply from: rootProject.file("cc-settings.gradle")
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-android'
apply plugin: 'com.jakewharton.butterknife'
apply plugin: 'org.greenrobot.greendao'
android {
    compileSdkVersion rootProject.ext.android["compileSdkVersion"]

    defaultConfig {
        minSdkVersion rootProject.ext.android["minSdkVersion"]
        targetSdkVersion rootProject.ext.android["targetSdkVersion"]
        versionCode rootProject.ext.android["versionCode"]
        versionName rootProject.ext.android["versionName"]
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        consumerProguardFiles 'consumer-rules.pro'
        multiDexEnabled true
    }

    compileOptions {
        targetCompatibility JavaVersion.VERSION_1_8
        sourceCompatibility JavaVersion.VERSION_1_8
    }

//    resourcePrefix "base"

    buildTypes {
        debug {
            buildConfigField "boolean", "LOG_DEBUG", "true"
            buildConfigField "boolean", "USE_CANARY", "true"
            minifyEnabled false
            proguardFiles 'proguard.cfg'
        }
        release {
            buildConfigField "boolean", "LOG_DEBUG", "false"
            buildConfigField "boolean", "USE_CANARY", "false"
            minifyEnabled false
            zipAlignEnabled false
            proguardFiles 'proguard.cfg'
        }
    }
    greendao {
        /**
         * 版本号
         */
        schemaVersion 1
        /**
         * greendao输出dao的数据库操作实体类文件夹（相对路径 包名+自定义路径名称，包将创建于包名的直接路径下）
         */
        daoPackage 'com.gingersoft.gsa.cloud.database.greendao'
        /**
         * greenDao实体类包文件夹
         */
        targetGenDir 'src/main/java'

        generateTests false  //设置为true以自动生成单元测试。
    }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation files('libs/javabase64-1.2.jar')
    implementation files('libs/sun.misc.BASE64Decoder.jar')
    api files('libs/nexgon5lib.jar')
    // test
    testImplementation rootProject.ext.dependencies["junit"]
    debugImplementation rootProject.ext.dependencies["canary-debug"]
    releaseImplementation rootProject.ext.dependencies["canary-release"]
    testImplementation rootProject.ext.dependencies["canary-release"]
    annotationProcessor rootProject.ext.dependencies["dagger2-compiler"]
    implementation rootProject.ext.dependencies["BaseRecyclerViewAdapter"]
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test:runner:1.2.0'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
    implementation 'com.android.support:design:28.0.0'
    implementation rootProject.ext.dependencies["fastjson"]
    implementation rootProject.ext.dependencies["zxing"]
    implementation rootProject.ext.dependencies["progressmanager"]
    implementation rootProject.ext.dependencies["BaseRecyclerViewAdapter"]
    // 數據庫
    implementation 'org.greenrobot:greendao:3.2.2'
    implementation 'org.greenrobot:greendao-generator:3.2.2'
    implementation 'com.gcssloop.recyclerview:pagerlayoutmanager:2.3.8'
    //陰影背景
    api 'com.github.lihangleo2:ShadowLayout:2.1.6'
    //時間選擇控件
    api 'com.contrarywind:Android-PickerView:3.2.4'

    implementation 'org.aspectj:aspectjrt:1.8.9'
    //商米打印庫
    api 'com.sunmi:printerlibrary:1.0.7'
    //上下拉刷新
    api 'com.scwang.smartrefresh:SmartRefreshLayout:1.1.0'
    compile "androidx.core:core-ktx:+"
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
repositories {
    mavenCentral()
}
