NativeScript / NativeScript/nativescript-cli
Set up multiple environment such as dev and prod to hold different set of variables
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- JavaScript
- Sterne
- 1.1k
- Forks
- 204
- Ø Merge
- 1 T. 9 Std.
- Gemergte PRs (30 T.)
- 8
Beschreibung
Please, provide the details below:
Did you verify this is a real problem by searching the [NativeScript Forum]
Yes.
Tell us about the problem
How does one achieve the following: https://stackoverflow.com/questions/22995057/how-do-you-manage-multiple-environments-while-developing-android-apps
I hope to have 2 application IDs such as (org.nativescript.scvsmobileappdev & org.nativescript.scvsmobileapp), which eventually will be build to create 2 playstore apps (one for development testing, another one for production). The package.json, app.gradle must be able to generate its value based on environment variables.
I saw from here https://blog.davincisoftware.sk/building-a-mobile-nativescript-app that we can use the CLI hooks to achieve environment variables, but I want the files that is being involved in the app build process such as tns build to be able to read from those environment, maybe something like tns build --dev
Which platform(s) does your issue occur on?
Android
Please provide the following version numbers that your issue occurs with:
- CLI: (run
tns --versionto fetch it) 4.1.0 - Cross-platform modules: (check the 'version' attribute in the
node_modules/tns-core-modules/package.jsonfile in your project) 4.1.0 - Runtime(s): (look for the
"tns-android"and"tns-ios"properties in the
package.jsonfile of your project) 4.1.3 - Plugin(s): (look for the version number in the
package.jsonfile of your
project) 4.1.3
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit package.json und app.gradle und verfolge anschließend, wie tns build und CLI-Hooks am Android-Buildprozess beteiligt sind. Definiere, wie die Auswahl der Entwicklungs- und Produktionsumgebung unterschiedliche Application IDs und Variablen bereitstellen soll, einschließlich der Frage, ob ein Befehl wie tns build --dev erforderlich ist; Tests werden nicht erwähnt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- android, javascript
- Bereich
- build-system, cli, mobile
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100