NativeScript / NativeScript/nativescript-cli

Set up multiple environment such as dev and prod to hold different set of variables

Aperta
#3,691 0 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

feature
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 --version to fetch it) 4.1.0
  • Cross-platform modules: (check the 'version' attribute in the
    node_modules/tns-core-modules/package.json file in your project) 4.1.0
  • Runtime(s): (look for the "tns-android" and "tns-ios" properties in the
    package.json file of your project) 4.1.3
  • Plugin(s): (look for the version number in the package.json file of your
    project) 4.1.3

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. 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

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.