diff --git a/Makefile b/Makefile index b433e0bdf9..acb49052be 100644 --- a/Makefile +++ b/Makefile @@ -175,12 +175,13 @@ release-android: export ANDROID_ABI_INCLUDE ?= armeabi-v7a;arm64-v8a;x86 release-android: keystore ##@build Build release for Android scripts/release-android.sh -release-fdroid: export BUILD_ENV ?= prod +release-fdroid: export BUILD_ENV = prod release-fdroid: export BUILD_TYPE = release release-fdroid: export ANDROID_APK_SIGNED = false release-fdroid: export ANDROID_ABI_SPLIT = false release-fdroid: export ANDROID_ABI_INCLUDE = armeabi-v7a;arm64-v8a;x86;x86_64 release-fdroid: ##@build Build release for F-Droid + echo "GOOGLE_FREE=1" >> .env.release scripts/release-android.sh release-ios: export TARGET := ios diff --git a/android/app/build.gradle b/android/app/build.gradle index 587de91a1e..f1e5ae0dde 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -327,6 +327,14 @@ dependencies { implementation jscFlavor } + if (googleFree) { + implementation(project(':react-native-device-info')) { + exclude group: 'com.google.firebase' + exclude group: 'com.google.android.gms' + exclude group: 'com.android.installreferrer' + } + } + // react-native-screens implementation 'androidx.appcompat:appcompat:1.1.0-rc01' implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-alpha02' diff --git a/react-native.config.js b/react-native.config.js index 8ca73c099d..3357184d96 100644 --- a/react-native.config.js +++ b/react-native.config.js @@ -1,5 +1,3 @@ -const rndi = process.env.GOOGLE_FREE == 1 ? {platforms: {android: null}} : {}; - module.exports = { dependencies: { 'react-native-config': { @@ -24,6 +22,5 @@ module.exports = { ios: null, }, }, - 'react-native-device-info': rndi, }, };