From 32322801f564eb5debafa1a343bd81c48308f35a Mon Sep 17 00:00:00 2001 From: Marcus Tillmanns Date: Tue, 4 Jun 2024 11:18:03 +0200 Subject: [PATCH] Shared: Add project.json schema for workspace projects Change-Id: I16f2944316805ecbd3cd3dfc763c457e5ad6142f Reviewed-by: David Schulz --- share/qtcreator/CMakeLists.txt | 1 + share/qtcreator/jsonschemas/project.json | 57 ++++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 share/qtcreator/jsonschemas/project.json diff --git a/share/qtcreator/CMakeLists.txt b/share/qtcreator/CMakeLists.txt index f8be01a7a7b..73a0837ede2 100644 --- a/share/qtcreator/CMakeLists.txt +++ b/share/qtcreator/CMakeLists.txt @@ -3,6 +3,7 @@ set(resource_directories cplusplus glsl indexer_preincludes + jsonschemas modeleditor qmldesigner qmlicons diff --git a/share/qtcreator/jsonschemas/project.json b/share/qtcreator/jsonschemas/project.json new file mode 100644 index 00000000000..df55dbd693a --- /dev/null +++ b/share/qtcreator/jsonschemas/project.json @@ -0,0 +1,57 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Qt Creator workspace project definition", + "description": "A Qt Creator workspace project definition", + "type": "object", + "properties": { + "project.name": { + "type": "string", + "description": "The name of the project" + }, + "files.exclude": { + "type": "array", + "items": [ + { + "type": "string" + } + ], + "description": "Files to exclude from the project" + }, + "targets": { + "type": "array", + "description": "A list of targets", + "items": [ + { + "type": "object", + "properties": { + "arguments": { + "type": "array", + "items": [ + { + "type": "string" + } + ], + "description": "Arguments to pass to the executable" + }, + "executable": { + "type": "string", + "description": "The executable to run" + }, + "name": { + "type": "string", + "description": "The name of the target" + }, + "workingDirectory": { + "type": "string", + "description": "The working directory to run the executable in" + } + }, + "required": [ + "executable", + "name" + ] + } + ] + } + } +}