{
  "$id": "https://weblate.org/schemas/weblate-kotlin-sdk-build.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Kotlin SDK build registration",
  "description": "Resource IDs from a final Android build, submitted to the Kotlin SDK CDN add-on.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "packageName",
    "versionCode"
  ],
  "properties": {
    "schemaVersion": {
      "const": 1,
      "default": 1,
      "description": "Build metadata format version."
    },
    "packageName": {
      "type": "string",
      "maxLength": 127,
      "pattern": "^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)+$(?![\\s\\S])",
      "description": "Android application package name."
    },
    "versionCode": {
      "type": "integer",
      "minimum": 1,
      "maximum": 2100000000
    },
    "strings": {
      "$ref": "#/$defs/resources",
      "default": {}
    },
    "plurals": {
      "$ref": "#/$defs/resources",
      "default": {}
    }
  },
  "anyOf": [
    {
      "required": [
        "strings"
      ],
      "properties": {
        "strings": {
          "minProperties": 1
        }
      }
    },
    {
      "required": [
        "plurals"
      ],
      "properties": {
        "plurals": {
          "minProperties": 1
        }
      }
    }
  ],
  "$defs": {
    "resources": {
      "type": "object",
      "propertyNames": {
        "pattern": "^[a-zA-Z_][a-zA-Z0-9_.]*$(?![\\s\\S])"
      },
      "additionalProperties": {
        "type": "string",
        "pattern": "^0x7[fF](?!00)[0-9a-fA-F]{6}$(?![\\s\\S])"
      }
    }
  }
}
