| { | |
| "$schema": "https://json-schema.org/draft-07/schema#", | |
| "title": "package:code_assets party:shared shared definitions", | |
| "definitions": { | |
| "AndroidCodeConfig": { | |
| "type": "object", | |
| "properties": { | |
| "target_ndk_api": { | |
| "type": "integer" | |
| } | |
| }, | |
| "required": [ | |
| "target_ndk_api" | |
| ] | |
| }, | |
| "Architecture": { | |
| "type": "string", | |
| "anyOf": [ | |
| { | |
| "enum": [ | |
| "arm", | |
| "arm64", | |
| "arm64e", | |
| "ia32", | |
| "riscv32", | |
| "riscv64", | |
| "x64" | |
| ] | |
| }, | |
| { | |
| "type": "string" | |
| } | |
| ] | |
| }, | |
| "Asset": { | |
| "type": "object", | |
| "properties": { | |
| "type": { | |
| "type": "string", | |
| "anyOf": [ | |
| { | |
| "const": "code_assets/code" | |
| }, | |
| { | |
| "type": "string" | |
| } | |
| ] | |
| } | |
| }, | |
| "allOf": [ | |
| { | |
| "if": { | |
| "properties": { | |
| "type": { | |
| "const": "code_assets/code" | |
| } | |
| } | |
| }, | |
| "then": { | |
| "properties": { | |
| "encoding": { | |
| "$ref": "#/definitions/NativeCodeAssetEncoding" | |
| } | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "CCompilerConfig": { | |
| "type": "object", | |
| "properties": { | |
| "ar": { | |
| "$ref": "../../../../hooks/doc/schema/shared/shared_definitions.schema.json#/definitions/absolutePath" | |
| }, | |
| "cc": { | |
| "$ref": "../../../../hooks/doc/schema/shared/shared_definitions.schema.json#/definitions/absolutePath" | |
| }, | |
| "ld": { | |
| "$ref": "../../../../hooks/doc/schema/shared/shared_definitions.schema.json#/definitions/absolutePath" | |
| }, | |
| "windows": { | |
| "type": "object", | |
| "properties": { | |
| "developer_command_prompt": { | |
| "type": "object", | |
| "properties": { | |
| "arguments": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "script": { | |
| "$ref": "../../../../hooks/doc/schema/shared/shared_definitions.schema.json#/definitions/absolutePath" | |
| } | |
| }, | |
| "required": [ | |
| "arguments", | |
| "script" | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "ar", | |
| "cc", | |
| "ld" | |
| ] | |
| }, | |
| "CodeConfig": { | |
| "type": "object", | |
| "properties": { | |
| "android": { | |
| "$ref": "#/definitions/AndroidCodeConfig" | |
| }, | |
| "c_compiler": { | |
| "$ref": "#/definitions/CCompilerConfig" | |
| }, | |
| "ios": { | |
| "$ref": "#/definitions/IOSCodeConfig" | |
| }, | |
| "link_mode_preference": { | |
| "$ref": "#/definitions/LinkModePreference" | |
| }, | |
| "macos": { | |
| "$ref": "#/definitions/MacOSCodeConfig" | |
| }, | |
| "sanitizer": { | |
| "$ref": "#/definitions/Sanitizer" | |
| }, | |
| "target_architecture": { | |
| "$ref": "#/definitions/Architecture" | |
| }, | |
| "target_os": { | |
| "$ref": "#/definitions/OS" | |
| } | |
| }, | |
| "required": [ | |
| "link_mode_preference", | |
| "target_architecture", | |
| "target_os" | |
| ], | |
| "allOf": [ | |
| { | |
| "if": { | |
| "properties": { | |
| "target_os": { | |
| "const": "android" | |
| } | |
| } | |
| }, | |
| "then": { | |
| "required": [ | |
| "android" | |
| ] | |
| } | |
| }, | |
| { | |
| "if": { | |
| "properties": { | |
| "target_os": { | |
| "const": "ios" | |
| } | |
| } | |
| }, | |
| "then": { | |
| "required": [ | |
| "ios" | |
| ] | |
| } | |
| }, | |
| { | |
| "if": { | |
| "properties": { | |
| "target_os": { | |
| "const": "macos" | |
| } | |
| } | |
| }, | |
| "then": { | |
| "required": [ | |
| "macos" | |
| ] | |
| } | |
| }, | |
| { | |
| "if": { | |
| "properties": { | |
| "target_os": { | |
| "const": "windows" | |
| } | |
| } | |
| }, | |
| "then": { | |
| "properties": { | |
| "c_compiler": { | |
| "required": [ | |
| "windows" | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| ] | |
| }, | |
| "Config": { | |
| "type": "object", | |
| "properties": { | |
| "extensions": { | |
| "$ref": "#/definitions/ConfigExtensions" | |
| } | |
| } | |
| }, | |
| "ConfigExtensions": { | |
| "type": "object", | |
| "properties": { | |
| "code_assets": { | |
| "$ref": "#/definitions/CodeConfig" | |
| } | |
| } | |
| }, | |
| "IOSCodeConfig": { | |
| "type": "object", | |
| "properties": { | |
| "target_sdk": { | |
| "type": "string" | |
| }, | |
| "target_version": { | |
| "type": "integer" | |
| } | |
| }, | |
| "required": [ | |
| "target_sdk", | |
| "target_version" | |
| ] | |
| }, | |
| "LinkMode": { | |
| "type": "object", | |
| "properties": { | |
| "type": { | |
| "type": "string", | |
| "enum": [ | |
| "dynamic_loading_bundle", | |
| "dynamic_loading_executable", | |
| "dynamic_loading_process", | |
| "dynamic_loading_system", | |
| "static" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "type" | |
| ], | |
| "if": { | |
| "properties": { | |
| "type": { | |
| "const": "dynamic_loading_system" | |
| } | |
| } | |
| }, | |
| "then": { | |
| "properties": { | |
| "uri": { | |
| "$ref": "../../../../hooks/doc/schema/shared/shared_definitions.schema.json#/definitions/relativePath" | |
| } | |
| }, | |
| "required": [ | |
| "uri" | |
| ] | |
| } | |
| }, | |
| "LinkModePreference": { | |
| "type": "string", | |
| "enum": [ | |
| "dynamic", | |
| "prefer_dynamic", | |
| "prefer_static", | |
| "static" | |
| ] | |
| }, | |
| "MacOSCodeConfig": { | |
| "type": "object", | |
| "properties": { | |
| "target_version": { | |
| "type": "integer" | |
| } | |
| }, | |
| "required": [ | |
| "target_version" | |
| ] | |
| }, | |
| "NativeCodeAssetEncoding": { | |
| "type": "object", | |
| "properties": { | |
| "file": { | |
| "$ref": "../../../../hooks/doc/schema/shared/shared_definitions.schema.json#/definitions/absolutePath" | |
| }, | |
| "id": { | |
| "type": "string" | |
| }, | |
| "link_mode": { | |
| "$ref": "#/definitions/LinkMode" | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "link_mode" | |
| ], | |
| "if": { | |
| "properties": { | |
| "link_mode": { | |
| "properties": { | |
| "type": { | |
| "anyOf": [ | |
| { | |
| "const": "dynamic_loading_bundle" | |
| }, | |
| { | |
| "const": "static" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "then": { | |
| "required": [ | |
| "file" | |
| ] | |
| } | |
| }, | |
| "OS": { | |
| "type": "string", | |
| "anyOf": [ | |
| { | |
| "enum": [ | |
| "android", | |
| "ios", | |
| "linux", | |
| "macos", | |
| "windows" | |
| ] | |
| }, | |
| { | |
| "type": "string" | |
| } | |
| ] | |
| }, | |
| "Sanitizer": { | |
| "type": "string", | |
| "anyOf": [ | |
| { | |
| "enum": [ | |
| "asan", | |
| "msan", | |
| "tsan" | |
| ] | |
| }, | |
| { | |
| "type": "string" | |
| } | |
| ] | |
| } | |
| } | |
| } |