id | title | sidebar_label |
---|---|---|
config_folders |
Config Folders |
Config Folders |
Legend:
[PLATFORM]
- specific platform key likeios
,android
,web
, etc..[APP_ID]
- name of your folder in./appConfigs
which contains specificrenative.json
file[PROJECT_NAME]
-name
field in the rootpackage.json
file of your project[PLUGIN_ID]
-key
of the plugin defined in./projectConfig/plugins.json
[WORKSPACE_PATH]
-path
to your workspace (~/.rnv
by default) where local and sensitive information is stored.
NOTE: [WORKSPACE_PATH]
folder path can be customised in ~/.rnv/renative.workspaces.json
{
"workspaces": {
"rnv": {
"path": "~/.rnv"
},
"SOME_ANOTHER_WORKSPACE_ID": {
"path": "<WORKSPACE_PATH>"
}
}
}
You can then switch to custom workspace per each project ./renative.json
{
"workspaceID": "SOME_ANOTHER_WORKSPACE_ID"
}
applies for both public and private ./..
and ~./rnv/[PROJECT_NAME]/..
.
├── projectConfig
│ ├── fonts
│ ├── plugins
│ └── builds
└── appConfigs
└── [APP_ID]
├── assets
│ └── [PLATFORM]
├── fonts
├── builds
└── plugins
└── [PLUGIN_KEY]
├── fonts
└── builds
Following is the order of merges of various folders (if present) contributing to final platformBuilds/*/**
.
⬇️
[RNV_ROOT]/platformTemplates/[PLATFORM]/*/**
=> ./platformBuilds/[APP_ID]_[PLATFORM]/*/*
⬇️
./projectConfig/builds/[PLATFORM]/*/**
=> ./platformBuilds/[APP_ID]_[PLATFORM]/*/*
⬇️
./projectConfig/builds/_shared/*/**
=> ./platformBuilds/_shared/*/*
⬇️
[WORKSPACE_PATH]/[PROJECT_NAME]/projectConfig/builds/[PLATFORM]/*/**
=> ./platformBuilds/[APP_ID]_[PLATFORM]/*/*
⬇️
./appConfigs/[APP_ID]/builds/[PLATFORM]/*/**
=> ./platformBuilds/[APP_ID]_[PLATFORM]/*/*
⬇️
[WORKSPACE_PATH]/[PROJECT_NAME]/appConfigs/[APP_ID]/builds/[PLATFORM]/*/**
=> ./platformBuilds/[APP_ID]_[PLATFORM]/*/*
⬇️
./projectConfig/plugins/[PLUGIN_ID]/builds/[PLATFORM]/*/**
=> ./platformBuilds/[APP_ID]_[PLATFORM]/*/*
⬇️
[WORKSPACE_PATH]/[PROJECT_NAME]/projectConfig/plugins/[PLUGIN_ID]/builds/[PLATFORM]/*/**
=> ./platformBuilds/[APP_ID]_[PLATFORM]/*/*
⬇️
./appConfigs/[APP_ID]/plugins/[PLUGIN_ID]/builds/[PLATFORM]/*/**
=> ./platformBuilds/[APP_ID]_[PLATFORM]/*/*
⬇️
[WORKSPACE_PATH]/[PROJECT_NAME]/appConfigs/[APP_ID]/plugins/[PLUGIN_ID]/builds/[PLATFORM]/*/**
=> ./platformBuilds/[APP_ID]_[PLATFORM]/*/*
⬇️
./platformBuilds
Following is the order of merges of various folders (if present) contributing to final platformAssets/*/**
.
⬇️
./projectConfig/assets/runtime/*/**
=> ./platformAssets/runtime/*/*
⬇️
[WORKSPACE_PATH]/[PROJECT_NAME]/projectConfig/assets/runtime/*/**
=> ./platformAssets/runtime/*/*
⬇️
./appConfigs/[APP_ID]/assets/runtime/*/**
=> ./platformAssets/runtime/*/*
⬇️
[WORKSPACE_PATH]/[PROJECT_NAME]/appConfigs/[APP_ID]/assets/runtime/*/**
=> ./platformAssets/runtime/*/*
⬇️
./projectConfig/plugins/[PLUGIN_ID]/assets/runtime/*/**
=> ./platformAssets/runtime/*/*
⬇️
[WORKSPACE_PATH]/[PROJECT_NAME]/projectConfig/plugins/[PLUGIN_ID]/assets/runtime/*/**
=> ./platformAssets/runtime/*/*
⬇️
./appConfigs/[APP_ID]/plugins/[PLUGIN_ID]/assets/runtime/*/**
=> ./platformAssets/runtime/*/*
⬇️
[WORKSPACE_PATH]/[PROJECT_NAME]/appConfigs/[APP_ID]/plugins/[PLUGIN_ID]/assets/runtime/*/**
=> ./platformAssets/runtime/*/*
⬇️
./platformAssets
platformBuilds
- TODOplatformAssets
- TODOappConfigs
- TODOprojectConfig
- TODObuildHooks
- TODOsrc
- TODObuilds
- TODOplugins
- TODOfonts
- TODOassets
- TODO
Every time you run RNV command, ReNative checks following "special" folders and copies contents of those into designated target folders
*/plugins/[PLUGIN_ID]
*/plugins/[PLUGIN_ID]/overrides
-> special override allows you to override files in plugin itself! (located./node_modules
)*/builds/[PLATFORM]
*/fonts
*/assets/runtime
*/assets/[PLATFORM]
You can utilise above folders in following places:
./appConfigs/[APP_ID]
./projectConfig
[WORKSPACE_PATH]/[PROJECT_NAME]/appConfigs/[APP_ID]
[WORKSPACE_PATH]/[PROJECT_NAME]/projectConfig
Project Scoped Build Override
./projectConfig/builds/[PLATFORM]/*/**
=> ./platformBuilds/[APP_ID]_[PLATFORM]/*/*
Project Scoped Build Override (Private Content)
[WORKSPACE_PATH]/[PROJECT_NAME]/projectConfig/builds/[PLATFORM]/*/**
=> ./platformBuilds/[APP_ID]_[PLATFORM]/*/*
App Config Scoped Build Override
./appConfigs/[APP_ID]/builds/[PLATFORM]/*/**
=> ./platformBuilds/[APP_ID]_[PLATFORM]/*/*
App Config Scoped Build Override (Private Content)
[WORKSPACE_PATH]/[PROJECT_NAME]/appConfigs/[APP_ID]/builds/[PLATFORM]/*/**
=> ./platformBuilds/[APP_ID]_[PLATFORM]/*/*
Plugin + Project Scoped Build Override
./projectConfig/plugins/[PLUGIN_ID]/builds/[PLATFORM]/*/**
=> ./platformBuilds/[APP_ID]_[PLATFORM]/*/*
Plugin + Project Scoped Build Override (Private Content)
[WORKSPACE_PATH]/[PROJECT_NAME]/projectConfig/plugins/[PLUGIN_ID]/builds/[PLATFORM]/*/**
=> ./platformBuilds/[APP_ID]_[PLATFORM]/*/*
Plugin + App Config Scoped Build Override
./appConfigs/[APP_ID]/plugins/[PLUGIN_ID]/builds/[PLATFORM]/*/**
=> ./platformBuilds/[APP_ID]_[PLATFORM]/*/*
Plugin + App Config Scoped Build Override (Private Content)
[WORKSPACE_PATH]/[PROJECT_NAME]/appConfigs/[APP_ID]/plugins/[PLUGIN_ID]/builds/[PLATFORM]/*/**
=> ./platformBuilds/[APP_ID]_[PLATFORM]/*/*
Project Scoped Assets Override
./projectConfig/assets/runtime/*/**
=> ./platformAssets/runtime/*/*
Project Scoped Assets Override (Private Content)
[WORKSPACE_PATH]/[PROJECT_NAME]/projectConfig/assets/runtime/*/**
=> ./platformAssets/runtime/*/*
App Config Scoped Build Override
./appConfigs/[APP_ID]/assets/runtime/*/**
=> ./platformAssets/runtime/*/*
App Config Scoped Build Override (Private Content)
[WORKSPACE_PATH]/[PROJECT_NAME]/appConfigs/[APP_ID]/assets/runtime/*/**
=> ./platformAssets/runtime/*/*
Plugin + Project Scoped Build Override
./projectConfig/plugins/[PLUGIN_ID]/assets/runtime/*/**
=> ./platformAssets/runtime/*/*
Plugin + Project Scoped Build Override (Private Content)
[WORKSPACE_PATH]/[PROJECT_NAME]/projectConfig/plugins/[PLUGIN_ID]/assets/runtime/*/**
=> ./platformAssets/runtime/*/*
Plugin + App Config Scoped Build Override
./appConfigs/[APP_ID]/plugins/[PLUGIN_ID]/assets/runtime/*/**
=> ./platformAssets/runtime/*/*
Plugin + App Config Scoped Build Override (Private Content)
[WORKSPACE_PATH]/[PROJECT_NAME]/appConfigs/[APP_ID]/plugins/[PLUGIN_ID]/assets/runtime/*/**
=> ./platformAssets/runtime/*/*
Sometimes you need to add buildFlavour specific file into project before build. ie Firebase, Crashlytics configs and so on
you can achieve by creating folder with postfix <PLATFORM>@<BUILD_SCHEME_NAME>
.
├── appConfigs
└── helloWorld
├── assets
├── plugins
│ └── some-plugin
│ └── builds
│ ├── android@release
│ │ └── fileToBeInjectedInReleaseMode.txt
│ └── android@debug
│ └── fileToBeInjectedInDebugMode.txt
└── builds
├── android@release
│ └── fileToBeInjectedInReleaseMode.txt
└── android@debug
└── fileToBeInjectedInDebugMode.txt
Combination of features above allows you to configure and build large number of flavoured builds with almost no extra configuration
Override Rules:
- https://github.com/pavjacko/renative/tree/develop#platform-builds-overrides
- https://github.com/pavjacko/renative/tree/develop#platform-assets-overrides
- icon assets
- splash screens
- runtime configs
- passwords
- production keys
- keystores, p12
- googleservice-info.json
- fabric keys
- any other sensitive data
those should be added to private project mirror:
[WORKSPACE_PATH]/[PROJECT_NAME]/appConfigs/*/**