Skip to content

Commit 890f29b

Browse files
committed
Merge branch 'main' into java-record
# Conflicts: # build.gradle # buildSrc/build.gradle.kts # firebase-config/bandwagoner/bandwagoner.gradle # firebase-dynamic-links/firebase-dynamic-links.gradle # firebase-firestore/gradle.properties # firebase-firestore/ktx/ktx.gradle # firebase-firestore/src/main/java/com/google/firebase/firestore/util/CustomClassMapper.java # firebase-perf/dev-app/dev-app.gradle # firebase-perf/e2e-app/e2e-app.gradle # gradle.properties # gradle/libs.versions.toml # gradle/wrapper/gradle-wrapper.properties # plugins/src/main/java/com/google/firebase/gradle/plugins/Metalava.kt # subprojects.cfg
2 parents 9321083 + 1654b31 commit 890f29b

File tree

1,936 files changed

+132640
-39836
lines changed

Some content is hidden

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

1,936 files changed

+132640
-39836
lines changed

.gemini/config.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
have_fun: false
2+
code_review:
3+
disable: false
4+
comment_severity_threshold: LOW
5+
max_review_comments: -1
6+
pull_request_opened:
7+
help: true
8+
summary: false
9+
code_review: true

.github/ISSUE_TEMPLATE/bug.md

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,37 +3,35 @@ name: ⚠️ Report a Bug
33
about: Think you found a bug in the SDK? Report it here.
44
---
55

6-
<!-- DO NOT DELETE
6+
<!-- DO NOT DELETE
77
validate_template=true
88
template_path=.github/ISSUE_TEMPLATE/bug.md
99
-->
1010

1111
### [READ] Step 1: Are you in the right place?
1212

13-
Issues filed here should be about bugs in __the code in this repository__.
14-
If you have a general question, need help debugging, or fall into some
15-
other category use one of these other channels:
13+
Issues filed here should be about bugs in **the code in this repository**. If you have a general
14+
question, need help debugging, or fall into some other category use one of these other channels:
1615

