Skip to content

Commit 31cbcff

Browse files
authored
Merge deb4b2b into a62c01a
2 parents a62c01a + deb4b2b commit 31cbcff

File tree

909 files changed

+25190
-38966
lines changed

Some content is hidden

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

909 files changed

+25190
-38966
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: 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/changelog.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ jobs:
1717
with:
1818
fetch-depth: 100
1919
submodules: true
20-
- uses: ruby/setup-ruby@1a615958ad9d422dd932dc1d5823942ee002799f # v1.227.0
20+
- uses: ruby/setup-ruby@0481980f17b760ef6bca5e8c55809102a0af1e5a # v1.263.0
2121
with:
22-
ruby-version: '2.7'
22+
ruby-version: '3.4'
2323
- name: Setup Bundler
2424
run: ./ci/danger/setup_bundler.sh
2525
- name: Danger CHANGELOG verifier

.github/workflows/check_format.yml

Lines changed: 2 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -9,44 +9,13 @@ on:
99
- main
1010

1111
jobs:
12-
determine_changed:
13-
name: "Determine changed modules"
14-
runs-on: ubuntu-22.04
15-
if: (github.repository == 'Firebase/firebase-android-sdk' && github.event_name == 'push') || github.event_name == 'pull_request'
16-
outputs:
17-
modules: ${{ steps.changed-modules.outputs.modules }}
18-
steps:
19-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
20-
with:
21-
fetch-depth: 2
22-
submodules: true
23-
24-
- name: Set up JDK 17
25-
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
26-
with:
27-
java-version: 17
28-
distribution: temurin
29-
cache: gradle
30-
31-
- id: changed-modules
32-
run: |
33-
git diff --name-only HEAD~1 | xargs printf -- '--changed-git-paths %s\n' | xargs ./gradlew writeChangedProjects --output-file-path=modules.json
34-
echo modules=$(cat modules.json) >> $GITHUB_OUTPUT
35-
3612
check_format:
3713
name: "Check Format"
3814
runs-on: ubuntu-22.04
39-
needs:
40-
- determine_changed
41-
strategy:
42-
fail-fast: false
43-
matrix:
44-
module: ${{ fromJSON(needs.determine_changed.outputs.modules) }}
4515

4616
steps:
4717
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4818
with:
49-
fetch-depth: 2
5019
submodules: true
5120

5221
- name: Set up JDK 17
@@ -56,18 +25,5 @@ jobs:
5625
distribution: temurin
5726
cache: gradle
5827

59-
- name: ${{ matrix.module }} Check Format
60-
run: |
61-
./gradlew ${{matrix.module}}:spotlessCheck
62-
63-
# A job that fails if any job in the check_format matrix fails,
64-
# to be used as a required check for merging.
65-
check_all:
66-
runs-on: ubuntu-22.04
67-
if: always()
68-
name: Check Format (matrix)
69-
needs: check_format
70-
steps:
71-
- name: Check matrix
72-
if: needs.check_format.result != 'success'
73-
run: exit 1
28+
- name: Run Spotless
29+
run: ./gradlew ${{matrix.module}}:spotlessCheck

.github/workflows/ci_tests.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ jobs:
3838
runs-on: ubuntu-22.04
3939
needs:
4040
- determine_changed
41+
if: ${{ needs.determine_changed.outputs.modules != '[]' }}
4142
strategy:
4243
fail-fast: false
4344
matrix:
@@ -56,17 +57,14 @@ jobs:
5657
distribution: temurin
5758
cache: gradle
5859

59-
- name: Clone vertexai mock responses
60-
if: matrix.module == ':firebase-vertexai'
61-
run: firebase-vertexai/update_responses.sh
62-
6360
- name: Clone ai mock responses
6461
if: matrix.module == ':firebase-ai'
6562
run: firebase-ai/update_responses.sh
6663

