diff --git a/solara/lib/core/doctor/schema/platform/shared/brand_config.json b/solara/lib/core/doctor/schema/platform/shared/brand_config.json new file mode 100644 index 0000000..eaafb40 --- /dev/null +++ b/solara/lib/core/doctor/schema/platform/shared/brand_config.json @@ -0,0 +1,9 @@ +{ + "type": "object", + "brandName": { + "type": "string" + }, + "required": [ + "brandName" + ] +} \ No newline at end of file diff --git a/solara/lib/core/doctor/validator/brand_settings_validator_manager.rb b/solara/lib/core/doctor/validator/brand_settings_validator_manager.rb index 598065a..dd7550b 100644 --- a/solara/lib/core/doctor/validator/brand_settings_validator_manager.rb +++ b/solara/lib/core/doctor/validator/brand_settings_validator_manager.rb @@ -8,7 +8,8 @@ def validate issues = ios_config issues += ios_signing issues += android_config - issues + android_signing + issues += android_signing + issues + brand_config end def ios_config @@ -59,4 +60,11 @@ def android_config issue_type: Issue::ERROR) end + def brand_config + @validator.validate_single_property( + 'brandName', + :brand_config, + issue_type: Issue::ERROR) + end + end \ No newline at end of file diff --git a/solara/lib/core/doctor/validator/template/android_template_validation_config.yml b/solara/lib/core/doctor/validator/template/android_template_validation_config.yml index 17e2996..e613fd3 100644 --- a/solara/lib/core/doctor/validator/template/android_template_validation_config.yml +++ b/solara/lib/core/doctor/validator/template/android_template_validation_config.yml @@ -53,6 +53,8 @@ structure: type: file validations: - type: valid_json + - type: json_schema + schema_path: platform/shared/brand_config.json theme.json: type: file validations: diff --git a/solara/lib/core/doctor/validator/template/flutter_template_validation_config.yml b/solara/lib/core/doctor/validator/template/flutter_template_validation_config.yml index 17e2996..e613fd3 100644 --- a/solara/lib/core/doctor/validator/template/flutter_template_validation_config.yml +++ b/solara/lib/core/doctor/validator/template/flutter_template_validation_config.yml @@ -53,6 +53,8 @@ structure: type: file validations: - type: valid_json + - type: json_schema + schema_path: platform/shared/brand_config.json theme.json: type: file validations: diff --git a/solara/lib/core/doctor/validator/template/ios_template_validation_config.yml b/solara/lib/core/doctor/validator/template/ios_template_validation_config.yml index 17e2996..e613fd3 100644 --- a/solara/lib/core/doctor/validator/template/ios_template_validation_config.yml +++ b/solara/lib/core/doctor/validator/template/ios_template_validation_config.yml @@ -53,6 +53,8 @@ structure: type: file validations: - type: valid_json + - type: json_schema + schema_path: platform/shared/brand_config.json theme.json: type: file validations: diff --git a/solara/lib/core/template/brands/shared/brand_config.json b/solara/lib/core/template/brands/shared/brand_config.json index 7a73a41..093fc6e 100644 --- a/solara/lib/core/template/brands/shared/brand_config.json +++ b/solara/lib/core/template/brands/shared/brand_config.json @@ -1,2 +1,3 @@ { + "brandName": "" } \ No newline at end of file diff --git a/solara/lib/core/template/config/android_template_config.json b/solara/lib/core/template/config/android_template_config.json index d669ead..ab5f33f 100644 --- a/solara/lib/core/template/config/android_template_config.json +++ b/solara/lib/core/template/config/android_template_config.json @@ -30,6 +30,11 @@ "target": "ios/xcassets/", "condition": "true" }, + { + "source": "ios/InfoPlist.xcstrings", + "target": "ios/InfoPlist.xcstrings", + "condition": "true" + }, { "source": "ios/assets/", "target": "ios/assets/",