buildscript { /** * Kotlin统一版本 */ //ext.kotlin_version = '1.3.21' ext.kotlin_version = "1.5.10" /** * Aop编制版本 */ ext.aspectj_version = '1.8.9' /** * 是否开启单独Module编译 */ ext.componentTag = false /** * 路由注解处理器版本 */ ext.router_version = '1.0.2' /** * kawo组件化框架版本 */ ext.kawo_version = '1.0.9' /** * SDK最小支持版本 */ ext.min_sdk_version = 24 /** * SDK目标支持版本 */ ext.target_sdk_version = 30 /** * APP类型版本,参考: https://inxsfc.notion.site/APP-4d9b6bfee5c24b91b8f4337ca0830423 * YD-S5-W_QIN2PRO-2: 多亲手机 * ... */ ext.app_device_type = "yd_w_gionee_2" //腕表类型:g6s,asr ext.watch_type = "" if (app_device_type == "yd_s5_w_qin2_2") { ext.build_tools_version = "26.0.2" ext.support_library_version = "26.1.0" //多亲手机版本 ext.app_version_code = 153 ext.app_version = "1.4.4_qin2" } else if (app_device_type == "yd_s5_w_qin2_2_chile") { ext.build_tools_version = "26.0.2" ext.support_library_version = "26.1.0" //多亲手机版本-智利项目 ext.app_version_code = 145 ext.app_version = "1.4.2_qin2" } else if (app_device_type == "yd_w_xiaomi_2") { ext.build_tools_version = "30.0.2" ext.support_library_version = "28.0.0" //小米手机版本 ext.app_version_code = 163 ext.app_version = "1.4.14_rm" } else if (app_device_type == "yd_w_xiaomi_2_chile") { ext.build_tools_version = "30.0.2" ext.support_library_version = "28.0.0" //小米手机版本 ext.app_version_code = 156 ext.app_version = "1.4.7_rm" } else if (app_device_type == "yd_w_gionee_2") { ext.build_tools_version = "30.0.2" ext.support_library_version = "28.0.0" //金立手机,L2型号Android 14版手机 ext.app_version_code = 175 ext.app_version = "1.4.25_gn" } else if (app_device_type == "yd_w_gionee_2_chile") { ext.build_tools_version = "30.0.2" ext.support_library_version = "28.0.0" //金立手机 ext.app_version_code = 160 ext.app_version = "1.4.10_gn" } else if (app_device_type == "yd_watch_2") { ext.build_tools_version = "26.0.2" ext.support_library_version = "26.1.0" //腕表类型:g6s,asr ext.watch_type = "asr" if (watch_type == "g6s") { //g6s腕表 ext.app_version_code = 10005 ext.app_version = "1.10.5_g6s" } else if (watch_type == "asr") { //新款asr H07腕表 ext.app_version_code = 6 ext.app_version = "1.1.6_asr" } else { //其他腕表 ext.app_version_code = 11 ext.app_version = "1.4.2_watch" } } else { /** * SDK编译版本 */ ext.build_tools_version = "26.0.2" /** * 支持库版本 */ ext.support_library_version = "26.1.0" ext.app_version_code = 139 ext.app_version = "1.3.57" } /** * 项目依赖库 */ dependencies { repositories { /** * 依赖仓储 */ maven { url 'https://maven.aliyun.com/nexus/content/repositories/google' } maven { url 'https://maven.aliyun.com/nexus/content/repositories/jcenter'} maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' } maven { url 'https://jitpack.io' } google() } /** * Gradle插件 */ classpath "com.android.tools.build:gradle:4.2.2" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files /** * Kawo组件化插件 */ classpath "com.enation.geamtear.gradle:kawo:$kawo_version" /** * KotlinGradle插件 */ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" /** * Kotlin辅助工具 */ classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version" /** * Aop埋点相关 */ classpath "org.aspectj:aspectjtools:$aspectj_version" } repositories { maven { url 'https://maven.aliyun.com/nexus/content/repositories/google' } maven { url 'https://maven.aliyun.com/nexus/content/repositories/jcenter'} maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' } maven { url 'https://jitpack.io' } google() } } /** * 统一依赖仓储 */ allprojects { repositories { maven { url 'https://maven.aliyun.com/nexus/content/repositories/google' } maven { url 'https://maven.aliyun.com/nexus/content/repositories/jcenter'} maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' } maven { url 'https://jitpack.io' } //maven { url 'https://dl.bintray.com/geamtear/maven' } google() flatDir { dirs '../common/libs' //申明本地库 } } tasks.withType(Javadoc) { // 新增 options.addStringOption('Xdoclint:none', '-quiet') options.addStringOption('encoding', 'UTF-8') } } /** * 清除Build配置时 删除根目录Build文件夹 */ task clean(type: Delete) { delete rootProject.buildDir }