diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 3ddaea0630..ef989b70c2 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -39,6 +39,8 @@ on: description: 'Optional: Packaging run # to build against?' test_pull_request: description: 'Optional: Pull request # to build and test? (With optional commit hash, separated by a colon. Specify the FULL hash.)' + firestore_dep_source: + description: 'Optional: Where to get firestore iOS SDK from: "RELEASED", "TIP" or " from firestore-ios-sdk"' env: triggerLabelPrefix: "tests-requested: " @@ -330,6 +332,8 @@ jobs: if [[ "${{ github.event.schedule }}" == "0 11 * * *" ]]; then # at 3am PST/4am PDT. Running firestore desktop integration test aginst tip-of-tree ios repo additional_flags+=(--cmake_flag=-DFIRESTORE_DEP_SOURCE=TIP) + elif [[ "${{ github.event.inputs.firestore_dep_source }}" ]]; then + additional_flags+=(--cmake_flag=-DFIRESTORE_DEP_SOURCE=${{ github.event.inputs.firestore_dep_source }}) fi python scripts/gha/build_testapps.py --p Desktop \ --t ${{ needs.check_and_prepare.outputs.apis }} \ diff --git a/CMakeLists.txt b/CMakeLists.txt index 82a1b8c948..4f3b71301d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,7 +16,8 @@ cmake_minimum_required (VERSION 3.1) -set (CMAKE_CXX_STANDARD 11) +set (CMAKE_CXX_STANDARD 14) +set (CMAKE_CXX_STANDARD_REQUIRED YES) # Don't fall back to an earlier version. # Turn on virtual folders for visual studio set_property(GLOBAL PROPERTY USE_FOLDERS ON) diff --git a/admob/integration_test/CMakeLists.txt b/admob/integration_test/CMakeLists.txt index d84845c6a9..652f45e7e2 100644 --- a/admob/integration_test/CMakeLists.txt +++ b/admob/integration_test/CMakeLists.txt @@ -84,8 +84,9 @@ set(FIREBASE_INTEGRATION_TEST_SRCS # The include directory for the testapp. include_directories(src) -# Integration test uses some features that require C++ 11, such as lambdas. -set (CMAKE_CXX_STANDARD 11) +# Firebase C++ SDK requires C++14. +set (CMAKE_CXX_STANDARD 14) +set (CMAKE_CXX_STANDARD_REQUIRED YES) # Don't fall back to an earlier version. # Download and unpack googletest (and googlemock) at configure time set(GOOGLETEST_ROOT ${CMAKE_CURRENT_LIST_DIR}/external/googletest) diff --git a/admob/src/include/firebase/admob.h b/admob/src/include/firebase/admob.h index 3f5acae33d..957c86b7e1 100644 --- a/admob/src/include/firebase/admob.h +++ b/admob/src/include/firebase/admob.h @@ -28,7 +28,6 @@ #include "firebase/admob/rewarded_video.h" #include "firebase/admob/types.h" #include "firebase/app.h" -#include "firebase/cpp_version_warning.h" #include "firebase/internal/common.h" #if !defined(DOXYGEN) && !defined(SWIG) diff --git a/analytics/integration_test/CMakeLists.txt b/analytics/integration_test/CMakeLists.txt index 6ed6442724..956206969d 100644 --- a/analytics/integration_test/CMakeLists.txt +++ b/analytics/integration_test/CMakeLists.txt @@ -84,8 +84,9 @@ set(FIREBASE_INTEGRATION_TEST_SRCS # The include directory for the testapp. include_directories(src) -# Integration test uses some features that require C++ 11, such as lambdas. -set (CMAKE_CXX_STANDARD 11) +# Firebase C++ SDK requires C++14. +set (CMAKE_CXX_STANDARD 14) +set (CMAKE_CXX_STANDARD_REQUIRED YES) # Don't fall back to an earlier version. # Download and unpack googletest (and googlemock) at configure time set(GOOGLETEST_ROOT ${CMAKE_CURRENT_LIST_DIR}/external/googletest) diff --git a/analytics/src/include/firebase/analytics.h b/analytics/src/include/firebase/analytics.h index 8fd708e3d5..973890b20f 100644 --- a/analytics/src/include/firebase/analytics.h +++ b/analytics/src/include/firebase/analytics.h @@ -23,7 +23,6 @@ #include #include "firebase/app.h" -#include "firebase/cpp_version_warning.h" #include "firebase/future.h" #include "firebase/internal/common.h" #include "firebase/variant.h" diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index 5db0a3f90c..93808bfe71 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -251,7 +251,6 @@ endif() set(internal_HDRS src/include/firebase/app.h - src/include/firebase/cpp_version_warning.h src/include/firebase/future.h src/include/firebase/internal/common.h src/include/firebase/internal/future_impl.h diff --git a/app/integration_test/CMakeLists.txt b/app/integration_test/CMakeLists.txt index f8198474ba..5195f99feb 100644 --- a/app/integration_test/CMakeLists.txt +++ b/app/integration_test/CMakeLists.txt @@ -84,8 +84,9 @@ set(FIREBASE_INTEGRATION_TEST_SRCS # The include directory for the testapp. include_directories(src) -# Integration test uses some features that require C++ 11, such as lambdas. -set (CMAKE_CXX_STANDARD 11) +# Firebase C++ SDK requires C++14. +set (CMAKE_CXX_STANDARD 14) +set (CMAKE_CXX_STANDARD_REQUIRED YES) # Don't fall back to an earlier version. # Download and unpack googletest (and googlemock) at configure time set(GOOGLETEST_ROOT ${CMAKE_CURRENT_LIST_DIR}/external/googletest) diff --git a/app/rest/CMakeLists.txt b/app/rest/CMakeLists.txt index 50bc08e781..8d58c94f96 100644 --- a/app/rest/CMakeLists.txt +++ b/app/rest/CMakeLists.txt @@ -15,7 +15,9 @@ # CMake file for the firebase_rest_lib library cmake_minimum_required (VERSION 3.1) -set (CMAKE_CXX_STANDARD 11) +# Firebase C++ SDK requires C++14. +set (CMAKE_CXX_STANDARD 14) +set (CMAKE_CXX_STANDARD_REQUIRED YES) # Don't fall back to an earlier version. project(firebase_rest_lib NONE) enable_language(C) diff --git a/app/src/include/firebase/app.h b/app/src/include/firebase/app.h index 546ad94fb1..5e7399f8e4 100644 --- a/app/src/include/firebase/app.h +++ b/app/src/include/firebase/app.h @@ -17,7 +17,6 @@ #ifndef FIREBASE_APP_SRC_INCLUDE_FIREBASE_APP_H_ #define FIREBASE_APP_SRC_INCLUDE_FIREBASE_APP_H_ -#include "cpp_version_warning.h" #include "firebase/internal/platform.h" #if FIREBASE_PLATFORM_ANDROID diff --git a/app/src/include/firebase/cpp_version_warning.h b/app/src/include/firebase/cpp_version_warning.h deleted file mode 100644 index 2341bf7d82..0000000000 --- a/app/src/include/firebase/cpp_version_warning.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#if __cplusplus < 201400 -#pragma message \ - "The next major release of the Firebase C++ SDK will " \ - "drop support for C++11, setting the new minimum C++ version to C++14." -#endif diff --git a/app_check/integration_test/CMakeLists.txt b/app_check/integration_test/CMakeLists.txt index 7eb6eb8f3d..9a43ee66f1 100644 --- a/app_check/integration_test/CMakeLists.txt +++ b/app_check/integration_test/CMakeLists.txt @@ -84,8 +84,9 @@ set(FIREBASE_INTEGRATION_TEST_SRCS # The include directory for the testapp. include_directories(src) -# Integration test uses some features that require C++ 11, such as lambdas. -set (CMAKE_CXX_STANDARD 11) +# Firebase C++ SDK requires C++14. +set (CMAKE_CXX_STANDARD 14) +set (CMAKE_CXX_STANDARD_REQUIRED YES) # Don't fall back to an earlier version. # Download and unpack googletest (and googlemock) at configure time set(GOOGLETEST_ROOT ${CMAKE_CURRENT_LIST_DIR}/external/googletest) diff --git a/app_check/src/include/firebase/app_check.h b/app_check/src/include/firebase/app_check.h index 399fcd1b0c..19167bcf3b 100644 --- a/app_check/src/include/firebase/app_check.h +++ b/app_check/src/include/firebase/app_check.h @@ -18,7 +18,6 @@ #include #include "firebase/app.h" -#include "firebase/cpp_version_warning.h" #include "firebase/future.h" namespace firebase { diff --git a/auth/integration_test/CMakeLists.txt b/auth/integration_test/CMakeLists.txt index c1b3bbd110..ab5be09e71 100644 --- a/auth/integration_test/CMakeLists.txt +++ b/auth/integration_test/CMakeLists.txt @@ -84,8 +84,9 @@ set(FIREBASE_INTEGRATION_TEST_SRCS # The include directory for the testapp. include_directories(src) -# Integration test uses some features that require C++ 11, such as lambdas. -set (CMAKE_CXX_STANDARD 11) +# Firebase C++ SDK requires C++14. +set (CMAKE_CXX_STANDARD 14) +set (CMAKE_CXX_STANDARD_REQUIRED YES) # Don't fall back to an earlier version. # Download and unpack googletest (and googlemock) at configure time set(GOOGLETEST_ROOT ${CMAKE_CURRENT_LIST_DIR}/external/googletest) diff --git a/auth/src/include/firebase/auth.h b/auth/src/include/firebase/auth.h index 996a53a362..408c34ea90 100644 --- a/auth/src/include/firebase/auth.h +++ b/auth/src/include/firebase/auth.h @@ -21,7 +21,6 @@ #include "firebase/app.h" #include "firebase/auth/user.h" -#include "firebase/cpp_version_warning.h" #include "firebase/future.h" #include "firebase/internal/common.h" diff --git a/cmake/external/firestore.cmake b/cmake/external/firestore.cmake index befc2e7dd6..0a835c3bcf 100644 --- a/cmake/external/firestore.cmake +++ b/cmake/external/firestore.cmake @@ -49,6 +49,7 @@ function(GetTag t) DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR} GIT_REPOSITORY "https://github.com/firebase/firebase-ios-sdk.git" GIT_TAG ${t} + GIT_CONFIG "core.autocrlf=input" GIT_SHALLOW "ON" PREFIX ${PROJECT_BINARY_DIR} diff --git a/database/integration_test/CMakeLists.txt b/database/integration_test/CMakeLists.txt index cbc21a8617..4a8cc6f19a 100644 --- a/database/integration_test/CMakeLists.txt +++ b/database/integration_test/CMakeLists.txt @@ -84,8 +84,9 @@ set(FIREBASE_INTEGRATION_TEST_SRCS # The include directory for the testapp. include_directories(src) -# Integration test uses some features that require C++ 11, such as lambdas. -set (CMAKE_CXX_STANDARD 11) +# Firebase C++ SDK requires C++14. +set (CMAKE_CXX_STANDARD 14) +set (CMAKE_CXX_STANDARD_REQUIRED YES) # Don't fall back to an earlier version. # Download and unpack googletest (and googlemock) at configure time set(GOOGLETEST_ROOT ${CMAKE_CURRENT_LIST_DIR}/external/googletest) diff --git a/database/src/include/firebase/database.h b/database/src/include/firebase/database.h index 2b257df632..d0dc904c10 100644 --- a/database/src/include/firebase/database.h +++ b/database/src/include/firebase/database.h @@ -16,7 +16,6 @@ #define FIREBASE_DATABASE_SRC_INCLUDE_FIREBASE_DATABASE_H_ #include "firebase/app.h" -#include "firebase/cpp_version_warning.h" #include "firebase/database/common.h" #include "firebase/database/data_snapshot.h" #include "firebase/database/database_reference.h" diff --git a/dynamic_links/integration_test/CMakeLists.txt b/dynamic_links/integration_test/CMakeLists.txt index 322eaf6d02..5286ceba8c 100644 --- a/dynamic_links/integration_test/CMakeLists.txt +++ b/dynamic_links/integration_test/CMakeLists.txt @@ -84,8 +84,9 @@ set(FIREBASE_INTEGRATION_TEST_SRCS # The include directory for the testapp. include_directories(src) -# Integration test uses some features that require C++ 11, such as lambdas. -set (CMAKE_CXX_STANDARD 11) +# Firebase C++ SDK requires C++14. +set (CMAKE_CXX_STANDARD 14) +set (CMAKE_CXX_STANDARD_REQUIRED YES) # Don't fall back to an earlier version. # Download and unpack googletest (and googlemock) at configure time set(GOOGLETEST_ROOT ${CMAKE_CURRENT_LIST_DIR}/external/googletest) diff --git a/dynamic_links/src/include/firebase/dynamic_links.h b/dynamic_links/src/include/firebase/dynamic_links.h index 868c289e30..7a96de679f 100644 --- a/dynamic_links/src/include/firebase/dynamic_links.h +++ b/dynamic_links/src/include/firebase/dynamic_links.h @@ -18,7 +18,6 @@ #include #include "firebase/app.h" -#include "firebase/cpp_version_warning.h" #include "firebase/internal/common.h" #if !defined(DOXYGEN) && !defined(SWIG) diff --git a/firestore/integration_test/CMakeLists.txt b/firestore/integration_test/CMakeLists.txt index b2351f56f8..af2d1b8150 100644 --- a/firestore/integration_test/CMakeLists.txt +++ b/firestore/integration_test/CMakeLists.txt @@ -84,8 +84,9 @@ set(FIREBASE_INTEGRATION_TEST_SRCS # The include directory for the testapp. include_directories(src) -# Integration test uses some features that require C++ 11, such as lambdas. -set (CMAKE_CXX_STANDARD 11) +# Firebase C++ SDK requires C++14. +set (CMAKE_CXX_STANDARD 14) +set (CMAKE_CXX_STANDARD_REQUIRED YES) # Don't fall back to an earlier version. # Download and unpack googletest (and googlemock) at configure time set(GOOGLETEST_ROOT ${CMAKE_CURRENT_LIST_DIR}/external/googletest) diff --git a/firestore/integration_test_internal/CMakeLists.txt b/firestore/integration_test_internal/CMakeLists.txt index f6e22bd8b1..5aa57311f3 100644 --- a/firestore/integration_test_internal/CMakeLists.txt +++ b/firestore/integration_test_internal/CMakeLists.txt @@ -232,8 +232,9 @@ include_directories(${ABSEIL_CPP_ROOT}) # Allow testing internal Firebase APIs. add_definitions(-DINTERNAL_EXPERIMENTAL) -# Integration test uses some features that require C++ 11, such as lambdas. -set (CMAKE_CXX_STANDARD 11) +# Firebase C++ SDK requires C++14. +set (CMAKE_CXX_STANDARD 14) +set (CMAKE_CXX_STANDARD_REQUIRED YES) # Don't fall back to an earlier version. # Download and unpack googletest (and googlemock) at configure time set(GOOGLETEST_ROOT ${CMAKE_CURRENT_LIST_DIR}/external/googletest) diff --git a/firestore/integration_test_internal/integration_test.xcodeproj/project.pbxproj b/firestore/integration_test_internal/integration_test.xcodeproj/project.pbxproj index ee3b7df2da..4fc6d0ca75 100644 --- a/firestore/integration_test_internal/integration_test.xcodeproj/project.pbxproj +++ b/firestore/integration_test_internal/integration_test.xcodeproj/project.pbxproj @@ -680,7 +680,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; @@ -723,7 +723,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; diff --git a/firestore/integration_test_internal/src/android/promise_android_test.cc b/firestore/integration_test_internal/src/android/promise_android_test.cc index 96615a729d..f5503f4e88 100644 --- a/firestore/integration_test_internal/src/android/promise_android_test.cc +++ b/firestore/integration_test_internal/src/android/promise_android_test.cc @@ -31,7 +31,6 @@ #include "firestore/src/android/exception_android.h" #include "firestore/src/android/firestore_android.h" #include "firestore/src/android/promise_factory_android.h" -#include "firestore/src/common/make_unique.h" #include "firestore/src/include/firebase/firestore.h" #include "firestore/src/jni/env.h" #include "firestore/src/jni/integer.h" @@ -210,7 +209,7 @@ class TestCompletion : public TestCompletionBase { if (result == nullptr) { result_.reset(nullptr); } else { - result_ = make_unique(*result); + result_ = std::make_unique(*result); } } diff --git a/firestore/integration_test_internal/src/jni/env_test.cc b/firestore/integration_test_internal/src/jni/env_test.cc index d31992e48e..9e5f04d50f 100644 --- a/firestore/integration_test_internal/src/jni/env_test.cc +++ b/firestore/integration_test_internal/src/jni/env_test.cc @@ -22,7 +22,6 @@ #include "app/meta/move.h" #include "firestore/src/android/exception_android.h" #include "firestore/src/common/macros.h" -#include "firestore/src/common/make_unique.h" #include "firestore/src/jni/array.h" #include "firestore_integration_test.h" #include "gtest/gtest.h" @@ -33,7 +32,7 @@ namespace jni { class EnvTest : public FirestoreIntegrationTest { public: - EnvTest() : env_(make_unique(GetEnv())) {} + EnvTest() : env_(std::make_unique(GetEnv())) {} ~EnvTest() override { // Ensure that after the test is done that any pending exception is cleared diff --git a/firestore/integration_test_internal/src/util/integration_test_util.cc b/firestore/integration_test_internal/src/util/integration_test_util.cc index d16dc418d3..3746d0faf4 100644 --- a/firestore/integration_test_internal/src/util/integration_test_util.cc +++ b/firestore/integration_test_internal/src/util/integration_test_util.cc @@ -15,9 +15,9 @@ */ #include // NOLINT(build/c++11) +#include #include // NOLINT(build/c++11) -#include "absl/memory/memory.h" #include "app_framework.h" #include "firebase/app.h" #include "firebase/firestore.h" @@ -37,8 +37,8 @@ struct TestFriend { static FirestoreInternal* CreateTestFirestoreInternal(App* app) { #if !defined(__ANDROID__) return new FirestoreInternal( - app, absl::make_unique(), - absl::make_unique()); + app, std::make_unique(), + std::make_unique()); #else return new FirestoreInternal(app); #endif // !defined(__ANDROID__) diff --git a/firestore/src/android/firestore_android.cc b/firestore/src/android/firestore_android.cc index 4b9926ce09..4c0e2a990c 100644 --- a/firestore/src/android/firestore_android.cc +++ b/firestore/src/android/firestore_android.cc @@ -60,7 +60,6 @@ #include "firestore/src/android/wrapper.h" #include "firestore/src/android/write_batch_android.h" #include "firestore/src/common/hard_assert_common.h" -#include "firestore/src/common/make_unique.h" #include "firestore/src/include/firebase/firestore.h" #include "firestore/src/jni/array.h" #include "firestore/src/jni/array_list.h" @@ -285,7 +284,7 @@ FirestoreInternal::FirestoreInternal(App* app) { FIREBASE_ASSERT(java_user_callback_executor.get() != nullptr); user_callback_executor_ = java_user_callback_executor; - promises_ = make_unique>(this); + promises_ = std::make_unique>(this); } /* static */ diff --git a/firestore/src/android/promise_android.h b/firestore/src/android/promise_android.h index b1f9c6ec5e..04131651e3 100644 --- a/firestore/src/android/promise_android.h +++ b/firestore/src/android/promise_android.h @@ -28,7 +28,6 @@ #include "firestore/src/android/exception_android.h" #include "firestore/src/android/firestore_android.h" #include "firestore/src/android/query_snapshot_android.h" -#include "firestore/src/common/make_unique.h" #include "firestore/src/jni/env.h" #include "firestore/src/jni/object.h" #include "firestore/src/jni/task.h" @@ -98,7 +97,7 @@ class Promise { ReferenceCountedFutureImpl* impl, Completion* completion) : firestore_ref_(firestore_ref), - completer_(make_unique>( + completer_(std::make_unique>( firestore_ref, impl, completion)), impl_(impl) {} diff --git a/firestore/src/common/make_unique.h b/firestore/src/common/make_unique.h deleted file mode 100644 index 0098017076..0000000000 --- a/firestore/src/common/make_unique.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright 2021 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// Note: This is needed since std::make_unique is only available starting C++14. -// TODO(b/191981857): Remove this file when possible. - -#ifndef FIREBASE_FIRESTORE_SRC_COMMON_MAKE_UNIQUE_H_ -#define FIREBASE_FIRESTORE_SRC_COMMON_MAKE_UNIQUE_H_ - -#include -#include - -namespace firebase { -namespace firestore { - -template -std::unique_ptr make_unique(Args&&... args) { - return std::unique_ptr(new T(std::forward(args)...)); -} - -} // namespace firestore -} // namespace firebase - -#endif // FIREBASE_FIRESTORE_SRC_COMMON_MAKE_UNIQUE_H_ diff --git a/firestore/src/common/settings_apple.mm b/firestore/src/common/settings_apple.mm index 57856d16fc..5ff4b325df 100644 --- a/firestore/src/common/settings_apple.mm +++ b/firestore/src/common/settings_apple.mm @@ -17,9 +17,9 @@ #include "firestore/src/include/firebase/firestore/settings.h" #include +#include #include "Firestore/core/src/util/executor_libdispatch.h" -#include "absl/memory/memory.h" namespace firebase { namespace firestore { @@ -39,7 +39,7 @@ Executor::CreateSerial("com.google.firebase.firestore.callback")) {} std::unique_ptr Settings::CreateExecutor() const { - return absl::make_unique(dispatch_queue()); + return std::make_unique(dispatch_queue()); } dispatch_queue_t Settings::dispatch_queue() const { @@ -52,7 +52,7 @@ } void Settings::set_dispatch_queue(dispatch_queue_t queue) { - executor_ = absl::make_unique(queue); + executor_ = std::make_unique(queue); } } // namespace firestore diff --git a/firestore/src/include/firebase/firestore.h b/firestore/src/include/firebase/firestore.h index d8a461e7b2..1749a4e3b2 100644 --- a/firestore/src/include/firebase/firestore.h +++ b/firestore/src/include/firebase/firestore.h @@ -23,7 +23,6 @@ #include "firebase/internal/common.h" #include "firebase/app.h" -#include "firebase/cpp_version_warning.h" #include "firebase/future.h" #include "firebase/log.h" // Include *all* the public headers to make sure including just "firestore.h" is diff --git a/firestore/src/main/create_credentials_provider_desktop.cc b/firestore/src/main/create_credentials_provider_desktop.cc index 1a10375383..fac9e68afb 100644 --- a/firestore/src/main/create_credentials_provider_desktop.cc +++ b/firestore/src/main/create_credentials_provider_desktop.cc @@ -14,7 +14,8 @@ * limitations under the License. */ -#include "absl/memory/memory.h" +#include + #include "auth/src/include/firebase/auth.h" #include "firestore/src/main/create_credentials_provider.h" #include "firestore/src/main/credentials_provider_desktop.h" @@ -26,7 +27,7 @@ using credentials::AuthCredentialsProvider; using firebase::auth::Auth; std::unique_ptr CreateCredentialsProvider(App& app) { - return absl::make_unique(app); + return std::make_unique(app); } } // namespace firestore diff --git a/firestore/src/main/create_credentials_provider_ios.mm b/firestore/src/main/create_credentials_provider_ios.mm index 8b5c35cc12..abbf74c5b2 100644 --- a/firestore/src/main/create_credentials_provider_ios.mm +++ b/firestore/src/main/create_credentials_provider_ios.mm @@ -16,6 +16,8 @@ #include "firestore/src/main/create_credentials_provider.h" +#include + #import "FIRAppInternal.h" #import "FIRAuthInterop.h" #import "FIRComponent.h" @@ -24,7 +26,6 @@ #import "FirebaseCore.h" #include "Firestore/core/src/credentials/firebase_auth_credentials_provider_apple.h" -#include "absl/memory/memory.h" #include "app/src/include/firebase/app.h" namespace firebase { @@ -36,7 +37,7 @@ std::unique_ptr CreateCredentialsProvider(App& app) { FIRApp* ios_app = app.GetPlatformApp(); auto ios_auth = FIR_COMPONENT(FIRAuthInterop, ios_app.container); - return absl::make_unique(ios_app, ios_auth); + return std::make_unique(ios_app, ios_auth); } } // namespace firestore diff --git a/firestore/src/main/create_firebase_metadata_provider_desktop.cc b/firestore/src/main/create_firebase_metadata_provider_desktop.cc index a6daace69c..f8d0724b4e 100644 --- a/firestore/src/main/create_firebase_metadata_provider_desktop.cc +++ b/firestore/src/main/create_firebase_metadata_provider_desktop.cc @@ -14,7 +14,8 @@ * limitations under the License. */ -#include "absl/memory/memory.h" +#include + #include "firestore/src/main/create_firebase_metadata_provider.h" #include "firestore/src/main/firebase_metadata_provider_desktop.h" @@ -25,7 +26,7 @@ using remote::FirebaseMetadataProvider; std::unique_ptr CreateFirebaseMetadataProvider( App& app) { - return absl::make_unique(app); + return std::make_unique(app); } } // namespace firestore diff --git a/firestore/src/main/create_firebase_metadata_provider_ios.mm b/firestore/src/main/create_firebase_metadata_provider_ios.mm index 1161bcb836..556c565a17 100644 --- a/firestore/src/main/create_firebase_metadata_provider_ios.mm +++ b/firestore/src/main/create_firebase_metadata_provider_ios.mm @@ -16,8 +16,9 @@ #include "firestore/src/main/create_firebase_metadata_provider.h" +#include + #include "Firestore/core/src/remote/firebase_metadata_provider_apple.h" -#include "absl/memory/memory.h" #include "app/src/include/firebase/app.h" namespace firebase { @@ -28,7 +29,7 @@ std::unique_ptr CreateFirebaseMetadataProvider( App& app) { - return absl::make_unique(app.GetPlatformApp()); + return std::make_unique(app.GetPlatformApp()); } } // namespace firestore diff --git a/firestore/src/main/firestore_main.cc b/firestore/src/main/firestore_main.cc index 3834ec6a8d..1616e34534 100644 --- a/firestore/src/main/firestore_main.cc +++ b/firestore/src/main/firestore_main.cc @@ -17,6 +17,7 @@ #include "firestore/src/main/firestore_main.h" #include +#include #include #include @@ -387,8 +388,8 @@ Future FirestoreInternal::LoadBundle( const std::string& bundle) { auto promise = promise_factory_.CreatePromise( AsyncApi::kLoadBundle); - auto bundle_stream = absl::make_unique( - absl::make_unique(bundle)); + auto bundle_stream = std::make_unique( + std::make_unique(bundle)); std::shared_ptr task = firestore_core_->LoadBundle(std::move(bundle_stream)); @@ -412,8 +413,8 @@ Future FirestoreInternal::LoadBundle( std::function progress_callback) { auto promise = promise_factory_.CreatePromise( AsyncApi::kLoadBundle); - auto bundle_stream = absl::make_unique( - absl::make_unique(bundle)); + auto bundle_stream = std::make_unique( + std::make_unique(bundle)); std::shared_ptr task = firestore_core_->LoadBundle(std::move(bundle_stream)); diff --git a/functions/integration_test/CMakeLists.txt b/functions/integration_test/CMakeLists.txt index a220e558aa..dccb88cd50 100644 --- a/functions/integration_test/CMakeLists.txt +++ b/functions/integration_test/CMakeLists.txt @@ -84,8 +84,9 @@ set(FIREBASE_INTEGRATION_TEST_SRCS # The include directory for the testapp. include_directories(src) -# Integration test uses some features that require C++ 11, such as lambdas. -set (CMAKE_CXX_STANDARD 11) +# Firebase C++ SDK requires C++14. +set (CMAKE_CXX_STANDARD 14) +set (CMAKE_CXX_STANDARD_REQUIRED YES) # Don't fall back to an earlier version. # Download and unpack googletest (and googlemock) at configure time set(GOOGLETEST_ROOT ${CMAKE_CURRENT_LIST_DIR}/external/googletest) diff --git a/functions/src/include/firebase/functions.h b/functions/src/include/firebase/functions.h index b7aa0259c2..500a05cc7a 100644 --- a/functions/src/include/firebase/functions.h +++ b/functions/src/include/firebase/functions.h @@ -18,7 +18,6 @@ #include #include "firebase/app.h" -#include "firebase/cpp_version_warning.h" #include "firebase/functions/callable_reference.h" #include "firebase/functions/callable_result.h" #include "firebase/functions/common.h" diff --git a/gma/integration_test/CMakeLists.txt b/gma/integration_test/CMakeLists.txt index a4825bdd1e..29c6a6e4d1 100644 --- a/gma/integration_test/CMakeLists.txt +++ b/gma/integration_test/CMakeLists.txt @@ -84,8 +84,9 @@ set(FIREBASE_INTEGRATION_TEST_SRCS # The include directory for the testapp. include_directories(src) -# Integration test uses some features that require C++ 11, such as lambdas. -set (CMAKE_CXX_STANDARD 11) +# Firebase C++ SDK requires C++14. +set (CMAKE_CXX_STANDARD 14) +set (CMAKE_CXX_STANDARD_REQUIRED YES) # Don't fall back to an earlier version. # Download and unpack googletest (and googlemock) at configure time set(GOOGLETEST_ROOT ${CMAKE_CURRENT_LIST_DIR}/external/googletest) diff --git a/gma/src/include/firebase/gma.h b/gma/src/include/firebase/gma.h index 9a4644b191..b7da2cf569 100644 --- a/gma/src/include/firebase/gma.h +++ b/gma/src/include/firebase/gma.h @@ -26,7 +26,6 @@ #include #include "firebase/app.h" -#include "firebase/cpp_version_warning.h" #include "firebase/gma/ad_view.h" #include "firebase/gma/interstitial_ad.h" #include "firebase/gma/rewarded_ad.h" diff --git a/installations/integration_test/CMakeLists.txt b/installations/integration_test/CMakeLists.txt index e0cb95f201..1bc9bc879e 100644 --- a/installations/integration_test/CMakeLists.txt +++ b/installations/integration_test/CMakeLists.txt @@ -84,8 +84,9 @@ set(FIREBASE_INTEGRATION_TEST_SRCS # The include directory for the testapp. include_directories(src) -# Integration test uses some features that require C++ 11, such as lambdas. -set (CMAKE_CXX_STANDARD 11) +# Firebase C++ SDK requires C++14. +set (CMAKE_CXX_STANDARD 14) +set (CMAKE_CXX_STANDARD_REQUIRED YES) # Don't fall back to an earlier version. # Download and unpack googletest (and googlemock) at configure time set(GOOGLETEST_ROOT ${CMAKE_CURRENT_LIST_DIR}/external/googletest) diff --git a/installations/src/include/firebase/installations.h b/installations/src/include/firebase/installations.h index 0cd1a14615..c9774bc37e 100644 --- a/installations/src/include/firebase/installations.h +++ b/installations/src/include/firebase/installations.h @@ -19,7 +19,6 @@ #include #include "firebase/app.h" -#include "firebase/cpp_version_warning.h" #include "firebase/future.h" #include "firebase/internal/common.h" diff --git a/messaging/integration_test/CMakeLists.txt b/messaging/integration_test/CMakeLists.txt index cb38e1f31e..3e33aa9bea 100644 --- a/messaging/integration_test/CMakeLists.txt +++ b/messaging/integration_test/CMakeLists.txt @@ -84,8 +84,9 @@ set(FIREBASE_INTEGRATION_TEST_SRCS # The include directory for the testapp. include_directories(src) -# Integration test uses some features that require C++ 11, such as lambdas. -set (CMAKE_CXX_STANDARD 11) +# Firebase C++ SDK requires C++14. +set (CMAKE_CXX_STANDARD 14) +set (CMAKE_CXX_STANDARD_REQUIRED YES) # Don't fall back to an earlier version. # Download and unpack googletest (and googlemock) at configure time set(GOOGLETEST_ROOT ${CMAKE_CURRENT_LIST_DIR}/external/googletest) diff --git a/messaging/src/include/firebase/messaging.h b/messaging/src/include/firebase/messaging.h index bda6abd6f2..e7c7f57768 100644 --- a/messaging/src/include/firebase/messaging.h +++ b/messaging/src/include/firebase/messaging.h @@ -22,7 +22,6 @@ #include #include "firebase/app.h" -#include "firebase/cpp_version_warning.h" #include "firebase/future.h" #include "firebase/internal/common.h" diff --git a/performance/src/include/firebase/performance.h b/performance/src/include/firebase/performance.h index 0ccf6d4d7b..ee7acaeec4 100644 --- a/performance/src/include/firebase/performance.h +++ b/performance/src/include/firebase/performance.h @@ -4,7 +4,6 @@ #define FIREBASE_PERFORMANCE_SRC_INCLUDE_FIREBASE_PERFORMANCE_H_ #include "firebase/app.h" -#include "firebase/cpp_version_warning.h" #include "firebase/performance/http_metric.h" #include "firebase/performance/trace.h" diff --git a/release_build_files/readme.md b/release_build_files/readme.md index a3372bb0d7..029eb59477 100644 --- a/release_build_files/readme.md +++ b/release_build_files/readme.md @@ -70,11 +70,9 @@ libs/windows | Windows static libraries (desktop or stub ## C++ Language Standards -The Firebase C++ SDK supports the C++11 language standard. - -Note: The next major release of the Firebase C++ SDK will set the new minimum -C++ version to C++14. For more information please see our -[C++ Language Standard Support Criteria](https://opensource.google/documentation/policies/cplusplus-support#c_language_standard). +The Firebase C++ SDK supports the C++14 language standard. For more information, +please see our [C++ Language Standard Support +Criteria](https://opensource.google/documentation/policies/cplusplus-support#c_language_standard). ## Library / XCFramework Dependencies @@ -644,6 +642,7 @@ code. ## Release Notes ### Upcoming Release - Changes + - General: Update minimum supported C++ standard to C++14. - General (iOS): Update to Firebase Cocoapods version 10.8.0. - General (Android): Update to Firebase Android BoM version 31.5.0. - GMA (Android): Updated dependency to play-services-ads version 22.0.0. diff --git a/remote_config/integration_test/CMakeLists.txt b/remote_config/integration_test/CMakeLists.txt index 828e6f23ae..3b61f6f729 100644 --- a/remote_config/integration_test/CMakeLists.txt +++ b/remote_config/integration_test/CMakeLists.txt @@ -84,8 +84,9 @@ set(FIREBASE_INTEGRATION_TEST_SRCS # The include directory for the testapp. include_directories(src) -# Integration test uses some features that require C++ 11, such as lambdas. -set (CMAKE_CXX_STANDARD 11) +# Firebase C++ SDK requires C++14. +set (CMAKE_CXX_STANDARD 14) +set (CMAKE_CXX_STANDARD_REQUIRED YES) # Don't fall back to an earlier version. # Download and unpack googletest (and googlemock) at configure time set(GOOGLETEST_ROOT ${CMAKE_CURRENT_LIST_DIR}/external/googletest) diff --git a/remote_config/src/include/firebase/remote_config.h b/remote_config/src/include/firebase/remote_config.h index f201d23ee2..a2bd417757 100644 --- a/remote_config/src/include/firebase/remote_config.h +++ b/remote_config/src/include/firebase/remote_config.h @@ -20,7 +20,6 @@ #include #include "firebase/app.h" -#include "firebase/cpp_version_warning.h" #include "firebase/future.h" #include "firebase/internal/common.h" #include "firebase/internal/platform.h" diff --git a/storage/integration_test/CMakeLists.txt b/storage/integration_test/CMakeLists.txt index f2eea4ad79..71011b2138 100644 --- a/storage/integration_test/CMakeLists.txt +++ b/storage/integration_test/CMakeLists.txt @@ -84,8 +84,9 @@ set(FIREBASE_INTEGRATION_TEST_SRCS # The include directory for the testapp. include_directories(src) -# Integration test uses some features that require C++ 11, such as lambdas. -set (CMAKE_CXX_STANDARD 11) +# Firebase C++ SDK requires C++14. +set (CMAKE_CXX_STANDARD 14) +set (CMAKE_CXX_STANDARD_REQUIRED YES) # Don't fall back to an earlier version. # Download and unpack googletest (and googlemock) at configure time set(GOOGLETEST_ROOT ${CMAKE_CURRENT_LIST_DIR}/external/googletest) diff --git a/storage/src/include/firebase/storage.h b/storage/src/include/firebase/storage.h index e113e2bd25..8d081e4c0e 100644 --- a/storage/src/include/firebase/storage.h +++ b/storage/src/include/firebase/storage.h @@ -18,7 +18,6 @@ #include #include "firebase/app.h" -#include "firebase/cpp_version_warning.h" #include "firebase/internal/common.h" #include "firebase/storage/common.h" #include "firebase/storage/controller.h" diff --git a/testing/CMakeLists.txt b/testing/CMakeLists.txt index 2bde9285ba..9f3817fbf3 100644 --- a/testing/CMakeLists.txt +++ b/testing/CMakeLists.txt @@ -13,7 +13,8 @@ # limitations under the License. cmake_minimum_required (VERSION 3.1) -set (CMAKE_CXX_STANDARD 11) +set (CMAKE_CXX_STANDARD 14) +set (CMAKE_CXX_STANDARD_REQUIRED YES) # Don't fall back to an earlier version. include(binary_to_array) diff --git a/testlab/src/include/firebase/testlab.h b/testlab/src/include/firebase/testlab.h index 6fa9b15156..6dfdd95732 100644 --- a/testlab/src/include/firebase/testlab.h +++ b/testlab/src/include/firebase/testlab.h @@ -20,7 +20,6 @@ #include #include "firebase/app.h" -#include "firebase/cpp_version_warning.h" #include "firebase/internal/common.h" #if !defined(DOXYGEN) && !defined(SWIG)