Skip to content

Commit 99365b5

Browse files
committed
update, fix schema
1 parent 51d3df7 commit 99365b5

File tree

14 files changed

+1290
-440
lines changed

14 files changed

+1290
-440
lines changed

.prettierignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@ build
2121

2222
allure-results
2323
pluginTemplates
24-
templateFiles
24+
templateFiles/**/*
25+
!/**/*/*.json
2526
*.d.ts

packages/app-harness/renative.json

-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@
136136
"templateAndroid": {
137137
"AndroidManifest_xml": {
138138
"tag": "manifest",
139-
"android:name": "",
140139
"children": [
141140
{
142141
"tag": "uses-permission ",

packages/core/jsonSchema/renative-1.0.schema.json

+282-146
Large diffs are not rendered by default.

packages/core/jsonSchema/rnv.app.json

+134-65
Large diffs are not rendered by default.

packages/core/jsonSchema/rnv.plugin.json

+134-65
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,20 @@
7171
"description": "Object of npm dependencies of this plugin. These will be injected into package.json"
7272
},
7373
"pluginDependencies": {
74-
"type": "object",
75-
"additionalProperties": {
76-
"type": [
77-
"string",
78-
"null"
79-
]
80-
},
74+
"anyOf": [
75+
{
76+
"type": "object",
77+
"additionalProperties": {
78+
"type": [
79+
"string",
80+
"null"
81+
]
82+
}
83+
},
84+
{
85+
"type": "null"
86+
}
87+
],
8188
"description": "List of other Renative plugins this plugin depends on"
8289
},
8390
"webpackConfig": {
@@ -297,13 +304,13 @@
297304
"tag": {
298305
"type": "string"
299306
},
300-
"android:name": {
307+
"package": {
301308
"type": "string"
302309
},
303-
"android:required": {
304-
"type": "boolean"
310+
"xmlns:android": {
311+
"type": "string"
305312
},
306-
"package": {
313+
"xmlns:tools": {
307314
"type": "string"
308315
},
309316
"children": {
@@ -312,13 +319,68 @@
312319
"type": "object",
313320
"properties": {
314321
"tag": {
315-
"$ref": "#/definitions/rnv.plugin/properties/android/properties/templateAndroid/properties/AndroidManifest_xml/properties/tag"
322+
"type": "string"
316323
},
317324
"android:name": {
318-
"$ref": "#/definitions/rnv.plugin/properties/android/properties/templateAndroid/properties/AndroidManifest_xml/properties/android:name"
325+
"type": "string"
326+
},
327+
"android:theme": {
328+
"type": "string"
319329
},
330+
"android:value": {},
320331
"android:required": {
321-
"$ref": "#/definitions/rnv.plugin/properties/android/properties/templateAndroid/properties/AndroidManifest_xml/properties/android:required"
332+
"type": "boolean"
333+
},
334+
"android:allowBackup": {
335+
"type": "boolean"
336+
},
337+
"android:largeHeap": {
338+
"type": "boolean"
339+
},
340+
"android:label": {
341+
"type": "string"
342+
},
343+
"android:icon": {
344+
"type": "string"
345+
},
346+
"android:roundIcon": {
347+
"type": "string"
348+
},
349+
"android:banner": {
350+
"type": "string"
351+
},
352+
"tools:replace": {
353+
"type": "string"
354+
},
355+
"android:supportsRtl": {
356+
"type": "boolean"
357+
},
358+
"tools:targetApi": {
359+
"type": "number"
360+
},
361+
"android:usesCleartextTraffic": {
362+
"type": "boolean"
363+
},
364+
"android:appComponentFactory": {
365+
"type": "string"
366+
},
367+
"android:screenOrientation": {
368+
"type": "string"
369+
},
370+
"android:noHistory": {
371+
"type": "boolean"
372+
},
373+
"android:launchMode": {
374+
"type": "string"
375+
},
376+
"android:exported": {
377+
"type": "boolean"
378+
},
379+
"android:configChanges": {
380+
"type": "string"
381+
},
382+
"android:windowSoftInputMode": {
383+
"type": "string"
322384
},
323385
"children": {
324386
"type": "array",
@@ -328,37 +390,55 @@
328390
}
329391
},
330392
"required": [
331-
"tag",
332-
"android:name",
333-
"children"
393+
"tag"
334394
],
335395
"additionalProperties": false
336396
}
337397
}
338398
},
339399
"required": [
340-
"tag",
341-
"android:name"
400+
"tag"
342401
],
343402
"additionalProperties": false,
344403
"description": "Allows you to directly manipulate `AndroidManifest.xml` via json override mechanism\nInjects / Overrides values in AndroidManifest.xml file of generated android based project\n> IMPORTANT: always ensure that your object contains `tag` and `android:name` to target correct tag to merge into\n "
345404
},
346405
"strings_xml": {
347406
"type": "object",
348407
"properties": {
408+
"tag": {
409+
"type": "string"
410+
},
411+
"name": {
412+
"type": "string"
413+
},
414+
"parent": {
415+
"type": "string"
416+
},
417+
"value": {
418+
"type": "string"
419+
},
349420
"children": {
350421
"type": "array",
351422
"items": {
352423
"type": "object",
353424
"properties": {
354425
"tag": {
355-
"type": "string"
426+
"$ref": "#/definitions/rnv.plugin/properties/android/properties/templateAndroid/properties/strings_xml/properties/tag"
356427
},
357428
"name": {
358-
"type": "string"
429+
"$ref": "#/definitions/rnv.plugin/properties/android/properties/templateAndroid/properties/strings_xml/properties/name"
359430
},
360-
"child_value": {
361-
"type": "string"
431+
"parent": {
432+
"$ref": "#/definitions/rnv.plugin/properties/android/properties/templateAndroid/properties/strings_xml/properties/parent"
433+
},
434+
"value": {
435+
"$ref": "#/definitions/rnv.plugin/properties/android/properties/templateAndroid/properties/strings_xml/properties/value"
436+
},
437+
"children": {
438+
"type": "array",
439+
"items": {
440+
"$ref": "#/definitions/rnv.plugin/properties/android/properties/templateAndroid/properties/strings_xml/properties/children/items"
441+
}
362442
}
363443
},
364444
"required": [
@@ -369,18 +449,22 @@
369449
}
370450
},
371451
"required": [
372-
"children"
452+
"tag"
373453
],
374-
"additionalProperties": false
454+
"additionalProperties": false,
455+
"description": "Allows you to directly manipulate `res/values files` via json override mechanism\nInjects / Overrides values in res/values files of generated android based project\n> IMPORTANT: always ensure that your object contains `tag` and `name` to target correct tag to merge into\n "
375456
},
376-
"MainActivity_kt": {
457+
"styles_xml": {
458+
"$ref": "#/definitions/rnv.plugin/properties/android/properties/templateAndroid/properties/strings_xml",
459+
"description": "Allows you to directly manipulate `res/values files` via json override mechanism\nInjects / Overrides values in res/values files of generated android based project\n> IMPORTANT: always ensure that your object contains `tag` and `name` to target correct tag to merge into\n "
460+
},
461+
"colors_xml": {
462+
"$ref": "#/definitions/rnv.plugin/properties/android/properties/templateAndroid/properties/strings_xml",
463+
"description": "Allows you to directly manipulate `res/values files` via json override mechanism\nInjects / Overrides values in res/values files of generated android based project\n> IMPORTANT: always ensure that your object contains `tag` and `name` to target correct tag to merge into\n "
464+
},
465+
"MainApplication_kt": {
377466
"type": "object",
378467
"properties": {
379-
"onCreate": {
380-
"type": "string",
381-
"default": "super.onCreate(savedInstanceState)",
382-
"description": "Overrides super.onCreate method handler of MainActivity.java"
383-
},
384468
"imports": {
385469
"type": "array",
386470
"items": {
@@ -399,18 +483,30 @@
399483
"type": "string"
400484
}
401485
},
402-
"resultMethods": {
486+
"packages": {
487+
"type": "array",
488+
"items": {
489+
"type": "string"
490+
}
491+
},
492+
"packageParams": {
403493
"type": "array",
404494
"items": {
405495
"type": "string"
406496
}
407497
}
408498
},
409-
"additionalProperties": false
499+
"additionalProperties": false,
500+
"description": "Allows you to configure behaviour of MainActivity"
410501
},
411-
"MainApplication_kt": {
502+
"MainActivity_kt": {
412503
"type": "object",
413504
"properties": {
505+
"onCreate": {
506+
"type": "string",
507+
"default": "super.onCreate(savedInstanceState)",
508+
"description": "Overrides super.onCreate method handler of MainActivity.kt"
509+
},
414510
"imports": {
415511
"type": "array",
416512
"items": {
@@ -429,43 +525,26 @@
429525
"type": "string"
430526
}
431527
},
432-
"packages": {
433-
"type": "array",
434-
"items": {
435-
"type": "string"
436-
}
437-
},
438-
"packageParams": {
528+
"resultMethods": {
439529
"type": "array",
440530
"items": {
441531
"type": "string"
442532
}
443533
}
444534
},
445-
"additionalProperties": false,
446-
"description": "Allows you to configure behaviour of MainActivity"
447-
},
448-
"settings_gradle": {
449-
"type": "object",
450-
"properties": {},
451535
"additionalProperties": false
452536
},
453-
"gradle_wrapper_properties": {
537+
"SplashActivity_kt": {
454538
"type": "object",
455539
"properties": {},
456540
"additionalProperties": false
457541
},
458-
"SplashActivity_java": {
459-
"type": "object",
460-
"properties": {},
461-
"additionalProperties": false
462-
},
463-
"styles_xml": {
542+
"settings_gradle": {
464543
"type": "object",
465544
"properties": {},
466545
"additionalProperties": false
467546
},
468-
"colors_xml": {
547+
"gradle_wrapper_properties": {
469548
"type": "object",
470549
"properties": {},
471550
"additionalProperties": false
@@ -791,16 +870,6 @@
791870
"description": "Build type of the pod"
792871
}
793872
},
794-
"required": [
795-
"git",
796-
"commit",
797-
"version",
798-
"podNames",
799-
"podName",
800-
"staticFrameworks",
801-
"isStatic",
802-
"buildType"
803-
],
804873
"additionalProperties": false
805874
},
806875
"tvos": {

0 commit comments

Comments
 (0)