Skip to content

Update AGENTS.md #1748

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 26, 2025
Merged
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
30 changes: 21 additions & 9 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,23 @@ instructions for your specific platform.
* **CMake**: Version 3.7 or newer.
* **Python**: Version 3.7 or newer.
* **Abseil-py**: Python package.
* **OpenSSL**: Required for Realtime Database and Cloud Firestore (especially
for desktop builds).
* **OpenSSL**: Required for desktop builds, unless you build with the
`-DFIREBASE_USE_BORINGSSL=YES` cmake flag.
* **libsecret-1-dev**: (Linux Desktop) Required for secure credential storage.
Install using `sudo apt-get install libsecret-1-dev`.
* **Android SDK & NDK**: Required for building Android libraries. `sdkmanager`
can be used for installation. CMake for Android (version 3.10.2
recommended) is also needed.
* **(Windows Only) Strings**: From Microsoft Sysinternals, required for
Android builds on Windows.
* **Cocoapods**: Required for building iOS or tvOS libraries.

To build for Desktop, you can install prerequisites by running the following
script in the root of the repository: `scripts/gha/install_prereqs_desktop.py`

To build for Android, you can install prerequisites by running the following
script in the root of the repository: `build_scripts/android/install_prereqs.sh`

## Building the SDK

The SDK uses CMake for C++ compilation and Gradle for Android-specific parts.
Expand All @@ -50,15 +58,16 @@ The SDK uses CMake for C++ compilation and Gradle for Android-specific parts.

1. Create a build directory (e.g., `mkdir desktop_build && cd desktop_build`).
2. Run CMake to configure: `cmake ..`
* For iOS:
`cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/ios.cmake ..`
Note: iOS setup typically requires both including Firebase pods (via
`Podfile`) and linking the `.framework` files from the C++ SDK
distribution.
* For tvOS:
`cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/apple.toolchain.cmake -DPLATFORM=TVOS ..`
* For Desktop: Run as is. You can use BORINGSSL instead of OpenSSL (for fewer
system dependencies with the `-DFIREBASE_USE_BORINGSSL=YES` parameter.
* For iOS, include the `-DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/ios.cmake`
parameter. This requires running on a Mac build machine.
3. Build specific targets: `cmake --build . --target firebase_analytics`
(replace `firebase_analytics` with the desired library).
Or omit the entire `--target` parameter to build all targets.

You can also use the `scripts/gha/build_desktop.py` script to build the full
desktop SDK.

Refer to `README.md` for details on CMake generators and providing custom
third-party dependency locations.
Expand All @@ -76,6 +85,9 @@ This command should be run from the root of the repository. Proguard files are
generated in each library's build directory (e.g.,
`analytics/build/analytics.pro`).

You can build the entire SDK for Android by running `./gradlew build` or
`build_scripts/android/build.sh`.

### Desktop Platform Setup Details

When setting up for desktop, if you are using an iOS
Expand Down
Loading