NativeScript / NativeScript/nativescript-cli

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

オープン
#3,691 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

feature
主要言語
JavaScript
スター
1.1k
フォーク
204
平均マージ
1日 9時間
マージ済み PR(30日)
8

説明

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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

package.json と app.gradle から始め、tns build と CLI フックが Android のビルドプロセスにどのように関与するかを追跡します。開発環境と本番環境の選択によって、それぞれ異なるアプリケーション ID と変数を提供する方法を定義します。これには、tns build --dev のようなコマンドが必要かどうかも含まれます。テストについては言及されていません。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
android, javascript
領域
build-system, cli, mobile
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。