Skip to content

Commit 088cafe

Browse files
Merge branch 'main' into feature-1818
2 parents 432e501 + 76990d9 commit 088cafe

File tree

245 files changed

+8785
-5345
lines changed

Some content is hidden

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

245 files changed

+8785
-5345
lines changed

.github/workflows/ci_tests.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,18 +56,9 @@ jobs:
5656
distribution: temurin
5757
cache: gradle
5858

59-
- name: Pull genai-common
60-
if: matrix.module == ':firebase-vertexai'
61-
run: |
62-
git clone https://github.com/google-gemini/generative-ai-android.git
63-
cd generative-ai-android
64-
./gradlew :common:updateVersion common:publishToMavenLocal
65-
cd ..
66-
6759
- name: Clone mock responses
6860
if: matrix.module == ':firebase-vertexai'
69-
run: |
70-
firebase-vertexai/update_responses.sh
61+
run: firebase-vertexai/update_responses.sh
7162

7263
- name: Add google-services.json
7364
env:

.github/workflows/create_releases.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ on:
1515
jobs:
1616
create-branches:
1717
runs-on: ubuntu-latest
18+
permissions:
19+
contents: write
20+
pull-requests: write
1821
env:
1922
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2023
steps:
@@ -25,6 +28,9 @@ jobs:
2528

2629
create-pull-request:
2730
runs-on: ubuntu-latest
31+
permissions:
32+
contents: write
33+
pull-requests: write
2834
steps:
2935
- uses: actions/[email protected]
3036
with:
@@ -40,7 +46,7 @@ jobs:
4046
./gradlew generateReleaseConfig -PcurrentRelease=${{ inputs.name }} -PpastRelease=${{ inputs.past-name }} -PprintOutput=true
4147
4248
- name: Create Pull Request
43-
uses: peter-evans/create-pull-request@v4
49+
uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f
4450
with:
4551
base: 'releases/${{ inputs.name }}'
4652
branch: 'releases/${{ inputs.name }}.release'

.github/workflows/dataconnect.yml

Lines changed: 47 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -73,27 +73,35 @@ jobs:
7373
npm install --fund=false --audit=false --save --save-exact firebase-tools@${{ env.FDC_FIREBASE_TOOLS_VERSION }}
7474
7575
- name: Restore Gradle cache
76+
id: restore-gradle-cache
7677
uses: actions/cache/restore@v4
7778
if: github.event_name != 'schedule'
7879
with:
7980
path: |
8081
~/.gradle/caches
8182
~/.gradle/wrapper
82-
key: gradle-cache-jqnvfzw6w7
83+
key: gradle-cache-jqnvfzw6w7-${{ github.run_id }}
84+
restore-keys: |
85+
gradle-cache-jqnvfzw6w7-
8386
8487
- name: tool versions
8588
continue-on-error: true
8689
run: |
87-
set +e -v
88-
uname -a
89-
which java
90-
java -version
91-
which javac
92-
javac -version
93-
which node
94-
node --version
95-
${{ env.FDC_FIREBASE_COMMAND }} --version
96-
./gradlew --version
90+
function run_cmd {
91+
echo "==============================================================================="
92+
echo "Running Command: $*"
93+
("$@" 2>&1) || echo "WARNING: command failed with non-zero exit code $?: $*"
94+
}
95+
96+
run_cmd uname -a
97+
run_cmd which java
98+
run_cmd java -version
99+
run_cmd which javac
100+
run_cmd javac -version
101+
run_cmd which node
102+
run_cmd node --version
103+
run_cmd ${{ env.FDC_FIREBASE_COMMAND }} --version
104+
run_cmd ./gradlew --version
97105
98106
- name: Gradle assembleDebugAndroidTest
99107
run: |
@@ -116,7 +124,7 @@ jobs:
116124
path: |
117125
~/.gradle/caches
118126
~/.gradle/wrapper
119-
key: gradle-cache-jqnvfzw6w7
127+
key: ${{ steps.restore-gradle-cache.outputs.cache-primary-key }}
120128