6764
- name: Add google-services.json
6865
env:
6966
INTEG_TESTS_GOOGLE_SERVICES: ${{ secrets.INTEG_TESTS_GOOGLE_SERVICES }}
67+
if: env.INTEG_TESTS_GOOGLE_SERVICES != '' && env.INTEG_TESTS_GOOGLE_SERVICES != 'null'
7068
run: |
7169
echo $INTEG_TESTS_GOOGLE_SERVICES | base64 -d > google-services.json
7270
@@ -76,6 +74,7 @@ jobs:
7674
run: |
7775
./gradlew ${{matrix.module}}:check withErrorProne
7876
- name: Compute upload file name
77+
if: always()
7978
run: |
8079
MODULE=${{matrix.module}}
8180
echo "ARTIFACT_NAME=${MODULE//:/_}" >> $GITHUB_ENV
@@ -92,12 +91,11 @@ jobs:
9291
# to be used as a required check for merging.
9392
check_all:
9493
runs-on: ubuntu-22.04
95-
if: always()
9694
name: Unit Tests (matrix)
9795
needs: unit_tests
96+
if: ${{ failure() }}
9897
steps:
99-
- name: Check test matrix
100-
if: needs.unit_tests.result != 'success'
98+
- name: Check test matrix results
10199
run: exit 1
102100

103101

@@ -132,6 +130,7 @@ jobs:
132130
- name: Add google-services.json
133131
env:
134132
INTEG_TESTS_GOOGLE_SERVICES: ${{ secrets.INTEG_TESTS_GOOGLE_SERVICES }}
133+
if: env.INTEG_TESTS_GOOGLE_SERVICES != '' && env.INTEG_TESTS_GOOGLE_SERVICES != 'null'
135134
run: |
136135
echo $INTEG_TESTS_GOOGLE_SERVICES | base64 -d > google-services.json
137136
- uses: google-github-actions/auth@71f986410dfbc7added4569d411d040a91dc6935 # v2.1.8
@@ -169,5 +168,8 @@ jobs:
169168

170169
- name: Publish Test Results
171170
uses: EnricoMi/publish-unit-test-result-action@170bf24d20d201b842d7a52403b73ed297e6645b # v2.18.0
171+
if: always()
172172
with:
173173
files: "artifacts/**/*.xml"
174+
comment_mode: off
175+
compare_to_earlier_commit: false

.github/workflows/dataconnect.yml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@ on:
1313
pull_request:
1414
paths:
1515
- .github/workflows/dataconnect.yml
16+
- gradlew
17+
- build.gradle.kts
18+
- gradle.properties
19+
- gradlew.bat
20+
- settings.gradle.kts
21+
- subprojects.cfg
22+
- 'gradle/**'
23+
- 'plugins/**'
24+
- '!plugins/**/*.md'
1625
- 'firebase-dataconnect/**'
1726
- '!firebase-dataconnect/demo/**'
1827
- '!firebase-dataconnect/scripts/**'
@@ -25,7 +34,7 @@ env:
2534
FDC_JAVA_VERSION: ${{ inputs.javaVersion || '17' }}
2635
FDC_ANDROID_EMULATOR_API_LEVEL: ${{ inputs.androidEmulatorApiLevel || '34' }}
2736
FDC_NODEJS_VERSION: ${{ inputs.nodeJsVersion || '20' }}
28-
FDC_FIREBASE_TOOLS_VERSION: ${{ inputs.firebaseToolsVersion || '14.5.1' }}
37+
FDC_FIREBASE_TOOLS_VERSION: ${{ inputs.firebaseToolsVersion || '14.18.0' }}
2938
FDC_FIREBASE_TOOLS_DIR: /tmp/firebase-tools
3039
FDC_FIREBASE_COMMAND: /tmp/firebase-tools/node_modules/.bin/firebase
3140
FDC_PYTHON_VERSION: ${{ inputs.pythonVersion || '3.13' }}
@@ -125,6 +134,7 @@ jobs:
125134
126135
./gradlew \
127136
--profile \
137+
--warning-mode all \
128138
${{ (inputs.gradleInfoLog && '--info') || '' }} \
129139
:firebase-dataconnect:assembleDebugAndroidTest
130140
@@ -213,7 +223,7 @@ jobs:
213223
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
214224
disable-animations: true
215225
script: |
216-
set -eux && ./gradlew ${{ (inputs.gradleInfoLog && '--info') || '' }} :firebase-dataconnect:connectedCheck :firebase-dataconnect:connectors:connectedCheck
226+
set -eux && ./gradlew --warning-mode all ${{ (inputs.gradleInfoLog && '--info') || '' }} :firebase-dataconnect:connectedCheck :firebase-dataconnect:connectors:connectedCheck
217227
218228
- name: Upload Log Files
219229
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
@@ -262,6 +272,17 @@ jobs:
262272
with:
263273
args: -color /github/workspace/.github/workflows/dataconnect.yml
264274

