Skip to content

Commit cf213db

Browse files
committed
Merge remote-tracking branch 'origin/master' into ghm
2 parents d0fc238 + cff3b63 commit cf213db

File tree

179 files changed

+3970
-2414
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

179 files changed

+3970
-2414
lines changed

Android/firebase_dependencies.gradle

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,22 @@ import org.gradle.util.ConfigureUtil;
1616

1717
// A map of library to the dependencies that need to be added for it.
1818
def firebaseDependenciesMap = [
19-
'app' : ['com.google.firebase:firebase-analytics:17.2.2'],
20-
'admob' : ['com.google.firebase:firebase-ads:18.3.0',
21-
'com.google.android.gms:play-services-measurement-sdk-api:17.2.2'],
22-
'analytics' : ['com.google.firebase:firebase-analytics:17.2.2'],
23-
'auth' : ['com.google.firebase:firebase-auth:19.2.0'],
24-
'database' : ['com.google.firebase:firebase-database:19.2.1'],
19+
'app' : ['com.google.firebase:firebase-analytics:17.4.1'],
20+
'admob' : ['com.google.firebase:firebase-ads:19.1.0',
21+
'com.google.android.gms:play-services-measurement-sdk-api:17.4.1'],
22+
'analytics' : ['com.google.firebase:firebase-analytics:17.4.1'],
23+
'auth' : ['com.google.firebase:firebase-auth:19.3.1'],
24+
'database' : ['com.google.firebase:firebase-database:19.3.0'],
2525
'dynamic_links' : ['com.google.firebase:firebase-dynamic-links:19.1.0'],
26-
'firestore' : ['com.google.firebase:firebase-firestore:21.4.0'],
26+
'firestore' : ['com.google.firebase:firebase-firestore:21.4.3'],
2727
'functions' : ['com.google.firebase:firebase-functions:19.0.2'],
28-
'instance_id' : ['com.google.firebase:firebase-iid:20.0.2'],
28+
'instance_id' : ['com.google.firebase:firebase-iid:20.1.7'],
2929
'invites' : ['com.google.firebase:firebase-invites:17.0.0'],
3030
// Messaging has an additional local dependency to include.
31-
'messaging' : ['com.google.firebase:firebase-messaging:20.1.0',
31+
'messaging' : ['com.google.firebase:firebase-messaging:20.1.7',
3232
'firebase_cpp_sdk.messaging:messaging_java'],
33-
'performance' : ['com.google.firebase:firebase-perf:19.0.5'],
34-
'remote_config' : ['com.google.firebase:firebase-config:19.1.1'],
33+
'performance' : ['com.google.firebase:firebase-perf:19.0.7'],
34+
'remote_config' : ['com.google.firebase:firebase-config:19.1.4'],
3535
'storage' : ['com.google.firebase:firebase-storage:19.1.1']
3636
]
3737

CMakeLists.txt

Lines changed: 48 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2018 Google
1+
# Copyright 2018 Google LLC
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -90,7 +90,13 @@ endif()
9090
# Occasionally ANDROID is not being set correctly when invoked by gradle, so
9191
# set it manually if ANDROID_NDK has been defined.
9292
if(DEFINED ANDROID_NDK)
93-
set(ANDROID 1)
93+
set(ANDROID ON)
94+
endif()
95+
96+
if(NOT ANDROID AND NOT IOS)
97+
set(DESKTOP ON)
98+
else()
99+
set(DESKTOP OFF)
94100
endif()
95101

96102
# Set directories needed by the Firebase subprojects
@@ -100,7 +106,7 @@ set(FIREBASE_GEN_FILE_DIR ${CMAKE_BINARY_DIR}/generated)
100106
set(FIREBASE_SCRIPT_DIR ${CMAKE_CURRENT_LIST_DIR})
101107

102108
if (FIREBASE_CPP_BUILD_TESTS AND MSVC)
103-
# Googletest requires MSVC to compile with the static version of the runtime
109+
# GoogleTest requires MSVC to compile with the static version of the runtime
104110
# library, so define the appropriate runtime flag, before adding libraries.
105111
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MTd")
106112
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MT")
@@ -114,6 +120,20 @@ set(FIREBASE_BINARY_DIR ${PROJECT_BINARY_DIR})
114120
set(FIREBASE_INSTALL_DIR ${PROJECT_BINARY_DIR}/opt)
115121
set(FIREBASE_DOWNLOAD_DIR ${PROJECT_BINARY_DIR}/downloads)
116122

123+
# Firestore is split into a public C++ component and the Firestore core, a
124+
# non-public C++ API used for building other language bindings. Desktop
125+
# platforms get the Firestore core from the CMake build in firebase-ios-sdk.
126+
#
127+
# Mobile platforms do not:
128+
#
129+
# * Android uses the Android SDK via JNI and does not use the Firestore
130+
# core.
131+
# * iOS gets the Firestore core from the FirebaseFirestore CocoaPod and
132+
# does not build the core via CMake.
133+
if(FIREBASE_INCLUDE_FIRESTORE AND DESKTOP)
134+
set(FIRESTORE_USE_EXTERNAL_CMAKE_BUILD ON)
135+
endif()
136+
117137
if(FIREBASE_CPP_USE_PRIOR_GRADLE_BUILD)
118138
# Figure out where app's binary_dir was.
119139
string(REGEX REPLACE
@@ -132,7 +152,7 @@ else()
132152
endif()
133153

134154
# Include Firestore's external build early to resolve conflicts on packages.
135-
if(NOT ANDROID AND FIREBASE_INCLUDE_FIRESTORE)
155+
if(FIRESTORE_USE_EXTERNAL_CMAKE_BUILD)
136156
set(FIRESTORE_BINARY_DIR ${FIRESTORE_SOURCE_DIR}-build)
137157

138158
set(
@@ -151,7 +171,7 @@ set(FLATBUFFERS_BUILD_TESTS OFF CACHE BOOL "")
151171
set(FLATBUFFERS_INSTALL OFF CACHE BOOL "")
152172
set(FLATBUFFERS_FLATHASH OFF CACHE BOOL "")
153173

154-
# Disable buliding flatc if cross compiling
174+
# Disable building flatc if cross compiling
155175
if(IOS OR ANDROID)
156176
set(FLATBUFFERS_BUILD_FLATC OFF CACHE BOOL "")
157177
endif()
@@ -164,13 +184,19 @@ else()
164184
add_external_library(flatbuffers)
165185
endif()
166186

167-
if(FIREBASE_CPP_BUILD_TESTS AND NOT FIREBASE_INCLUDE_FIRESTORE)
168-
# Firestore's external build pulls in googletest
187+
if(FIREBASE_CPP_BUILD_TESTS AND NOT FIRESTORE_USE_EXTERNAL_CMAKE_BUILD)
188+
# Firestore's external build pulls in GoogleTest
169189
add_external_library(googletest)
170190
endif()
171191

192+
if((FIREBASE_INCLUDE_DATABASE AND DESKTOP) AND NOT FIREBASE_INCLUDE_FIRESTORE)
193+
# LevelDB is needed for Desktop and Firestore, but if firestore is being built
194+
# LevelDB will already be included.
195+
add_external_library(leveldb)
196+
endif()
197+
172198
# Some of the external libraries are not used for mobile.
173-
if (NOT ANDROID AND NOT IOS)
199+
if(DESKTOP)
174200
# Use the static versions of the OpenSSL libraries.
175201
set(OPENSSL_USE_STATIC_LIBS TRUE)
176202
if (MSVC)
@@ -255,8 +281,8 @@ if (NOT ANDROID AND NOT IOS)
255281
endif()
256282
endif()
257283

258-
if(NOT ANDROID)
259-
if(FIREBASE_INCLUDE_FIRESTORE)
284+
if(DESKTOP)
285+
if(FIRESTORE_USE_EXTERNAL_CMAKE_BUILD)
260286
# The Firestore build includes protobuf and nanopb already
261287
list(APPEND CMAKE_MODULE_PATH ${NANOPB_SOURCE_DIR}/extra)
262288
find_package(Nanopb REQUIRED)
@@ -281,7 +307,11 @@ if(NOT ANDROID)
281307
endif()
282308
endif()
283309

284-
if(ANDROID OR IOS)
310+
if(DESKTOP)
311+
# Desktop platforms do not need to declare this dependency, as they will build
312+
# flatc correctly when needed.
313+
set(FIREBASE_FLATBUFFERS_DEPENDENCIES "")
314+
else()
285315
# Mobile platforms build flatc externally so that it works on the platform
286316
# performing the build.
287317
set(firebase_external_flatc_build_dir "${FLATBUFFERS_BINARY_DIR}-flatc")
@@ -304,7 +334,7 @@ if(ANDROID OR IOS)
304334
set(FLATBUFFERS_FLATC_EXECUTABLE ${firebase_external_flatc} CACHE STRING "")
305335

306336
# Setup the flatc custom build target.
307-
# These commands are executed from within the currect context, which has set
337+
# These commands are executed from within the current context, which has set
308338
# variables for the target platform. We use "env -i" to clear these
309339
# variables, and manually keep the PATH to regular bash path.
310340
# If we didn't do this, we'd end up building flatc for the target platform
@@ -340,15 +370,17 @@ if(ANDROID OR IOS)
340370
# Set a variable that the dependencies can use, to trigger the build before
341371
# using flatbuffers.
342372
set(FIREBASE_FLATBUFFERS_DEPENDENCIES "firebase_flatc_prebuild")
343-
else()
344-
# Other platforms do not need to declare this dependency, as they will build
345-
# flatc correctly when needed.
346-
set(FIREBASE_FLATBUFFERS_DEPENDENCIES "")
347373
endif()
348374

349375
include(binary_to_array)
350376
include(firebase_cpp_gradle)
351377

378+
# Ensure min/max macros don't get declared on Windows
379+
# (so we can use std::min/max), before including the Firebase subdirectories.
380+
if(MSVC)
381+
add_definitions(-DNOMINMAX)
382+
endif()
383+
352384
add_subdirectory(ios_pod)
353385

354386
# If we're building tests, we need to include the 'testing' folder before any

admob/admob_resources/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ android {
4545
}
4646

4747
dependencies {
48-
implementation 'com.google.firebase:firebase-analytics:17.2.2'
49-
implementation 'com.google.firebase:firebase-ads:18.3.0'
48+
implementation 'com.google.firebase:firebase-analytics:17.4.1'
49+
implementation 'com.google.firebase:firebase-ads:19.1.0'
5050
}
5151

5252
afterEvaluate {

0 commit comments

Comments
 (0)