121129
- name: Enable KVM group permissions for Android Emulator
122130
run: |
@@ -128,24 +136,24 @@ jobs:
128136
- name: Restore AVD cache
129137
uses: actions/cache/restore@v4
130138
if: github.event_name != 'schedule'
131-
id: avd-cache
139+
id: restore-avd-cache
132140
with:
133141
path: |
134142
~/.android/avd/*
135143
~/.android/adb*
136-
key: avd-cache-zhdsn586je-api${{ env.FDC_ANDROID_EMULATOR_API_LEVEL }}
137-
138-
- run: echo "github.event_name == '${{ github.event_name }}' steps.avd-cache.outputs.cache-hit == '${{ steps.avd-cache.outputs.cache-hit }}'"
144+
key: avd-cache-zhdsn586je-api${{ env.FDC_ANDROID_EMULATOR_API_LEVEL }}-${{ github.run_id }}
145+
restore-keys: |
146+
avd-cache-zhdsn586je-api${{ env.FDC_ANDROID_EMULATOR_API_LEVEL }}-
139147
140148
- name: Create AVD
141-
if: github.event_name == 'schedule' || steps.avd-cache.outputs.cache-hit != 'true'
149+
if: github.event_name == 'schedule' || steps.restore-avd-cache.outputs.cache-hit != 'true'
142150
uses: reactivecircus/android-emulator-runner@v2
143151
with:
144152
api-level: ${{ env.FDC_ANDROID_EMULATOR_API_LEVEL }}
145153
arch: x86_64
146154
force-avd-creation: false
147155
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
148-
disable-animations: false
156+
disable-animations: true
149157
script: echo "Generated AVD snapshot for caching."
150158

151159
- name: Save AVD cache
@@ -155,7 +163,7 @@ jobs:
155163
path: |
156164
~/.android/avd/*
157165
~/.android/adb*
158-
key: avd-cache-zhdsn586je-api${{ env.FDC_ANDROID_EMULATOR_API_LEVEL }}
166+
key: ${{ steps.restore-avd-cache.outputs.cache-primary-key }}
159167

160168
- name: Data Connect Emulator
161169
run: |
@@ -174,8 +182,16 @@ jobs:
174182
cd firebase-dataconnect/emulator
175183
${{ env.FDC_FIREBASE_COMMAND }} emulators:start --only=auth >firebase.emulator.auth.log 2>&1 &
176184
185+
- name: Capture Logcat Logs
186+
run: adb logcat >logcat.log &
187+
177188
- name: Gradle connectedCheck
189+
id: connectedCheck
178190
uses: reactivecircus/android-emulator-runner@v2
191+
# Allow this GitHub Actions "job" to continue even if the tests fail so that logs from a
192+
# failed test run get uploaded as "artifacts" and are available to investigate failed runs.
193+
# A later step in this "job" will fail the job if this step fails
194+
continue-on-error: true
179195
with:
180196
api-level: ${{ env.FDC_ANDROID_EMULATOR_API_LEVEL }}
181197
arch: x86_64
@@ -185,21 +201,28 @@ jobs:
185201
script: |
186202
set -eux && ./gradlew ${{ (inputs.gradleInfoLog && '--info') || '' }} :firebase-dataconnect:connectedCheck :firebase-dataconnect:connectors:connectedCheck
187203
188-
- uses: actions/upload-artifact@v4
189-
if: true
204+
- name: Upload log file artifacts
205+
uses: actions/upload-artifact@v4
190206
with:
191-
name: logs
207+
name: integration_test_logs
192208
path: "**/*.log"
193209
if-no-files-found: warn
194210
compression-level: 9
195211

196-
- uses: actions/upload-artifact@v4
212+
- name: Upload Gradle build report artifacts
213+
uses: actions/upload-artifact@v4
197214
with:
198-
name: gradle_build_reports
215+
name: integration_test_gradle_build_reports
199216
path: firebase-dataconnect/**/build/reports/
200217
if-no-files-found: warn
201218
compression-level: 9
202219

