channel_special_replace.py 556 B

123456789101112131415161718192021222324
  1. from V2 import file_utils
  2. import os
  3. from V2.print_log import printlog
  4. def HuaweiReplace(prj_path, key, value):
  5. if key == 'agconnect-services.json':
  6. printlog('replace huawei agconnect-services.json')
  7. huawei_sdk_config_path = os.path.join(prj_path, 'assets', key)
  8. file_utils.copy_file(value, huawei_sdk_config_path)
  9. pass
  10. specialReplace = {
  11. "huawei": HuaweiReplace
  12. }
  13. def get_special_replace(sdk_name):
  14. if sdk_name in specialReplace:
  15. return specialReplace[sdk_name]
  16. else:
  17. return None
  18. pass