apply from: "../lib_default_config.gradle" apply plugin: 'dagger.hilt.android.plugin' android { defaultConfig { //读取配置表的值 boolean mIsReleaseUrl = rootProject.ext.isReleaseUrl String helpCenterUrl String qaWebUrl String partTimeCreditHomeUrl String partTimeCreditTransactionsUrl String partTimeCreditRulesUrl String partTimeTrainRuleUrl String partTimeTrainAnswerUrl String partTimeTrainResultUrl String partTimeTrainCertificateUrl //判断是正式环境还是测试环境 if (mIsReleaseUrl) { String baseUrlRelese = rootProject.ext.baseUrl_relese buildConfigField 'String', 'Base_Url', "\"${baseUrlRelese}\"" helpCenterUrl = rootProject.ext.help_center_relese_url qaWebUrl = rootProject.ext.parttime_qa_relese_url partTimeCreditHomeUrl = rootProject.ext.part_time_credit_home_relese_url partTimeCreditTransactionsUrl = rootProject.ext.part_time_credit_credit_transactions_relese_url partTimeCreditRulesUrl = rootProject.ext.part_time_credit_credit_rules_relese_url partTimeTrainRuleUrl = rootProject.ext.part_time_train_rule_relese_url partTimeTrainAnswerUrl = rootProject.ext.part_time_train_answer_relese_url partTimeTrainResultUrl = rootProject.ext.part_time_train_result_relese_url partTimeTrainCertificateUrl = rootProject.ext.part_time_train_certificate_relese_url } else { String baseUrlDev = rootProject.ext.baseUrl_dev buildConfigField 'String', 'Base_Url', "\"${baseUrlDev}\"" helpCenterUrl = rootProject.ext.help_center_dev_url qaWebUrl = rootProject.ext.parttime_qa_dev_url partTimeCreditHomeUrl = rootProject.ext.part_time_credit_home_dev_url partTimeCreditTransactionsUrl = rootProject.ext.part_time_credit_credit_transactions_dev_url partTimeCreditRulesUrl = rootProject.ext.part_time_credit_credit_rules_dev_url partTimeTrainRuleUrl = rootProject.ext.part_time_train_rule_dev_url partTimeTrainAnswerUrl = rootProject.ext.part_time_train_answer_dev_url partTimeTrainResultUrl = rootProject.ext.part_time_train_result_dev_url partTimeTrainCertificateUrl = rootProject.ext.part_time_train_certificate_dev_url } buildConfigField 'String', 'Help_Center_URL', "\"${helpCenterUrl}\"" buildConfigField 'String', 'Part_Time_QA_Url', "\"${qaWebUrl}\"" buildConfigField 'String', 'Part_Time_Credit_Home_URL', "\"${partTimeCreditHomeUrl}\"" buildConfigField 'String', 'Part_Time_Credit_Transaction_URL', "\"${partTimeCreditTransactionsUrl}\"" buildConfigField 'String', 'Part_Time_Credit_Rules_URL', "\"${partTimeCreditRulesUrl}\"" buildConfigField 'String', 'Part_Time_Train_Rule_URL', "\"${partTimeTrainRuleUrl}\"" buildConfigField 'String', 'Part_Time_Train_Answer_URL', "\"${partTimeTrainAnswerUrl}\"" buildConfigField 'String', 'Part_Time_Train_Result_URL', "\"${partTimeTrainResultUrl}\"" buildConfigField 'String', 'Part_Time_Train_Certificate_URL', "\"${partTimeTrainCertificateUrl}\"" } buildFeatures { dataBinding = true viewBinding = true } } dependencies { //底层 api project(':cs_baselib') }