220+
- name: Verify "Gradle connectedCheck" step was successful
221+
if: steps.connectedCheck.outcome != 'success'
222+
run: |
223+
echo 'Failing because the outcome of the "Gradle connectedCheck" step ("${{ steps.connectedCheck.outcome }}") was not successful'
224+
exit 1
225+
203226
# Check this yml file with "actionlint": https://github.com/rhysd/actionlint
204227
# To run actionlint yourself, run `brew install actionlint` followed by
205228
# `actionlint .github/workflows/dataconnect.yml`

.github/workflows/dataconnect_demo_app.yml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,20 @@ jobs:
8989
- name: tool versions
9090
continue-on-error: true
9191
run: |
92-
set +e -v
93-
which java
94-
java -version
95-
which javac
96-
javac -version
97-
which node
98-
node --version
99-
${{ env.FDC_FIREBASE_COMMAND }} --version
100-
./gradlew --version
92+
function run_cmd {
93+
echo "==============================================================================="
94+
echo "Running Command: $*"
95+
("$@" 2>&1) || echo "WARNING: command failed with non-zero exit code $?: $*"
96+
}
97+
98+
run_cmd which java
99+
run_cmd java -version
100+
run_cmd which javac
101+
run_cmd javac -version
102+
run_cmd which node
103+
run_cmd node --version
104+
run_cmd ${{ env.FDC_FIREBASE_COMMAND }} --version
105+
run_cmd ./gradlew --version
101106
102107
- name: ./gradlew assemble test
103108
run: |

.github/workflows/make-bom.yml

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ jobs:
1111
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3
1212
with:
1313
python-version: '3.10'
14+
1415
- uses: actions/[email protected]
16+
1517
- name: Set up JDK 17
1618
uses: actions/[email protected]
1719
with:
@@ -21,19 +23,25 @@ jobs:
2123

2224
- name: Build
2325
run: |
24-
./ci/run.sh \
25-
--artifact-target-dir=./logs/artifacts \
26-
--artifact-patterns=bom.zip \
27-
--artifact-patterns=bomReleaseNotes.md \
28-
--artifact-patterns=recipeVersionUpdate.txt \
29-
gradle \
30-
-- \
31-
--build-cache \
32-
buildBomZip
33-
34-
- name: Upload generated artifacts
26+
./gradlew buildBomBundleZip
27+
28+
- name: Upload bom
29+
uses: actions/[email protected]
30+
with:
31+
name: bom
32+
path: build/bom/
33+
retention-days: 15
34+
35+
- name: Upload release notes
36+
uses: actions/[email protected]
37+
with:
38+
name: bom_release_notes
39+
path: build/bomReleaseNotes.md
40+
retention-days: 15
41+
42+
- name: Upload recipe version update
3543
uses: actions/[email protected]
3644
with:
37-
name: artifacts
38-
path: ./logs/artifacts/
39-
retention-days: 5
45+
name: recipe_version
46+
path: build/recipeVersionUpdate.txt
47+
retention-days: 15
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Metalava SemVer Check
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
semver-check:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
pull-requests: write
11+
steps:
12+
- name: Checkout main
13+
uses: actions/[email protected]
14+
with:
15+
ref: ${{ github.base_ref }}
16+
17+
- name: Set up JDK 17
18+
uses: actions/[email protected]
19+
with:
20+
java-version: 17
21+
distribution: temurin
22+
cache: gradle
23+
24+
- name: Copy previous api.txt files
25+
run: ./gradlew copyApiTxtFile
26+
27+
- name: Checkout PR
28+
uses: actions/[email protected]
29+
with:
30+
ref: ${{ github.head_ref }}
31+
clean: false
32+
33+
- name: Run Metalava SemVer check
34+
run: ./gradlew metalavaSemver

