andreluizreis
7/13/2017 - 7:29 PM

Using Gradle variable in the AndroidManifest.

Using Gradle variable in the AndroidManifest.

<application
        android:name=".app.MyApplication"
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="${appLabel}"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme.NoActionBar">
productFlavors {
  dev {
      applicationIdSuffix ".dev"
      manifestPlaceholders = [appLabel: "@string/app_name_dev"]
      buildConfigField 'String', 'WEBSITE_API_URL', '"http://20e8a8af.ngrok.io"'
      buildConfigField 'String', 'WEBSITE_URL', '"https://www.site.com/"'
  }