Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ jobs:
- name: "Install Tools"
run: |
npm install -g firebase-tools
cd .github/workflows/scripts/functions && npm install
- name: "Build Windows (Release)"
run: cd tests && flutter build windows --release
- name: Start Firebase Emulator and run tests
Expand Down Expand Up @@ -95,6 +96,7 @@ jobs:
- name: "Install Tools"
run: |
npm install -g firebase-tools
cd .github/workflows/scripts/functions && npm install
- name: Start Firebase Emulator and run tests
run: |
cd ./.github/workflows/scripts
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ and open source.
| App Check | [![App Check pub.dev badge](https://img.shields.io/pub/v/firebase_app_check.svg)](https://pub.dev/packages/firebase_app_check) | [🔗](https://firebase.google.com/docs/app-check) | [📖](https://firebase.google.com/docs/app-check/flutter/default-providers) | [`firebase_app_check`](https://github.com/FirebaseExtended/flutterfire/tree/main/packages/firebase_app_check) | ✔ | ✔ | ✔ | β | N/A |
| Authentication | [![Authentication pub.dev badge](https://img.shields.io/pub/v/firebase_auth.svg)](https://pub.dev/packages/firebase_auth) | [🔗](https://firebase.google.com/products/auth) | [📖](https://firebase.google.com/docs/auth/flutter/start) | [`firebase_auth`](https://github.com/FirebaseExtended/flutterfire/tree/main/packages/firebase_auth) | ✔ | ✔ | ✔ | β | (*) |
| Cloud Firestore | [![Cloud Firestore pub.dev badge](https://img.shields.io/pub/v/cloud_firestore.svg)](https://pub.dev/packages/cloud_firestore) | [🔗](https://firebase.google.com/products/firestore) | [📖](https://firebase.google.com/docs/firestore/quickstart) | [`cloud_firestore`](https://github.com/FirebaseExtended/flutterfire/tree/main/packages/cloud_firestore) | ✔ | ✔ | ✔ | β | (*) |
| Cloud Functions | [![Cloud Functions pub.dev badge](https://img.shields.io/pub/v/cloud_functions.svg)](https://pub.dev/packages/cloud_functions) | [🔗](https://firebase.google.com/products/functions) | [📖](https://firebase.google.com/docs/functions/get-started?gen=2nd) | [`cloud_functions`](https://github.com/FirebaseExtended/flutterfire/tree/main/packages/cloud_functions) | ✔ | ✔ | ✔ | β | N/A |
| Cloud Functions | [![Cloud Functions pub.dev badge](https://img.shields.io/pub/v/cloud_functions.svg)](https://pub.dev/packages/cloud_functions) | [🔗](https://firebase.google.com/products/functions) | [📖](https://firebase.google.com/docs/functions/get-started?gen=2nd) | [`cloud_functions`](https://github.com/FirebaseExtended/flutterfire/tree/main/packages/cloud_functions) | ✔ | ✔ | ✔ | β | (*) |
| Cloud Messaging | [![Cloud Messaging pub.dev badge](https://img.shields.io/pub/v/firebase_messaging.svg)](https://pub.dev/packages/firebase_messaging) | [🔗](https://firebase.google.com/products/cloud-messaging) | [📖](https://firebase.google.com/docs/cloud-messaging/flutter/client) | [`firebase_messaging`](https://github.com/FirebaseExtended/flutterfire/tree/main/packages/firebase_messaging) | ✔ | ✔ | ✔ | β | N/A |
| Cloud Storage | [![Cloud Storage pub.dev badge](https://img.shields.io/pub/v/firebase_storage.svg)](https://pub.dev/packages/firebase_storage) | [🔗](https://firebase.google.com/products/storage) | [📖](https://firebase.google.com/docs/storage/flutter/start) | [`firebase_storage`](https://github.com/FirebaseExtended/flutterfire/tree/main/packages/firebase_storage) | ✔ | ✔ | ✔ | β | (*) |
| Core | [![Core pub.dev badge](https://img.shields.io/pub/v/firebase_core.svg)](https://pub.dev/packages/firebase_core) | [🔗](https://firebase.google.com) | [📖](https://firebase.google.com) | [`firebase_core`](https://github.com/FirebaseExtended/flutterfire/tree/main/packages/firebase_core) | ✔ | ✔ | ✔ | β | (*) |
Expand Down
2 changes: 2 additions & 0 deletions packages/cloud_functions/cloud_functions/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,5 @@ flutter:
pluginClass: FirebaseFunctionsPlugin
web:
default_package: cloud_functions_web
windows:
pluginClass: CloudFunctionsPluginCApi
80 changes: 80 additions & 0 deletions packages/cloud_functions/cloud_functions/windows/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# The Flutter tooling requires that developers have a version of Visual Studio
# installed that includes CMake 3.14 or later. You should not increase this
# version, as doing so will cause the plugin to fail to compile for some
# customers of the plugin.
cmake_minimum_required(VERSION 3.14)

# Project-level configuration.
set(PROJECT_NAME "cloud_functions")
project(${PROJECT_NAME} LANGUAGES CXX)

# This value is used when generating builds using this plugin, so it must
# not be changed
set(PLUGIN_NAME "cloud_functions_plugin")

# Any new source files that you add to the plugin should be added here.
list(APPEND PLUGIN_SOURCES
"cloud_functions_plugin.cpp"
"cloud_functions_plugin.h"
"messages.g.cpp"
"messages.g.h"
)

# Read version from pubspec.yaml
file(STRINGS "../pubspec.yaml" pubspec_content)
foreach(line ${pubspec_content})
string(FIND ${line} "version: " has_version)

if("${has_version}" STREQUAL "0")
string(FIND ${line} ": " version_start_pos)
math(EXPR version_start_pos "${version_start_pos} + 2")
string(LENGTH ${line} version_end_pos)
math(EXPR len "${version_end_pos} - ${version_start_pos}")
string(SUBSTRING ${line} ${version_start_pos} ${len} PLUGIN_VERSION)
break()
endif()
endforeach(line)

configure_file(plugin_version.h.in ${CMAKE_BINARY_DIR}/generated/cloud_functions/plugin_version.h)
include_directories(${CMAKE_BINARY_DIR}/generated/)

# Define the plugin library target. Its name must not be changed (see comment
# on PLUGIN_NAME above).
add_library(${PLUGIN_NAME} STATIC
"include/cloud_functions/cloud_functions_plugin_c_api.h"
"cloud_functions_plugin_c_api.cpp"
${PLUGIN_SOURCES}
${CMAKE_BINARY_DIR}/generated/cloud_functions/plugin_version.h
)

# Apply a standard set of build settings that are configured in the
# application-level CMakeLists.txt. This can be removed for plugins that want
# full control over build settings.
apply_standard_settings(${PLUGIN_NAME})

# Symbols are hidden by default to reduce the chance of accidental conflicts
# between plugins. This should not be removed; any symbols that should be
# exported should be explicitly exported with the FLUTTER_PLUGIN_EXPORT macro.
set_target_properties(${PLUGIN_NAME} PROPERTIES
CXX_VISIBILITY_PRESET hidden)
target_compile_definitions(${PLUGIN_NAME} PUBLIC FLUTTER_PLUGIN_IMPL)
# Enable firebase-cpp-sdk's platform logging api.
target_compile_definitions(${PLUGIN_NAME} PRIVATE -DINTERNAL_EXPERIMENTAL=1)
Comment thread
akshaynexus marked this conversation as resolved.

# Source include directories and library dependencies. Add any plugin-specific
# dependencies here.
set(MSVC_RUNTIME_MODE MD)
set(firebase_libs firebase_core_plugin firebase_functions)
target_link_libraries(${PLUGIN_NAME} PRIVATE "${firebase_libs}")

target_include_directories(${PLUGIN_NAME} INTERFACE
"${CMAKE_CURRENT_SOURCE_DIR}/include")
target_link_libraries(${PLUGIN_NAME} PUBLIC flutter flutter_wrapper_plugin)

# List of absolute paths to libraries that should be bundled with the plugin.
# This list could contain prebuilt libraries, or libraries created by an
# external build triggered from this build file.
set(cloud_functions_bundled_libraries
""
PARENT_SCOPE
)
Loading
Loading