appcheck/firebase-appcheck-debug-testing/api.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
// Signature format: 2.0
1+
// Signature format: 3.0
22
package com.google.firebase.appcheck.debug.testing {
33

44
public final class DebugAppCheckTestHelper {
5-
method @NonNull public static com.google.firebase.appcheck.debug.testing.DebugAppCheckTestHelper fromInstrumentationArgs();
6-
method public <E extends java.lang.Throwable> void withDebugProvider(@NonNull com.google.firebase.appcheck.debug.testing.DebugAppCheckTestHelper.MaybeThrowingRunnable<E>) throws E;
7-
method public <E extends java.lang.Throwable> void withDebugProvider(@NonNull com.google.firebase.FirebaseApp, @NonNull com.google.firebase.appcheck.debug.testing.DebugAppCheckTestHelper.MaybeThrowingRunnable<E>) throws E;
5+
method public static com.google.firebase.appcheck.debug.testing.DebugAppCheckTestHelper fromInstrumentationArgs();
6+
method public <E extends java.lang.Throwable> void withDebugProvider(com.google.firebase.appcheck.debug.testing.DebugAppCheckTestHelper.MaybeThrowingRunnable<E!>) throws E;
7+
method public <E extends java.lang.Throwable> void withDebugProvider(com.google.firebase.FirebaseApp, com.google.firebase.appcheck.debug.testing.DebugAppCheckTestHelper.MaybeThrowingRunnable<E!>) throws E;
88
}
99

1010
public static interface DebugAppCheckTestHelper.MaybeThrowingRunnable<E extends java.lang.Throwable> {

appcheck/firebase-appcheck-debug/api.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
// Signature format: 2.0
1+
// Signature format: 3.0
22
package com.google.firebase.appcheck.debug {
33

44
public class DebugAppCheckProviderFactory implements com.google.firebase.appcheck.AppCheckProviderFactory {
5-
method @NonNull public com.google.firebase.appcheck.AppCheckProvider create(@NonNull com.google.firebase.FirebaseApp);
6-
method @NonNull public static com.google.firebase.appcheck.debug.DebugAppCheckProviderFactory getInstance();
5+
method public com.google.firebase.appcheck.AppCheckProvider create(com.google.firebase.FirebaseApp);
6+
method public static com.google.firebase.appcheck.debug.DebugAppCheckProviderFactory getInstance();
77
}
88

99
}

appcheck/firebase-appcheck-interop/api.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
// Signature format: 2.0
1+
// Signature format: 3.0
22
package com.google.firebase.appcheck {
33

44
public abstract class AppCheckTokenResult {
55
ctor public AppCheckTokenResult();
6-
method @Nullable public abstract Exception getError();
7-
method @NonNull public abstract String getToken();
6+
method public abstract Exception? getError();
7+
method public abstract String getToken();
88
}
99

1010
}
1111

1212
package com.google.firebase.appcheck.interop {
1313

1414
public interface AppCheckTokenListener {
15-
method public void onAppCheckTokenChanged(@NonNull com.google.firebase.appcheck.AppCheckTokenResult);
15+
method public void onAppCheckTokenChanged(com.google.firebase.appcheck.AppCheckTokenResult);
1616
}
1717

1818
}

appcheck/firebase-appcheck-playintegrity/api.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
// Signature format: 2.0
1+
// Signature format: 3.0
22
package com.google.firebase.appcheck.playintegrity {
33

44
public class PlayIntegrityAppCheckProviderFactory implements com.google.firebase.appcheck.AppCheckProviderFactory {
55
ctor public PlayIntegrityAppCheckProviderFactory();
6-
method @NonNull public com.google.firebase.appcheck.AppCheckProvider create(@NonNull com.google.firebase.FirebaseApp);
7-
method @NonNull public static com.google.firebase.appcheck.playintegrity.PlayIntegrityAppCheckProviderFactory getInstance();
6+
method public com.google.firebase.appcheck.AppCheckProvider create(com.google.firebase.FirebaseApp);
7+
method public static com.google.firebase.appcheck.playintegrity.PlayIntegrityAppCheckProviderFactory getInstance();
88
}
99

1010
}

0 commit comments

Comments
 (0)