Pass app id, name and version to build command.
- Dominant language
- JavaScript
- Stars
- 967
- Forks
- 344
- Avg merge
- 8h 41m
- Merged PRs (30d)
- 9
Description
# Feature Request
## Motivation Behind Feature
For a monorepo with single dependencies, a single config.xml I have to change the xml before build.
It would be better if there is an option to pass these parameters to the build or run command.
To set the app id, name and version. Without changing the config.xml.
All other settings (incl. plugins) are shared for all apps.
## Feature Description
```bash
cordova build android --release --app-id="com.foo.bar" --app-name="Foo Bar" --app-version="1.2.3"
cordova run android --app-id="com.test.me" --app-name="Test App" --app-version="0.0.0"
```
| Parameter | Description |
| --- | --- |
| app-id | The app id like in config.xml widget.$.id. |
| app-version | The app version like in config.xml widget.$.version. |
| app-name| The app name like in config.xml widget.name. |
**config.xml**
```xml
Foo Bar
```
## Alternatives or Workarounds
I have to update the config.xml with a xml parser. It's a custom implementation. I also don't want this git changes.
Contributor guide
Research direction
Start by tracing the existing Cordova CLI build and run command entry points and how config.xml supplies the widget id, name, and version. Compare the requested --app-id, --app-name, and --app-version behavior for build and run, including release mode. Done means both commands accept these values without editing config.xml while shared settings remain unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- cli, mobile-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100