Exclude google deps based on env
Export all vars from .env Signed-off-by: Gheorghe Pinzaru <feross95@gmail.com>
This commit is contained in:
parent
d14f232abf
commit
40e2839793
|
@ -24,3 +24,4 @@ ENABLE_REFERRAL_INVITE=1
|
|||
DISABLE_WALLET_ON_MOBILE_NETWORK=1
|
||||
APN_TOPIC=im.status.ethereum.pr
|
||||
BLANK_PREVIEW=0
|
||||
GOOGLE_FREE=0
|
|
@ -123,6 +123,11 @@ def jscFlavor = 'org.webkit:android-jsc:+'
|
|||
*/
|
||||
def enableHermes = project.ext.react.get("enableHermes", false);
|
||||
|
||||
/**
|
||||
* Exclude google library so we can publish to external android stores
|
||||
*/
|
||||
def googleFree = project.env.get("GOOGLE_FREE", false)
|
||||
|
||||
def getVersionCode = { ->
|
||||
new ByteArrayOutputStream().withStream { stdOut ->
|
||||
if (project.hasProperty("versionCode")) {
|
||||
|
|
|
@ -100,6 +100,9 @@ in stdenv.mkDerivation rec {
|
|||
# Ensure we have the right .env file
|
||||
cp -bf ./${envFileName} ./.env
|
||||
|
||||
# Export all vars from .env file
|
||||
export $(cut -d= -f1 .env)
|
||||
|
||||
# Copy index.js and app/ input files
|
||||
cp -ra --no-preserve=ownership ${builtJsBundle}/* ./
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
const rndi = process.env.GOOGLE_FREE == 1 ? {platforms: {android: null}} : {};
|
||||
|
||||
module.exports = {
|
||||
dependencies: {
|
||||
'react-native-config': {
|
||||
|
@ -22,5 +24,6 @@ module.exports = {
|
|||
ios: null,
|
||||
},
|
||||
},
|
||||
'react-native-device-info': rndi,
|
||||
},
|
||||
};
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
[status-im.acquisition.advertiser :as advertiser]
|
||||
[status-im.acquisition.persistance :as persistence]
|
||||
[status-im.acquisition.gateway :as gateway]
|
||||
[status-im.utils.config :as config]
|
||||
[status-im.acquisition.install-referrer :as install-referrer]))
|
||||
|
||||
(def not-found-code "notfound.click_id")
|
||||
|
@ -105,16 +106,18 @@
|
|||
(ens/get-addr register contract on-success))))))
|
||||
|
||||
(fx/defn create [{:keys [db]}]
|
||||
(when-not config/google-free
|
||||
{::resolve-contract {:chain (ethereum/chain-keyword db)
|
||||
:contract (contracts/get-address db :status/acquisition)
|
||||
:on-success #(re-frame/dispatch [:set-in [:acquisition :contract] %])}
|
||||
::get-referrer nil})
|
||||
::get-referrer nil}))
|
||||
|
||||
(fx/defn login [{:keys [db]}]
|
||||
(when-not config/google-free
|
||||
{::resolve-contract {:chain (ethereum/chain-keyword db)
|
||||
:contract (contracts/get-address db :status/acquisition)
|
||||
:on-success #(re-frame/dispatch [:set-in [:acquisition :contract] %])}
|
||||
::check-referrer nil})
|
||||
::check-referrer nil}))
|
||||
|
||||
(re-frame/reg-sub
|
||||
::metadata
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
(def qr-test-menu-enabled? (enabled? (get-config :QR_READ_TEST_MENU "0")))
|
||||
(def referrals-invite-enabled? (enabled? (get-config :ENABLE_REFERRAL_INVITE "0")))
|
||||
(def quo-preview-enabled? (enabled? (get-config :ENABLE_QUO_PREVIEW "0")))
|
||||
|
||||
(def google-free (enabled? (get-config :GOOGLE_FREE "0")))
|
||||
;; CONFIG VALUES
|
||||
(def log-level
|
||||
(string/upper-case (get-config :LOG_LEVEL "")))
|
||||
|
|
Loading…
Reference in New Issue