Skip to content

Commit 1b6807e

Browse files
committed
Merge remote-tracking branch 'origin/master' into tomandersen/removeOkHttp
2 parents 3f2089f + 04793bc commit 1b6807e

File tree

120 files changed

+1613
-1104
lines changed

Some content is hidden

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

120 files changed

+1613
-1104
lines changed

.github/workflows/api-information.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: API Information
2+
3+
on: [ pull_request ]
4+
5+
jobs:
6+
api-information-check:
7+
if: github.event.pull_request.head.repo.full_name == github.repository
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v3
11+
with:
12+
fetch-depth: 2
13+
submodules: true
14+
- name: Set up JDK 11
15+
uses: actions/setup-java@v2
16+
with:
17+
java-version: 11
18+
distribution: temurin
19+
cache: gradle
20+
- name: Set up NDK 21.4.7075529
21+
run: |
22+
ANDROID_ROOT=/usr/local/lib/android
23+
ANDROID_SDK_ROOT=${ANDROID_ROOT}/sdk
24+
ANDROID_NDK_ROOT=${ANDROID_SDK_ROOT}/ndk-bundle
25+
SDKMANAGER=${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager
26+
echo "y" | $SDKMANAGER "ndk;21.4.7075529"
27+
ln -sfn ${ANDROID_SDK_ROOT}/ndk/21.4.7075529 ${ANDROID_NDK_ROOT}
28+
echo "ANDROID_NDK_HOME=${ANDROID_NDK_ROOT}" >> $GITHUB_ENV
29+
- name: Set up Python 3.10
30+
uses: actions/setup-python@v4
31+
with:
32+
python-version: '3.10'
33+
- name: Set up fireci
34+
run: pip3 install -e ci/fireci
35+
- name: Run api-information check
36+
run: |
37+
fireci api_information \
38+
--issue_number=${{ github.event.pull_request.number }} \
39+
--repo_name=${{ github.repository }} \
40+
--auth_token=${{ secrets.GOOGLE_OSS_BOT_TOKEN }}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
env:
3232
FIREBASE_CI: 1
3333
run: |
34-
./gradlew -b buildSrc/build.gradle -PenablePluginTests=true check
34+
./gradlew -b buildSrc/build.gradle.kts -PenablePluginTests=true check
3535
- name: Publish Test Results
3636
uses: EnricoMi/publish-unit-test-result-action@v1
3737
with:

.github/workflows/ci_tests_experimental.yml renamed to .github/workflows/ci_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI Tests (Experimental)
1+
name: CI Tests
22
concurrency:
33
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
44
cancel-in-progress: true

.github/workflows/fireperf-e2e.yml

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
name: FirePerf E2E Tests
2+
3+
on:
4+
schedule:
5+
- cron: 4 */4 * * * # every 4 hours at 04 minutes past the hour
6+
workflow_dispatch: # allow triggering the workflow manually
7+
8+
concurrency:
9+
group: ${{ github.workflow }}
10+
11+
env:
12+
PERF_E2E_GOOGLE_SERVICES: ${{ secrets.PERF_E2E_GOOGLE_SERVICES }}
13+
FTL_RESULTS_BUCKET: fireescape
14+
15+
jobs:
16+
test:
17+
runs-on: ubuntu-latest
18+
strategy:
19+
matrix:
20+
environment: [ prod, autopush ]
21+
steps:
22+
- name: Checkout firebase-android-sdk
23+
uses: actions/checkout@v3
24+
- name: Checkout firebase-android-buildtools
25+
uses: actions/checkout@v3
26+
with:
27+
repository: FirebasePrivate/firebase-android-buildtools
28+
token: ${{ secrets.GOOGLE_OSS_BOT_TOKEN }}
29+
path: firebase-android-buildtools
30+
- name: Set up JDK 11
31+
uses: actions/setup-java@v2
32+
with:
33+
java-version: 11
34+
distribution: temurin
35+
cache: gradle
36+
- name: Set up NDK 21.4.7075529
37+
run: |
38+
ANDROID_ROOT=/usr/local/lib/android
39+
ANDROID_SDK_ROOT=${ANDROID_ROOT}/sdk
40+
ANDROID_NDK_ROOT=${ANDROID_SDK_ROOT}/ndk-bundle
41+
SDKMANAGER=${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager
42+
echo "y" | $SDKMANAGER "ndk;21.4.7075529"
43+
ln -sfn ${ANDROID_SDK_ROOT}/ndk/21.4.7075529 ${ANDROID_NDK_ROOT}
44+
echo "ANDROID_NDK_HOME=${ANDROID_NDK_ROOT}" >> $GITHUB_ENV
45+
- name: Set up Python 3.10
46+
uses: actions/setup-python@v4
47+
with:
48+
python-version: '3.10'
49+
- name: Set up fireci
50+
run: pip3 install -e ci/fireci
51+
- uses: google-github-actions/auth@v0
52+
with:
53+
credentials_json: ${{ secrets.GCP_SERVICE_ACCOUNT }}
54+
- uses: google-github-actions/setup-gcloud@v0
55+
- name: Add google-services.json
56+
run: echo $PERF_E2E_GOOGLE_SERVICES | base64 -d > google-services.json
57+
- name: Run fireperf end-to-end tests
58+
run: |
59+
fireci fireperf_e2e_test \
60+
--plugin_repo_dir=firebase-android-buildtools \
61+
--target_environment=${{ matrix.environment }}
62+
- name: Notify developers upon failures
63+
if: ${{ failure() }}
64+
uses: actions/github-script@v6
65+
with:
66+
script: |
67+
const owner = context.repo.owner;
68+
const repo = context.repo.repo;
69+
const commit = context.sha;
70+
const run = context.runId;
71+
const url = `https://github.com/${owner}/${repo}/actions/runs/${run}`;
72+
73+
const datetime = (new Date()).toLocaleString('en-US', {
74+
timeZone: 'America/Los_Angeles',
75+
dateStyle: 'medium',
76+
timeStyle: 'long',
77+
});
78+
79+
const text =
80+
`Failed on commit ${commit} at ${datetime}.
81+
82+
${url}`;
83+
84+
const { data: issues } = await github.rest.issues.listForRepo({
85+
owner: owner,
86+
repo: repo,
87+
state: 'open',
88+
labels: 'fireperf-e2e-tests'
89+
});
90+
91+
if (issues.length) {
92+
github.rest.issues.createComment({
93+
owner: owner,
94+
repo: repo,
95+
issue_number: issues[0].number,
96+
body: text,
97+
});
98+
} else {
99+
github.rest.issues.create({
100+
owner: owner,
101+
repo: repo,
102+
title: 'FirePerf E2E Test Failures',
103+
body: text,
104+
labels: ['fireperf-e2e-tests'],
105+
assignees: ['jeremyjiang-dev', 'leotianlizhan', 'raymondlam', 'visumickey']
106+
});
107+
}

.github/workflows/health-metrics.yml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: Health Metrics
2+
3+
on: [ pull_request, push ]
4+
5+
env:
6+
GITHUB_PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }}
7+
8+
jobs:
9+
coverage:
10+
name: Coverage
11+
if: (github.repository == 'Firebase/firebase-android-sdk' && github.event_name == 'push') || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
with:
16+
fetch-depth: 2
17+
submodules: true
18+
- name: Set up JDK 11
19+
uses: actions/setup-java@v2
20+
with:
21+
java-version: 11
22+
distribution: temurin
23+
cache: gradle
24+
- name: Set up NDK 21.4.7075529
25+
run: |
26+
ANDROID_ROOT=/usr/local/lib/android
27+
ANDROID_SDK_ROOT=${ANDROID_ROOT}/sdk
28+
ANDROID_NDK_ROOT=${ANDROID_SDK_ROOT}/ndk-bundle
29+
SDKMANAGER=${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager
30+
echo "y" | $SDKMANAGER "ndk;21.4.7075529"
31+
ln -sfn ${ANDROID_SDK_ROOT}/ndk/21.4.7075529 ${ANDROID_NDK_ROOT}
32+
echo "ANDROID_NDK_HOME=${ANDROID_NDK_ROOT}" >> $GITHUB_ENV
33+
- name: Set up Python 3.10
34+
uses: actions/setup-python@v4
35+
with:
36+
python-version: '3.10'
37+
- uses: google-github-actions/auth@v0
38+
with:
39+
credentials_json: '${{ secrets.GCP_SERVICE_ACCOUNT }}'
40+
- uses: google-github-actions/setup-gcloud@v0
41+
- name: Set up fireci
42+
run: pip3 install -e ci/fireci
43+
- name: Run coverage tests (presubmit)
44+
if: ${{ github.event_name == 'pull_request' }}
45+
run: fireci coverage --pull-request
46+
- name: Run coverage tests (post-submit)
47+
if: ${{ github.event_name == 'push' }}
48+
run: fireci coverage
49+
50+
size:
51+
name: Size
52+
if: (github.repository == 'Firebase/firebase-android-sdk' && github.event_name == 'push') || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)
53+
runs-on: ubuntu-latest
54+
steps:
55+
- uses: actions/checkout@v3
56+
with:
57+
fetch-depth: 2
58+
submodules: true
59+
- name: Set up JDK 11
60+
uses: actions/setup-java@v2
61+
with:
62+
java-version: 11
63+
distribution: temurin
64+
cache: gradle
65+
- name: Set up NDK 21.4.7075529
66+
run: |
67+
ANDROID_ROOT=/usr/local/lib/android
68+
ANDROID_SDK_ROOT=${ANDROID_ROOT}/sdk
69+
ANDROID_NDK_ROOT=${ANDROID_SDK_ROOT}/ndk-bundle
70+
SDKMANAGER=${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager
71+
echo "y" | $SDKMANAGER "ndk;21.4.7075529"
72+
ln -sfn ${ANDROID_SDK_ROOT}/ndk/21.4.7075529 ${ANDROID_NDK_ROOT}
73+
echo "ANDROID_NDK_HOME=${ANDROID_NDK_ROOT}" >> $GITHUB_ENV
74+
- name: Set up Python 3.10
75+
uses: actions/setup-python@v4
76+
with:
77+
python-version: '3.10'
78+
- uses: google-github-actions/auth@v0
79+
with:
80+
credentials_json: '${{ secrets.GCP_SERVICE_ACCOUNT }}'
81+
- uses: google-github-actions/setup-gcloud@v0
82+
- name: Set up fireci
83+
run: pip3 install -e ci/fireci
84+
- name: Run size tests (presubmit)
85+
if: ${{ github.event_name == 'pull_request' }}
86+
run: fireci binary_size --pull-request
87+
- name: Run size tests (post-submit)
88+
if: ${{ github.event_name == 'push' }}
89+
run: fireci binary_size
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Private Mirror Sync
2+
3+
concurrency:
4+
group: ${{ github.workflow }}
5+
cancel-in-progress: true
6+
7+
on:
8+
push:
9+
branches:
10+
- master
11+
12+
jobs:
13+
sync:
14+
if: github.repository == 'firebase/firebase-android-sdk'
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v3
18+
with:
19+
fetch-depth: 0
20+
submodules: true
21+
token: ${{ secrets.GOOGLE_OSS_BOT_TOKEN }}
22+
- name: Force push HEAD to private repo main branch
23+
run: |
24+
git remote add mirror https://github.com/FirebasePrivate/firebase-android-sdk.git
25+
git push mirror HEAD:main --force --verbose

appcheck/firebase-appcheck/ktx/api.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
package com.google.firebase.appcheck.ktx {
33

44
public final class FirebaseAppCheckKt {
5-
ctor public FirebaseAppCheckKt();
65
method @NonNull public static com.google.firebase.appcheck.FirebaseAppCheck appCheck(@NonNull com.google.firebase.ktx.Firebase, @NonNull com.google.firebase.FirebaseApp app);
76
method @NonNull public static operator String component1(@NonNull com.google.firebase.appcheck.AppCheckToken);
87
method public static operator long component2(@NonNull com.google.firebase.appcheck.AppCheckToken);

appcheck/firebase-appcheck/ktx/ktx.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ android {
5151
}
5252

5353
dependencies {
54-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion"
54+
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
5555

5656
implementation project(':firebase-common')
5757
implementation project(':firebase-components')

appcheck/firebase-appcheck/ktx/src/main/kotlin/com/google/firebase/appcheck/ktx/FirebaseAppCheck.kt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,14 @@
1414

1515
package com.google.firebase.appcheck.ktx
1616

17+
import com.google.firebase.BuildConfig
1718
import com.google.firebase.FirebaseApp
1819
import com.google.firebase.appcheck.AppCheckToken
1920
import com.google.firebase.appcheck.FirebaseAppCheck
21+
import com.google.firebase.components.Component
22+
import com.google.firebase.components.ComponentRegistrar
2023
import com.google.firebase.ktx.Firebase
24+
import com.google.firebase.platforminfo.LibraryVersionComponent
2125

2226
/** Returns the [FirebaseAppCheck] instance of the default [FirebaseApp]. */
2327
val Firebase.appCheck: FirebaseAppCheck
@@ -39,3 +43,10 @@ operator fun AppCheckToken.component1() = token
3943
* @return the expireTimeMillis of the [AppCheckToken]
4044
*/
4145
operator fun AppCheckToken.component2() = expireTimeMillis
46+
47+
internal const val LIBRARY_NAME: String = "fire-app-check-ktx"
48+
49+
class FirebaseAppCheckKtxRegistrar : ComponentRegistrar {
50+
override fun getComponents(): List<Component<*>> =
51+
listOf(LibraryVersionComponent.create(LIBRARY_NAME, BuildConfig.VERSION_NAME))
52+
}

0 commit comments

Comments
 (0)