275+
shellcheck:
276+
continue-on-error: false
277+
runs-on: ubuntu-latest
278+
steps:
279+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
280+
with:
281+
show-progress: false
282+
sparse-checkout: 'firebase-dataconnect/'
283+
- name: shellcheck
284+
run: find . -name '*.sh' -print0 | xargs --verbose -0 shellcheck --norc --enable=all --shell=bash
285+
265286
python-ci-unit-tests:
266287
continue-on-error: false
267288
runs-on: ubuntu-latest

.github/workflows/dataconnect_demo_app.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ on:
1818

1919
env:
2020
FDC_NODE_VERSION: ${{ inputs.nodeVersion || '20' }}
21-
FDC_FIREBASE_TOOLS_VERSION: ${{ inputs.firebaseToolsVersion || '14.5.1' }}
21+
FDC_FIREBASE_TOOLS_VERSION: ${{ inputs.firebaseToolsVersion || '14.18.0' }}
2222
FDC_JAVA_VERSION: ${{ inputs.javaVersion || '17' }}
2323
FDC_FIREBASE_TOOLS_DIR: ${{ github.workspace }}/firebase-tools
2424
FDC_FIREBASE_COMMAND: ${{ github.workspace }}/firebase-tools/node_modules/.bin/firebase
@@ -106,12 +106,21 @@ jobs:
106106
set -x
107107
firebase-dataconnect/demo/gradlew \
108108
--project-dir firebase-dataconnect/demo \
109-
--no-daemon \
110109
${{ (inputs.gradleInfoLog && '--info') || '' }} \
111110
--profile \
112-
-PdataConnect.minimalApp.firebaseCommand=${{ env.FDC_FIREBASE_COMMAND }} \
111+
--warning-mode all \
112+
-PdataConnect.demo.firebaseCommand=${{ env.FDC_FIREBASE_COMMAND }} \
113113
assemble test
114114
115+
- name: gradle dokkaGeneratePublicationHtml
116+
run: |
117+
set -x
118+
firebase-dataconnect/demo/gradlew \
119+
--warning-mode all \
120+
--project-dir firebase-dataconnect/demo \
121+
${{ (inputs.gradleInfoLog && '--info') || '' }} \
122+
dokkaGeneratePublicationHtml
123+
115124
- uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
116125
with:
117126
name: apks
@@ -126,6 +135,13 @@ jobs:
126135
if-no-files-found: warn
127136
compression-level: 9
128137

138+
- uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
139+
with:
140+
name: ktdoc
141+
path: firebase-dataconnect/demo/build/dokka/html
142+
if-no-files-found: warn
143+
compression-level: 9
144+
129145
spotlessCheck:
130146
continue-on-error: false
131147
runs-on: ubuntu-latest
@@ -162,6 +178,7 @@ jobs:
162178
run: |
163179
set -x
164180
firebase-dataconnect/demo/gradlew \
181+
--warning-mode all \
165182
--project-dir firebase-dataconnect/demo \
166183
--no-daemon \
167184
${{ (inputs.gradleInfoLog && '--info') || '' }} \

0 commit comments

Comments
 (0)