Skip to content

Commit 0e4a3f8

Browse files
committed
Merge remote-tracking branch 'origin/main' into UserDefinedEnumsInternal
2 parents 2117741 + 287d962 commit 0e4a3f8

File tree

360 files changed

+12146
-16773
lines changed

Some content is hidden

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

360 files changed

+12146
-16773
lines changed

.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/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: 4 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,10 +57,6 @@ 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
@@ -76,6 +73,7 @@ jobs:
7673
run: |
7774
./gradlew ${{matrix.module}}:check withErrorProne
7875
- name: Compute upload file name
76+
if: always()
7977
run: |
8078
MODULE=${{matrix.module}}
8179
echo "ARTIFACT_NAME=${MODULE//:/_}" >> $GITHUB_ENV
@@ -92,12 +90,11 @@ jobs:
9290
# to be used as a required check for merging.
9391
check_all:
9492
runs-on: ubuntu-22.04
95-
if: always()
9693
name: Unit Tests (matrix)
9794
needs: unit_tests
95+
if: ${{ failure() }}
9896
steps:
99-
- name: Check test matrix
100-
if: needs.unit_tests.result != 'success'
97+
- name: Check test matrix results
10198
run: exit 1
10299

103100

.github/workflows/dataconnect.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ env:
3434
FDC_JAVA_VERSION: ${{ inputs.javaVersion || '17' }}
3535
FDC_ANDROID_EMULATOR_API_LEVEL: ${{ inputs.androidEmulatorApiLevel || '34' }}
3636
FDC_NODEJS_VERSION: ${{ inputs.nodeJsVersion || '20' }}
37-
FDC_FIREBASE_TOOLS_VERSION: ${{ inputs.firebaseToolsVersion || '14.11.0' }}
37+
FDC_FIREBASE_TOOLS_VERSION: ${{ inputs.firebaseToolsVersion || '14.15.1' }}
3838
FDC_FIREBASE_TOOLS_DIR: /tmp/firebase-tools
3939
FDC_FIREBASE_COMMAND: /tmp/firebase-tools/node_modules/.bin/firebase
4040
FDC_PYTHON_VERSION: ${{ inputs.pythonVersion || '3.13' }}
@@ -271,6 +271,17 @@ jobs:
271271
with:
272272
args: -color /github/workspace/.github/workflows/dataconnect.yml
273273

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

.github/workflows/dataconnect_demo_app.yml

Lines changed: 1 addition & 1 deletion
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.11.0' }}
21+
FDC_FIREBASE_TOOLS_VERSION: ${{ inputs.firebaseToolsVersion || '14.15.1' }}
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

.github/workflows/metalava-semver-check.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@ jobs:
1111
permissions:
1212
pull-requests: write
1313
steps:
14-
- name: Checkout PR
14+
- name: Checkout main
1515
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
16+
with:
17+
ref: ${{ github.base_ref }}
1618

1719
- name: Set up JDK 17
1820
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
@@ -21,13 +23,13 @@ jobs:
2123
distribution: temurin
2224
cache: gradle
2325

24-
- name: Copy new api.txt files
26+
- name: Copy existing api.txt files
2527
run: ./gradlew copyApiTxtFile
2628

27-
- name: Checkout main
29+
- name: Checkout PR
2830
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2931
with:
30-
ref: ${{ github.base_ref }}
32+
ref: ${{ github.head_ref || github.ref_name }}
3133
clean: false
3234

3335
- name: Run Metalava SemVer check

CONTRIBUTING.md

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,24 @@
11
# How to Contribute
22

3-
We'd love to accept your patches and contributions to this project. There are
4-
just a few small guidelines you need to follow.
3+
We'd love to accept your patches and contributions to this project. There are just a few small
4+
guidelines you need to follow.
55

66
## Contributor License Agreement
77

8-
Contributions to this project must be accompanied by a Contributor License
9-
Agreement. You (or your employer) retain the copyright to your contribution;
10-
this simply gives us permission to use and redistribute your contributions as
11-
part of the project. Head over to <https://cla.developers.google.com/> to see
12-
your current agreements on file or to sign a new one.
8+
Contributions to this project must be accompanied by a Contributor License Agreement. You (or your
9+
employer) retain the copyright to your contribution; this simply gives us permission to use and
10+
redistribute your contributions as part of the project. Head over to
11+
<https://cla.developers.google.com/> to see your current agreements on file or to sign a new one.
1312

14-
You generally only need to submit a CLA once, so if you've already submitted one
15-
(even if it was for a different project), you probably don't need to do it
16-
again.
13+
You generally only need to submit a CLA once, so if you've already submitted one (even if it was for
14+
a different project), you probably don't need to do it again.
1715

1816
## Code reviews
1917

20-
All submissions, including submissions by project members, require review. We
21-
use GitHub pull requests for this purpose. Consult
22-
[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more
23-
information on using pull requests.
18+
All submissions, including submissions by project members, require review. We use GitHub pull
19+
requests for this purpose. Consult
20+
[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more information on using
21+
pull requests.
2422

2523
## Community Guidelines
2624

@@ -29,5 +27,6 @@ This project follows
2927

3028
## Contributor Documentation
3129

32-
To know more about how to setup your environment, how Firebase internals work, and
33-
best practices, take a look at our detailed [contributor documentation](https://firebase.github.io/firebase-android-sdk/).
30+
To know more about how to setup your environment, how Firebase internals work, and best practices,
31+
take a look at our detailed
32+
[contributor documentation](https://firebase.github.io/firebase-android-sdk/).

0 commit comments

Comments
 (0)