mirror of
https://github.com/openharmony/developtools_global_resource_tool.git
synced 2026-07-20 22:47:00 -04:00
!278 merge OHNewModule into master
资源管理新模型支持OH工程
Created-by: LongerJokies
Commit-by: LongerJokies
Merged-by: openharmony_ci
Description: ### 一、内容说明(相关的Issue)
资源管理新模型支持OH工程
### 二、建议测试周期和提测地址
建议测试完成时间:xxxx.xx.xx
投产上线时间:xxxx.xx.xx
提测地址:CI环境/压测环境
测试账号:
### 三、变更内容
* 3.1 关联PR列表
* 3.2 数据库和部署说明
1. 常规更新
2. 重启unicorn
3. 重启sidekiq
4. 迁移任务:无
5. rake脚本:无
* 3.4 其他技术优化内容(做了什么,变更了什么)
资源管理新模型支持OH工程
* 3.5 废弃通知(什么字段、方法弃用?)
不涉及
* 3.6 后向不兼容变更(是否有无法向后兼容的变更?)
不涉及
### 四、研发自测点(自测哪些?冒烟用例全部自测?)
自测测试结论:
API20以上OH工程编译生成新模型,其他行为与现状保持一致
### 五、测试关注点(需要提醒QA重点关注的、可能会忽略的地方)
检查点:
| 需求名称 | 是否影响xx公共模块 | 是否需要xx功能 | 需求升级是否依赖其他子产品 |
|------|------------|----------|---------------|
| 资源管理新模型支持OH工程 | 否 | 需要 | 不需要 |
| | | | |
接口测试:不涉及
性能测试:不涉及
并发测试:不涉及
其他:不涉及
See merge request: openharmony/developtools_global_resource_tool!278
This commit is contained in:
@@ -50,13 +50,13 @@ const static std::string LONG_PATH_HEAD = "\\\\?\\";
|
||||
const static int32_t VERSION_MAX_LEN = 128;
|
||||
static const std::string RESTOOL_NAME = "Restool";
|
||||
static const std::string RESTOOLV2_NAME = "RestoolV2";
|
||||
static const std::string RESTOOL_VERSION = { " 6.1.0.001" };
|
||||
static const std::string RESTOOL_VERSION = { " 6.1.0.002" };
|
||||
const static int32_t TAG_LEN = 4;
|
||||
constexpr static int DEFAULT_POOL_SIZE = 8;
|
||||
static std::set<std::string> g_resourceSet;
|
||||
static std::set<std::string> g_hapResourceSet;
|
||||
const static int8_t INVALID_ID = -1;
|
||||
const static int MIN_SUPPORT_NEW_MODULE_API_VERSION = 60000020;
|
||||
const static int MIN_SUPPORT_NEW_MODULE_API_VERSION = 20;
|
||||
const static int MIN_SUPPORT_TS_HEADER_API_VERSION = 22;
|
||||
const static int API_VERSION_DIVISOR = 1000;
|
||||
|
||||
|
||||
@@ -86,8 +86,11 @@ uint32_t ConfigParser::Init()
|
||||
cJSON *appNode = cJSON_GetObjectItem(root_, "app");
|
||||
if (appNode && cJSON_IsObject(appNode)) {
|
||||
cJSON *minAPIVersionNode = cJSON_GetObjectItem(appNode, "minAPIVersion");
|
||||
int version = minAPIVersionNode ? minAPIVersionNode->valueint : 0;
|
||||
if (version >= MIN_SUPPORT_NEW_MODULE_API_VERSION) {
|
||||
int version = 0;
|
||||
if (minAPIVersionNode && cJSON_IsNumber(minAPIVersionNode)) {
|
||||
version = minAPIVersionNode->valueint;
|
||||
}
|
||||
if (version % API_VERSION_DIVISOR >= MIN_SUPPORT_NEW_MODULE_API_VERSION) {
|
||||
newModule_ = true;
|
||||
}
|
||||
if (version % API_VERSION_DIVISOR >= MIN_SUPPORT_TS_HEADER_API_VERSION) {
|
||||
|
||||
Reference in New Issue
Block a user