import java.text.SimpleDateFormat plugins { id 'com.android.application' id 'org.jetbrains.kotlin.android' id 'kotlin-kapt' id 'kotlinx-serialization' } ext{ versionCode=Integer.parseInt(new SimpleDateFormat("yyMMddHH").format(new Date()) + 1) // versionCode=230617180 // brandCode="036I" brandCode="000A" model="1039" } android { compileSdk 31 lintOptions { checkReleaseBuilds false } defaultConfig { applicationId "com.develop.foodcooking" minSdk 21 targetSdk 31 versionCode project.ext.versionCode versionName "${project.ext.model}.${project.ext.brandCode}.${project.ext.versionCode}" archivesBaseName = "cofar-cooking_${versionName}" javaCompileOptions { annotationProcessorOptions { arguments = ["room.schemaLocation": "$projectDir/schemas".toString()] } } ndk { abiFilters 'armeabi-v7a' } packagingOptions { pickFirst 'lib/armeabi-v7a/libc++_shared.so' } testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" kapt { arguments { arg("AROUTER_MODULE_NAME", project.getName()) arg("room.schemaLocation", "$projectDir/schemas".toString()) } } multiDexEnabled true } flavorDimensions "platform" productFlavors { brand000ATuya { dimension "platform" applicationId "com.develop.foodcooking" buildConfigField("String", "UpdatePlatform", "\"normal\"") resValue("string", "app_theme", "@style/SplashTheme") buildConfigField("String", "model", "\"1039\"") buildConfigField("String", "brandCode", "\"000A\"") //appCode 1.01 指向bug修复,2.01指向功能变更 buildConfigField("String", "appCode", "\"1.01\"") // buildConfigField("String", "appCode", "\"2.01\"") } brand045ATuya { dimension "platform" applicationId "com.develop.foodcooking" buildConfigField("String", "UpdatePlatform", "\"normal\"") resValue("string", "app_theme", "@style/SplashThemeNotLogo") } // brand011ATuya { // dimension "platform" // applicationId "com.develop.foodcooking" // buildConfigField("String", "UpdatePlatform", "\"normal\"") // resValue("string", "app_theme", "@style/Splash007DTheme") // // } brand011ATuya { dimension "platform" applicationId "com.develop.foodcooking" buildConfigField("String", "UpdatePlatform", "\"011A\"") resValue("string", "app_theme", "@style/Splash011ATheme") buildConfigField("String", "model", "\"1039\"") buildConfigField("String", "brandCode", "\"011A\"") } brand011A5037Tuya { dimension "platform" applicationId "com.develop.foodcooking" buildConfigField("String", "UpdatePlatform", "\"011A\"") resValue("string", "app_theme", "@style/Splash011A5037Theme") buildConfigField("String", "model", "\"5037\"") buildConfigField("String", "brandCode", "\"011A\"") } brand017ATuya { dimension "platform" applicationId "com.develop.foodcooking" buildConfigField("String", "UpdatePlatform", "\"normal\"") resValue("string", "app_theme", "@style/Splash017Theme") } brand030ATuya { dimension "platform" applicationId "com.develop.foodcooking" buildConfigField("String", "UpdatePlatform", "\"normal\"") resValue("string", "app_theme", "@style/SplashTheme") buildConfigField("String", "model", "\"1039\"") buildConfigField("String", "brandCode", "\"030A\"") //appCode 1.01 指向bug修复,2.01指向功能变更 buildConfigField("String", "appCode", "\"1.01\"") // buildConfigField("String", "appCode", "\"2.01\"") } brand029CTuya { dimension "platform" applicationId "com.develop.foodcooking" buildConfigField("String", "UpdatePlatform", "\"normal\"") resValue("string", "app_theme", "@style/Splash029CTheme") } brand036I { dimension "platform" applicationId "com.develop.foodcooking" buildConfigField("String", "UpdatePlatform", "\"036I\"") resValue("string", "app_theme", "@style/Splash036IDTheme") } brand036ITuya { dimension "platform" applicationId "com.develop.foodcooking" buildConfigField("String", "UpdatePlatform", "\"036I\"") resValue("string", "app_theme", "@style/Splash036IDTheme") } brand000A { dimension "platform" applicationId "com.develop.foodcooking" buildConfigField("String", "UpdatePlatform", "\"normal\"") resValue("string", "app_theme", "@style/SplashTheme") buildConfigField("String", "model", "\"1039\"") buildConfigField("String", "brandCode", "\"000A\"") } brand010D { dimension "platform" applicationId "com.develop.foodcooking" buildConfigField("String", "UpdatePlatform", "\"night\"") resValue("string", "app_theme", "@style/Splash010DTheme") } brand030A { dimension "platform" applicationId "com.develop.foodcooking" resValue("string", "app_theme", "@style/SplashTheme") buildConfigField("String", "UpdatePlatform", "\"normal\"") buildConfigField("String", "model", "\"1039\"") buildConfigField("String", "brandCode", "\"030A\"") //appCode 1.01 指向bug修复,2.01指向功能变更 buildConfigField("String", "appCode", "\"1.01\"") } brand032DTuya { dimension "platform" applicationId "com.develop.foodcooking" buildConfigField("String", "UpdatePlatform", "\"normal\"") resValue("string", "app_theme", "@style/Splash032DTheme") } brand032D { dimension "platform" applicationId "com.develop.foodcooking" buildConfigField("String", "UpdatePlatform", "\"normal\"") resValue("string", "app_theme", "@style/Splash032DTheme") } brand002DTuya { dimension "platform" applicationId "com.develop.foodcooking" buildConfigField("String", "UpdatePlatform", "\"normal\"") resValue("string", "app_theme", "@style/Splash002DTheme") } brand007DTuya { dimension "platform" applicationId "com.develop.foodcooking" buildConfigField("String", "UpdatePlatform", "\"normal\"") resValue("string", "app_theme", "@style/Splash007DTheme") } brand054ATuya { dimension "platform" applicationId "com.develop.foodcooking" buildConfigField("String", "UpdatePlatform", "\"054A\"") resValue("string", "app_theme", "@style/Splash054ATheme") } } signingConfigs { debug { storeFile file('..\\signature\\rk.jks') storePassword '123456' keyAlias 'rk' keyPassword '123456' } foodCooking { storeFile file("..\\signature\\rk.jks") storePassword '123456' keyAlias 'rk' keyPassword '123456' } release { storeFile file('..\\signature\\rk.jks') storePassword '123456' keyAlias 'rk' keyPassword '123456' } } buildTypes { release { minifyEnabled false debuggable true productFlavors.brand010D.signingConfig signingConfigs.release productFlavors.brand029CTuya.signingConfig signingConfigs.release productFlavors.brand000ATuya.signingConfig signingConfigs.release productFlavors.brand030A.signingConfig signingConfigs.release productFlavors.brand011ATuya.signingConfig signingConfigs.release productFlavors.brand036ITuya.signingConfig signingConfigs.release productFlavors.brand030ATuya.signingConfig signingConfigs.release productFlavors.brand017ATuya.signingConfig signingConfigs.release productFlavors.brand036I.signingConfig signingConfigs.release productFlavors.brand000A.signingConfig signingConfigs.release productFlavors.brand045ATuya.signingConfig signingConfigs.release productFlavors.brand032DTuya.signingConfig signingConfigs.release productFlavors.brand032D.signingConfig signingConfigs.release productFlavors.brand002DTuya.signingConfig signingConfigs.release proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } debug{ debuggable true productFlavors.brand032DTuya.signingConfig signingConfigs.debug // buildConfigField("String", "UpdatePlatform", "\"054A\"") ////// buildConfigField("String", "FLAVOR", "\"brand054ATuya\"") // resValue("string", "app_theme", "@style/Splash054ATheme") // buildConfigField("String", "UpdatePlatform", "\"011A\"") // resValue("string", "app_theme", "@style/Splash011A5037Theme") // buildConfigField("String", "model", "\"5037\"") // buildConfigField("String", "brandCode", "\"011A\"") buildConfigField("String", "UpdatePlatform", "\"normal\"") resValue("string", "app_theme", "@style/SplashTheme") buildConfigField("String", "model", "\"1039\"") buildConfigField("String", "brandCode", "\"030A\"") //versionCode 1.01 指向bug修复,2.01指向功能变更 buildConfigField("String", "appCode", "\"1.01\"") // buildConfigField("String", "appCode", "\"2.01\"") // resValue("string", "app_theme", "@style/SplashTheme") // buildConfigField("String", "UpdatePlatform", "\"normal\"") // buildConfigField("String", "model", "\"5037\"") // //versionCode 1.01 指向bug修复,2.01指向功能变更 // buildConfigField("String", "appCode", "\"1.01\"") // buildConfigField("String", "appCode", "\"2.01\"") } } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } kotlinOptions { jvmTarget = '1.8' } viewBinding { enabled = true } } dependencies { implementation project(path: ':libBase') //基础工具模块,不涉及业务逻辑 implementation project(path: ':BusinessCommon')//业务相关的基础类 implementation project(path: ':BusinessMain') //烹饪主模块 implementation project(path: ':BusinessAuth')//登录-注册-个人信息模块 implementation project(path: ':BusinessSetting') //设置模块 implementation project(path: ':BusinessStep') //烹饪步骤模块 kapt 'com.alibaba:arouter-compiler:1.5.2' }