apply plugin: 'com.android.application'

apply plugin: 'kotlin-android'

apply plugin: 'kotlin-android-extensions'

//apply from: 'https://raw.githubusercontent.com/apache/incubator-weex/release/0.28/android/sdk/buildSrc/download_jsc.gradle'

//apply plugin: 'org.greenrobot.greendao'

androidExtensions {
    experimental = true
}
android {
    compileSdkVersion 30
    buildToolsVersion "30.0.3"
    defaultConfig {
        applicationId "com.yzx.escreen"
//        minSdkVersion 26
        minSdkVersion 21
        targetSdkVersion 25
        versionCode 30000
        versionName "3.0.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

//        ndk {
//            abiFilters "armeabi-v7a", "arm64-v8a", "x86"
//        }
    }
    signingConfigs {
        yzx {
            keyAlias ALIAS_NAME
            keyPassword ALIAS_PWD
            storeFile file(KEY_PATH)
            storePassword KEY_PWD
            v2SigningEnabled false
        }
        release {
//            storeFile file("../buildKey/wenote.jks")
//            keyAlias 'wetao'
//            keyPassword 'lhb@123'
//            storePassword 'lhb@123'
            keyAlias ALIAS_NAME
            keyPassword ALIAS_PWD
            storeFile file(KEY_PATH)
            storePassword KEY_PWD
            v2SigningEnabled false
        }
        debug {
//            storeFile file("../buildKey/wenote.jks")
//            keyAlias 'wetao'
//            keyPassword 'lhb@123'
//            storePassword 'lhb@123'
            keyAlias ALIAS_NAME
            keyPassword ALIAS_PWD
            storeFile file(KEY_PATH)
            storePassword KEY_PWD
            v2SigningEnabled false
        }
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
//            zipAlignEnabled true
//            debuggable false
            signingConfig signingConfigs.release
            // 移除无用的resource文件
//            shrinkResources false
            buildConfigField "String", "BASE_URL", '"https://oa.qbjjyyun.net/api"'
            buildConfigField "String", "M_URL", '"https://m.qbjjyyun.net"'
            buildConfigField "String", "OA_URL", '"https://oa.qbjjyyun.net"'
            buildConfigField "String", "APP_NAME", '"一体化平台"'
            buildConfigField "String", "MP_APPID", '"wx358f1c471740cb95"'
            buildConfigField "String", "WS_URL", '"wss://oa.qbjjyyun.net/ws2api/"'
//            buildConfigField "String", "BASE_URL", '"http://192.168.69.99:9009"'
//            buildConfigField "String", "M_URL", '"http://192.168.69.99:8098"'
//            buildConfigField "String", "APP_NAME", '"家校互通（测试）"'
        }

        debug {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            debuggable true
            signingConfig signingConfigs.release
            // 移除无用的resource文件
            shrinkResources false
//            buildConfigField "String", "BASE_URL", '"http://192.168.69.99:9009"'
//            buildConfigField "String", "M_URL", '"http://192.168.69.112:8098"'
//            buildConfigField "String", "BASE_URL", '"https://oa.qbjjyyun.net/api"'
            buildConfigField "String", "OA_URL", '"https://oa.live.educlouddata.com"'
//            buildConfigField "String", "OA_URL", '"http://192.168.69.114:3000"'
            buildConfigField "String", "M_URL", '"https://m.live.educlouddata.com/"'
            buildConfigField "String", "BASE_URL", '"https://oa.live.educlouddata.com/api"'
            buildConfigField "String", "APP_NAME", '"一体化平台（开发）"'
            buildConfigField "String", "MP_APPID", '"wxbb397ddae71bb14c"'
//            buildConfigField "String", "WS_URL", '"ws://192.168.69.114:9801/"'
            buildConfigField "String", "WS_URL", '"wss://oa.live.educlouddata.com/ws2api/"'
        }

        yzx_test {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            debuggable true
            signingConfig signingConfigs.release
            // 移除无用的resource文件
//            shrinkResources false
            buildConfigField "String", "BASE_URL", '"http://192.168.69.99:9009"'
            buildConfigField "String", "M_URL", '"http://192.168.69.99:8098"'
            buildConfigField "String", "APP_NAME", '"家校互通（测试）"'
            buildConfigField "String", "MP_APPID", '"wxbb397ddae71bb14c"'
            buildConfigField "String", "WS_URL", '"wss://oa.live.educlouddata.com/ws2api/"'
        }

        applicationVariants.all { variant ->
            variant.outputs.all { output ->
                def fileName
                fileName = "Yzx_escreen_${variant.versionName}.apk"
                output.outputFileName = fileName
            }
        }

    }

    lintOptions {
        checkReleaseBuilds false
        // Or, if you prefer, you can continue to check for errors in release builds,
        // but continue the build even when errors are found:
        abortOnError false
    }

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


//greendao{
//    schemaVersion 4
//    daoPackage 'com.yzx.webebook.model.gen'
//    targetGenDir 'src/main/java'
//}

repositories {
    maven {
        url 'https://dl.bintray.com/qichuan/maven/'
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation "org.jetbrains.anko:anko:$anko_version"
    // 基础依赖包，必须要依赖
    implementation 'com.gyf.immersionbar:immersionbar:3.0.0'
    // fragment快速实现（可选）
    implementation 'com.gyf.immersionbar:immersionbar-components:3.0.0'
    // kotlin扩展（可选）
    implementation 'com.gyf.immersionbar:immersionbar-ktx:3.0.0'
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'com.google.android.material:material:1.1.0'
    implementation 'androidx.core:core-ktx:1.2.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.0'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
    implementation 'com.github.bumptech.glide:glide:4.11.0'
    implementation 'com.lzy.net:okgo:3.0.4'
    implementation 'com.blankj:utilcodex:1.30.5'
    implementation 'com.google.code.gson:gson:2.8.6'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
    implementation 'com.github.AlexLiuSheng:CheckVersionLib:2.4.1_androidx'
    // 友盟统计SDK
    implementation 'com.umeng.umsdk:common:9.3.6' // 必选
    implementation 'com.umeng.umsdk:asms:1.2.1' // 必选
    implementation 'com.github.thomhurst:RoundImageView:1.0.2'
    implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:3.0.4'

//    implementation 'org.apache.weex:sdk:0.28.0'
//    implementation 'com.alibaba:fastjson:1.1.46.android'


    //ORM Database
//    implementation deps.greendao.runtime
//    testImplementation deps.testing.junit

    //RxJava
//    implementation deps.reactivex.rxandroid
//    implementation deps.reactivex.rxjava2

    implementation 'es.voghdev.pdfviewpager:library:1.1.2'

    implementation 'io.github.h07000223:flycoTabLayout:3.0.0'
    implementation 'com.qmuiteam:qmui:2.0.0-alpha10'

    api 'com.tencent.tbs:tbssdk:44181'
    implementation 'com.github.HuanTanSheng:EasyPhotos:3.1.5'

    implementation("org.greenrobot:eventbus:3.3.1")

    implementation 'com.github.chrisbanes:PhotoView:2.0.0'

    implementation "org.java-websocket:Java-WebSocket:1.5.1"
}
