NativeScript / NativeScript/nativescript-cli
Set up multiple environment such as dev and prod to hold different set of variables
Nessuno ha ancora preso questa issue.
- Lingua principale
- JavaScript
- Stelle
- 1.1k
- Fork
- 204
- Merge medio
- 1g 9h
- PR unite (30g)
- 8
Descrizione
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
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia da package.json e app.gradle, quindi traccia come tns build e gli hook della CLI partecipano al processo di build Android. Definisci come la selezione degli ambienti di sviluppo e di produzione debba fornire ID applicazione e variabili distinti, incluso se sia richiesto un comando come tns build --dev; non vengono menzionati test.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- android, javascript
- Ambito
- build-system, cli, mobile
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100