From 2711aeb93f95e074212c99e3fc080802cef7cc59 Mon Sep 17 00:00:00 2001 From: longwei Date: Sat, 11 Feb 2023 06:02:26 +0000 Subject: [PATCH] add atomicService in schema Signed-off-by: longwei Change-Id: Id34c865155bcab523431fc9f5728962d7d21055b --- modulecheck/app.json | 65 +++++++++++++++++++++++++++++++++++++++++ modulecheck/module.json | 43 ++++++++++++++++++++++++--- 2 files changed, 104 insertions(+), 4 deletions(-) diff --git a/modulecheck/app.json b/modulecheck/app.json index fb301a34..493edba7 100644 --- a/modulecheck/app.json +++ b/modulecheck/app.json @@ -45,6 +45,7 @@ "accessible", "multiProjects", "asanEnabled", + "atomicService", "default", "tablet", "tv", @@ -180,6 +181,70 @@ "type": "boolean", "default": false }, + "atomicService": { + "description": "Indicates the config for atomic service.", + "type": "object", + "propertyNames": { + "enum": [ + "split", + "main" + ] + }, + "required": [ + "split" + ], + "properties": { + "split": { + "description": "Indicates whether to split bundle in atomicService.", + "type": "boolean", + "default": true + }, + "main": { + "description": "Indicates the name of main module when split is true.", + "type": "string", + "maxLength": 31 + } + }, + "allOf": [ + { + "if": { + "properties": { + "split": { + "const": true + } + } + }, + "then": { + "propertyNames": { + "enum": [ + "split", + "main" + ], + "required": [ + "split", + "main" + ] + } + } + }, + { + "if": { + "properties": { + "split": { + "const": false + } + } + }, + "then": { + "propertyNames": { + "enum": [ + "split" + ] + } + } + } + ] + }, "default": { "description": "The configuration in the default tag is applicable to all devices. If the configuration is different for other device types, you need to configure the configuration under the configuration tag of the device type.", "type": "object", diff --git a/modulecheck/module.json b/modulecheck/module.json index c857e271..6d5312de 100644 --- a/modulecheck/module.json +++ b/modulecheck/module.json @@ -37,7 +37,9 @@ "requestPermissions", "dependencies", "libIsolation", - "compressNativeLibs" + "compressNativeLibs", + "installationFree", + "atomicService" ] }, "required": [ @@ -116,7 +118,8 @@ "testRunner", "dependencies", "libIsolation", - "compressNativeLibs" + "compressNativeLibs", + "atomicService" ] }, "required": [ @@ -158,7 +161,8 @@ "testRunner", "dependencies", "libIsolation", - "compressNativeLibs" + "compressNativeLibs", + "atomicService" ] }, "required": [ @@ -288,6 +292,7 @@ "abilities": { "description": "Indicates all abilities in the current module. The value is an array of objects, each of which represents an ability.This label can be left blank by default,and indicates no capability exists in the current module.", "type": "array", + "uniqueItems": true, "items": { "type": "object", "required": [ @@ -1074,7 +1079,37 @@ "description": "Specifies whether the libs libraries of the .hap file are compressed for storage. If this attribute is set to false, the libs libraries are stored without being compressed and will be directly loaded during the installation of the .hap file.", "type": "boolean", "default": true - } + }, + "atomicService": { + "description": "Indicates the module config in atomic service.", + "type": "object", + "propertyNames": { + "enum": [ + "preloads" + ] + }, + "properties": { + "preloads": { + "description": "Indicates modules are preloaded when the current module is run.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "object", + "propertyNames": { + "enum": [ + "moduleName" + ] + }, + "properties": { + "moduleName": { + "description": "Indicates module is preloaded when the current module is run.", + "type": "string", + "maxLength": 31 + } + } + } + } + } } } } -- Gitee