cmvr-wms/mobile-app/plugins/with-release-signing.cjs
lixiaolong 149bde836f feat(assistant): 扩展业务助手功能支持更多文档类型和业务场景
- 新增 PDF 文档支持,包括格式校验和完整性检查
- 扩展 Word、TXT 和 ZIP 格式附件处理能力
- 添加 Excel 附件可选择仅作为业务文件不解析行数据
- 实现业务助手表格布局配置新增库存和预算字段
- 集成通知、反馈通知等新的业务助手动作类型
- 完善部门管理包含父级部门和排序字段支持
- 增强业务规则校验涵盖更多系统管理场景
- 优化附件上传限制提示信息更准确
- 添加生成文件下载的安全性校验机制
- 扩展测试覆盖确保各业务动作规则正确性
2026-10-18 08:49:30 +08:00

23 lines
1.2 KiB
JavaScript

const { withAppBuildGradle } = require('expo/config-plugins');
module.exports = config => withAppBuildGradle(config, cfg => {
let source = cfg.modResults.contents;
if (source.includes('// CMVR production signing')) return cfg;
source = source.replace(/android\s*\{/, `android {
// CMVR production signing: secrets are supplied only to the build process.
signingConfigs {
cmvrRelease {
def required = ['CMVR_KEYSTORE', 'CMVR_STORE_PASSWORD', 'CMVR_KEY_ALIAS', 'CMVR_KEY_PASSWORD']
required.each { if (!System.getenv(it)) throw new GradleException('Missing production signing variable: ' + it) }
storeFile file(System.getenv('CMVR_KEYSTORE'))
storePassword System.getenv('CMVR_STORE_PASSWORD')
keyAlias System.getenv('CMVR_KEY_ALIAS')
keyPassword System.getenv('CMVR_KEY_PASSWORD')
}
}
`);
const release = /(release\s*\{[\s\S]*?signingConfig\s+)signingConfigs\.debug/;
if (!release.test(source)) throw Error('Unknown Expo release signing template; refusing a production debug-signed APK');
cfg.modResults.contents = source.replace(release, '$1signingConfigs.cmvrRelease');
return cfg;
});