gradle: Exclude Google libraries when GOOGLE_FREE=1

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2021-03-02 12:53:36 +01:00
parent 93ed7c15bd
commit aff335b305
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
3 changed files with 10 additions and 4 deletions

View File

@ -175,12 +175,13 @@ release-android: export ANDROID_ABI_INCLUDE ?= armeabi-v7a;arm64-v8a;x86
release-android: keystore ##@build Build release for Android release-android: keystore ##@build Build release for Android
scripts/release-android.sh 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 BUILD_TYPE = release
release-fdroid: export ANDROID_APK_SIGNED = false release-fdroid: export ANDROID_APK_SIGNED = false
release-fdroid: export ANDROID_ABI_SPLIT = false release-fdroid: export ANDROID_ABI_SPLIT = false
release-fdroid: export ANDROID_ABI_INCLUDE = armeabi-v7a;arm64-v8a;x86;x86_64 release-fdroid: export ANDROID_ABI_INCLUDE = armeabi-v7a;arm64-v8a;x86;x86_64
release-fdroid: ##@build Build release for F-Droid release-fdroid: ##@build Build release for F-Droid
echo "GOOGLE_FREE=1" >> .env.release
scripts/release-android.sh scripts/release-android.sh
release-ios: export TARGET := ios release-ios: export TARGET := ios

View File

@ -327,6 +327,14 @@ dependencies {
implementation jscFlavor 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 // react-native-screens
implementation 'androidx.appcompat:appcompat:1.1.0-rc01' implementation 'androidx.appcompat:appcompat:1.1.0-rc01'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-alpha02' implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-alpha02'

View File

@ -1,5 +1,3 @@
const rndi = process.env.GOOGLE_FREE == 1 ? {platforms: {android: null}} : {};
module.exports = { module.exports = {
dependencies: { dependencies: {
'react-native-config': { 'react-native-config': {
@ -24,6 +22,5 @@ module.exports = {
ios: null, ios: null,
}, },
}, },
'react-native-device-info': rndi,
}, },
}; };