17-
* For general technical questions, post a question on [StackOverflow](http://stackoverflow.com/)
18-
with the firebase tag.
19-
* For general Firebase discussion, use the [firebase-talk](https://groups.google.com/forum/#!forum/firebase-talk)
20-
google group.
21-
* For help troubleshooting your application that does not fall under one
22-
of the above categories, reach out to the personalized
23-
[Firebase support channel](https://firebase.google.com/support/).
16+
- For general technical questions, post a question on [StackOverflow](http://stackoverflow.com/)
17+
with the firebase tag.
18+
- For general Firebase discussion, use the
19+
[firebase-talk](https://groups.google.com/forum/#!forum/firebase-talk) google group.
20+
- For help troubleshooting your application that does not fall under one of the above categories,
21+
reach out to the personalized [Firebase support channel](https://firebase.google.com/support/).
2422

2523
### [REQUIRED] Step 2: Describe your environment
2624

27-
* Android Studio version: _____
28-
* Firebase Component: _____ (Database, Firestore, Storage, Functions, etc)
29-
* Component version: _____
25+
- Android Studio version: **\_**
26+
- Firebase Component: **\_** (Database, Firestore, Storage, Functions, etc)
27+
- Component version: **\_**
3028

3129
### [REQUIRED] Step 3: Describe the problem
3230

3331
#### Steps to reproduce:
3432

35-
What happened? How can we make the problem occur?
36-
This could be a description, log/console output, etc.
33+
What happened? How can we make the problem occur? This could be a description, log/console output,
34+
etc.
3735

3836
#### Relevant Code:
3937

.github/ISSUE_TEMPLATE/fr.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: 💡 Feature Request
33
about: Have a feature you'd like to see in the Android SDK? Request it here.
44
---
55

6-
<!-- DO NOT DELETE
6+
<!-- DO NOT DELETE
77
validate_template=false
88
template_path=.github/ISSUE_TEMPLATE/fr.md
99
-->
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Data Connect Workflow Notifications
2+
description: Notify a GitHub Issue with the results of a workflow.
3+
4+
inputs:
5+
python-version:
6+
required: true
7+
default: "3.13"
8+
github-issue-for-scheduled-runs:
9+
required: true
10+
job-results-file:
11+
required: true
12+
13+
runs:
14+
using: "composite"
15+
steps:
16+
- uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
17+
with:
18+
python-version: ${{ inputs.python-version }}
19+
20+
- run: pip install -r requirements.txt
21+
shell: bash
22+
working-directory: firebase-dataconnect/ci
23+
24+
- id: issue-id
25+
name: Determine GitHub Issue For Commenting
26+
working-directory: firebase-dataconnect/ci
27+
shell: bash
28+
run: |
29+
args=(
30+
python
31+
calculate_github_issue_for_commenting.py
32+
--issue-output-file=github_issue_number.txt
33+
--github-repository='${{ github.repository }}'
34+
--github-ref='${{ github.ref }}'
35+
--github-event-name='${{ github.event_name }}'
36+
--pr-body-github-issue-key=trksmnkncd_notification_issue
37+
--github-issue-for-scheduled-run='${{ inputs.github-issue-for-scheduled-runs }}'
38+
)
39+
echo "${args[*]}"
40+
"${args[@]}"
41+
42+
set -xv
43+
issue="$(cat github_issue_number.txt)"
44+
echo "issue=$issue" >> "$GITHUB_OUTPUT"
45+
46+
- name: Post Comment on GitHub Issue
47+
if: steps.issue-id.outputs.issue != ''
48+
working-directory: firebase-dataconnect/ci
49+
shell: bash
50+
run: |
51+
args=(
52+
python
53+
post_comment_for_job_results.py
54+
--github-issue='${{ steps.issue-id.outputs.issue }}'
55+
--github-workflow='${{ github.workflow }}'
56+
--github-repository='${{ github.repository }}'
57+
--github-ref='${{ github.ref }}'
58+
--github-event-name='${{ github.event_name }}'
59+
--github-sha='${{ github.sha }}'
60+
--github-repository-html-url='${{ github.event.repository.html_url }}'
61+
--github-run-id='${{ github.run_id }}'
62+
--github-run-number='${{ github.run_number }}'
63+
--github-run-attempt='${{ github.run_attempt }}'
64+
)
65+
66+
while read -r line; do
67+
args=("${args[@]}" "$line")
68+
done <'${{ inputs.job-results-file }}'
69+
70+
echo "${args[*]}"
71+
exec "${args[@]}"
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Firebase AI Daily Tests
2+
3+
on:
4+
schedule:
5+
- cron: 2 7 * * * # Runs automatically once a day
6+
workflow_dispatch: # Allow triggering the workflow manually
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
dailies:
13+
name: "Daily Tests"
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
18+
with:
19+
submodules: true
20+
21+
- name: Enable KVM
22+
run: |
23+
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
24+
sudo udevadm control --reload-rules
25+
sudo udevadm trigger --name-match=kvm
26+
27+
- name: Set up JDK 17
28+
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
29+
with:
30+
java-version: 17
31+
distribution: temurin
32+
cache: gradle
33+
34+
- name: Add google-services.json
35+
env:
36+
INTEG_TESTS_GOOGLE_SERVICES: ${{ secrets.INTEG_TESTS_GOOGLE_SERVICES }}
37+
run: |
38+
echo $INTEG_TESTS_GOOGLE_SERVICES | base64 -d > google-services.json
39+
- uses: google-github-actions/auth@71f986410dfbc7added4569d411d040a91dc6935 # v2.1.8
40+
with:
41+
credentials_json: ${{ secrets.GCP_SERVICE_ACCOUNT }}
42+
43+
- uses: google-github-actions/setup-gcloud@77e7a554d41e2ee56fc945c52dfd3f33d12def9a # v2.1.4
44+
45+
- name: Run tests
46+
uses: reactivecircus/android-emulator-runner@62dbb605bba737720e10b196cb4220d374026a6d #v2.33.0
47+
env:
48+
FIREBASE_CI: 1
49+
FTL_RESULTS_BUCKET: android-ci
50+
FTL_RESULTS_DIR: ${{ format('logs/{0}/{1}_{2}/artifacts/', github.workflow, github.run_id, github.run_attempt) }}
51+
FIREBASE_APP_CHECK_DEBUG_SECRET: ${{ secrets.FIREBASE_APP_CHECK_DEBUG_SECRET }}
52+
with:
53+
api-level: 34
54+
arch: x86_64
55+
ram-size: 4096M
56+
heap-size: 4096M
57+
script: |
58+
adb logcat -v time > logcat.txt &
59+
./gradlew firebase-ai:connectedCheck withErrorProne -PtargetBackend="prod"
60+
61+
- name: Upload logs
62+
if: failure()
63+
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
64+
with:
65+
name: logcat.txt
66+
path: logcat.txt
67+
retention-days: 7
68+
if-no-files-found: ignore

.github/workflows/api-information.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@ jobs:
77
if: github.event.pull_request.head.repo.full_name == github.repository
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v3.5.3
10+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1111
with:
1212
fetch-depth: 2
1313
submodules: true
14-
- name: Set up JDK 11
15-
uses: actions/setup-java@v3
14+
- name: Set up JDK 17
15+
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
1616
with:
17-
java-version: 11
17+
java-version: 17
1818
distribution: temurin
1919
cache: gradle
2020
- name: Set up Python 3.10
21-
uses: actions/setup-python@v4
21+
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
2222
with:
2323
python-version: '3.10'
2424
- name: Set up fireci

.github/workflows/build-release-artifacts.yml

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,40 @@ on:
88

99
jobs:
1010
build-artifacts:
11-
# TODO(b/271315039) - Revert back to ubuntu when fixed
12-
runs-on: macos-latest
11+
runs-on: ubuntu-latest
1312
env:
1413
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1514
steps:
16-
- uses: actions/checkout@v3.5.3
15+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1716

18-
- name: Set up JDK 11
19-
uses: actions/setup-java@v3
17+
- name: Set up JDK 17
18+
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
2019
with:
21-
java-version: 11
20+
java-version: 17
2221
distribution: temurin
2322
cache: gradle
2423

2524
- name: Perform gradle build
2625
run: |
2726
./gradlew firebasePublish
2827
29-
- name: Upload generated artifacts
30-
uses: actions/upload-artifact@v2
28+
- name: Upload m2 repo
29+
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
3130
with:
32-
name: release_artifacts
33-
path: build/*.zip
31+
name: m2repository
32+
path: build/m2repository/
33+
retention-days: 15
34+
35+
- name: Upload release notes
36+
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
37+
with:
38+
name: release_notes
39+
path: build/release-notes/
40+
retention-days: 15
41+
42+
- name: Upload kotlindocs
43+
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
44+
with:
45+
name: kotlindocs
46+
path: build/firebase-kotlindoc/
3447
retention-days: 15

.github/workflows/build-src-check.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

.github/workflows/changelog.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Changelog
1+
name: Verify changelog update
22

33
on:
44
pull_request
@@ -13,11 +13,11 @@ jobs:
1313
env:
1414
BUNDLE_GEMFILE: ./ci/danger/Gemfile
1515
steps:
16-
- uses: actions/checkout@v3.5.3
16+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1717
with:
1818
fetch-depth: 100
1919
submodules: true
20-
- uses: ruby/setup-ruby@v1
20+
- uses: ruby/setup-ruby@1a615958ad9d422dd932dc1d5823942ee002799f # v1.227.0
2121
with:
2222
ruby-version: '2.7'
2323
- name: Setup Bundler
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Check Firebase AI Responses
2+
3+
on: pull_request
4+
5+
jobs:
6+
check-version:
7+
runs-on: ubuntu-latest
8+
permissions:
9+
pull-requests: write
10+
steps:
11+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
12+
- name: Clone mock responses
13+
run: firebase-ai/update_responses.sh
14+
- name: Find cloned and latest versions
15+
run: |
16+
CLONED=$(git describe --tags)
17+
LATEST=$(git tag --sort=v:refname | tail -n1)
18+
echo "cloned_tag=$CLONED" >> $GITHUB_ENV
19+
echo "latest_tag=$LATEST" >> $GITHUB_ENV
20+
working-directory: firebase-ai/src/test/resources/vertexai-sdk-test-data
21+
- name: Find comment from previous run if exists
22+
uses: peter-evans/find-comment@3eae4d37986fb5a8592848f6a574fdf654e61f9e # v3.1.0
23+
id: fc
24+
with:
25+
issue-number: ${{github.event.number}}
26+
body-includes: Firebase AI Mock Responses Check
27+
- name: Comment on PR if newer version is available
28+
if: ${{env.cloned_tag != env.latest_tag && !steps.fc.outputs.comment-id}}
29+
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
30+
with:
31+
issue-number: ${{github.event.number}}
32+
body: >
33+
### Firebase AI Mock Responses Check :warning:
34+
35+
A newer major version of the mock responses for Firebase AI unit tests is available.
36+
[update_responses.sh](https://github.com/firebase/firebase-android-sdk/blob/main/firebase-ai/update_responses.sh)
37+
should be updated to clone the latest version of the responses: `${{env.latest_tag}}`
38+
- name: Delete comment when version gets updated
39+
if: ${{env.cloned_tag == env.latest_tag && steps.fc.outputs.comment-id}}
40+
uses: detomarco/delete-comment@dd37d1026c669ebfb0ffa5d23890010759ff05d5 # v1.1.0
41+
with:
42+
comment-id: ${{ steps.fc.outputs.comment-id }}

0 commit comments

Comments
 (0)