blob: 3ad886ea08965ef9a27c9ea2e4fc05ef948f7e97 [file]
{
"$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"
]
},
"AppleVersion": {
"description": "An Apple deployment version with all three numeric components required, each between 0 and 2147483647. API defaults for minor and patch are serialized as zero.",
"type": "object",
"properties": {
"major": {
"type": "integer",
"maximum": 2147483647,
"minimum": 0
},
"minor": {
"type": "integer",
"maximum": 2147483647,
"minimum": 0
},
"patch": {
"type": "integer",
"maximum": 2147483647,
"minimum": 0
}
},
"required": [
"major",
"minor",
"patch"
]
},
"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": {
"deployment_version": {
"$ref": "#/definitions/AppleVersion",
"description": "The lowest compatible Apple deployment version. All three numeric components are required. This version takes precedence over target_version."
},
"target_sdk": {
"type": "string"
},
"target_version": {
"type": "integer",
"maximum": 2147483647,
"minimum": 0
}
},
"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": {
"deployment_version": {
"$ref": "#/definitions/AppleVersion",
"description": "The lowest compatible Apple deployment version. All three numeric components are required. This version takes precedence over target_version."
},
"target_version": {
"type": "integer",
"maximum": 2147483647,
"minimum": 0
}
},
"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"
}
]
}
}
}