Skip to content

Commit 956e3a7

Browse files
authored
Merge branch 'main' into daymon-add-clean-command
2 parents 8cd31e0 + 6021b75 commit 956e3a7

File tree

32 files changed

+2116
-42
lines changed

32 files changed

+2116
-42
lines changed
Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
name: Data Connect Demo App
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
nodeVersion:
7+
firebaseToolsVersion:
8+
javaVersion:
9+
gradleInfoLog:
10+
type: boolean
11+
pull_request:
12+
paths:
13+
- firebase-dataconnect/demo/**
14+
- .github/workflows/dataconnect_demo_app.yml
15+
schedule:
16+
- cron: '0 11 * * *' # Run nightly at 11am UTC (3am Pacific, 6am Eastern)
17+
18+
env:
19+
FDC_NODE_VERSION: ${{ inputs.nodeVersion || '20' }}
20+
FDC_FIREBASE_TOOLS_VERSION: ${{ inputs.firebaseToolsVersion || '13.25.0' }}
21+
FDC_JAVA_VERSION: ${{ inputs.javaVersion || '17' }}
22+
FDC_FIREBASE_TOOLS_DIR: ${{ github.workspace }}/firebase-tools
23+
FDC_FIREBASE_COMMAND: ${{ github.workspace }}/firebase-tools/node_modules/.bin/firebase
24+
25+
defaults:
26+
run:
27+
shell: bash
28+
working-directory: firebase-dataconnect/demo
29+
30+
concurrency:
31+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
32+
cancel-in-progress: true
33+
34+
jobs:
35+
test:
36+
continue-on-error: false
37+
runs-on: ubuntu-latest
38+
steps:
39+
- uses: actions/checkout@v3
40+
with:
41+
sparse-checkout: firebase-dataconnect/demo
42+
43+
- name: Create Cache Key Files
44+
run: |
45+
echo "gmagjr2b9d" >github_actions_demo_test_cache_key.txt
46+
echo "${{ env.FDC_FIREBASE_TOOLS_VERSION }}" >github_actions_demo_assemble_firebase_tools_version.txt
47+
48+
- uses: actions/setup-node@v3
49+
with:
50+
node-version: ${{ env.FDC_NODE_VERSION }}
51+
cache: 'npm'
52+
cache-dependency-path: |
53+
firebase-dataconnect/demo/github_actions_demo_test_cache_key.txt
54+
firebase-dataconnect/demo/github_actions_demo_assemble_firebase_tools_version.txt
55+
56+
- name: cache package-lock.json
57+
id: package_json_lock
58+
uses: actions/cache@v4
59+
with:
60+
path: ${{ env.FDC_FIREBASE_TOOLS_DIR }}/package*.json
61+
key: firebase_tools_package_json-${{ env.FDC_FIREBASE_TOOLS_VERSION }}
62+
63+
- name: install firebase-tools from scratch
64+
if: steps.package_json_lock.outputs.cache-hit != 'true'
65+
run: |
66+
set -v
67+
mkdir -p ${{ env.FDC_FIREBASE_TOOLS_DIR }}
68+
cd ${{ env.FDC_FIREBASE_TOOLS_DIR }}
69+
echo '{}' > package.json
70+
npm install --fund=false --audit=false --save --save-exact firebase-tools@${{ env.FDC_FIREBASE_TOOLS_VERSION }}
71+
72+
- name: install firebase-tools from package-lock.json
73+
if: steps.package_json_lock.outputs.cache-hit == 'true'
74+
run: |
75+
cd ${{ env.FDC_FIREBASE_TOOLS_DIR }}
76+
npm ci --fund=false --audit=false
77+
78+
- uses: actions/setup-java@v4
79+
with:
80+
java-version: ${{ env.FDC_JAVA_VERSION }}
81+
distribution: temurin
82+
cache: gradle
83+
cache-dependency-path: |
84+
firebase-dataconnect/demo/build.gradle.kts
85+
firebase-dataconnect/demo/gradle.properties
86+
firebase-dataconnect/demo/gradle/wrapper/gradle-wrapper.properties
87+
firebase-dataconnect/demo/github_actions_demo_test_cache_key.txt
88+
89+
- name: tool versions
90+
continue-on-error: true
91+
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
101+
102+
- name: ./gradlew assemble test
103+
run: |
104+
set -x
105+
./gradlew \
106+
--no-daemon \
107+
${{ (inputs.gradleInfoLog && '--info') || '' }} \
108+
--profile \
109+
-PdataConnect.minimalApp.firebaseCommand=${{ env.FDC_FIREBASE_COMMAND }} \
110+
assemble test
111+
112+
- uses: actions/upload-artifact@v4
113+
with:
114+
name: apks
115+
path: firebase-dataconnect/demo/build/**/*.apk
116+
if-no-files-found: warn
117+
compression-level: 0
118+
119+
- uses: actions/upload-artifact@v4
120+
with:
121+
name: gradle_build_reports
122+
path: firebase-dataconnect/demo/build/reports/
123+
if-no-files-found: warn
124+
compression-level: 9
125+
126+
spotlessCheck:
127+
continue-on-error: false
128+
runs-on: ubuntu-latest
129+
steps:
130+
- uses: actions/checkout@v3
131+
with:
132+
sparse-checkout: firebase-dataconnect/demo
133+
134+
- name: Create Cache Key Files
135+
run: echo "h99ee4egfd" >github_actions_demo_spotless_cache_key.txt
136+
137+
- uses: actions/setup-java@v4
138+
with:
139+
java-version: ${{ env.FDC_JAVA_VERSION }}
140+
distribution: temurin
141+
cache: gradle
142+
cache-dependency-path: |
143+
firebase-dataconnect/demo/build.gradle.kts
144+
firebase-dataconnect/demo/gradle.properties
145+
firebase-dataconnect/demo/gradle/wrapper/gradle-wrapper.properties
146+
firebase-dataconnect/demo/github_actions_demo_spotless_cache_key.txt
147+
148+
- name: tool versions
149+
continue-on-error: true
150+
run: |
151+
set +e -v
152+
which java
153+
java -version
154+
which javac
155+
javac -version
156+
./gradlew --version
157+
158+
- name: ./gradlew spotlessCheck
159+
run: |
160+
set -x
161+
./gradlew \
162+
--no-daemon \
163+
${{ (inputs.gradleInfoLog && '--info') || '' }} \
164+
spotlessCheck

appcheck/firebase-appcheck-debug-testing/firebase-appcheck-debug-testing.gradle

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,30 +50,29 @@ android {
5050
}
5151

5252
dependencies {
53-
javadocClasspath 'com.google.auto.value:auto-value-annotations:1.6.6'
53+
javadocClasspath libs.autovalue.annotations
5454

5555
api project(':appcheck:firebase-appcheck')
5656
api project(':appcheck:firebase-appcheck-debug')
5757
api 'com.google.firebase:firebase-appcheck-interop:17.0.0'
5858
api 'com.google.firebase:firebase-common:21.0.0'
59-
api 'com.google.firebase:firebase-common-ktx:21.0.0'
6059
api 'com.google.firebase:firebase-components:18.0.0'
6160

6261
implementation libs.androidx.test.core
63-
implementation 'com.google.android.gms:play-services-base:18.0.1'
64-
implementation 'com.google.android.gms:play-services-tasks:18.0.1'
62+
implementation libs.playservices.base
63+
implementation libs.playservices.tasks
6564

6665
testImplementation project(':appcheck:firebase-appcheck-playintegrity')
6766
testImplementation libs.androidx.test.core
6867
testImplementation libs.truth
69-
testImplementation 'junit:junit:4.13-beta-2'
70-
testImplementation 'org.mockito:mockito-core:2.25.0'
68+
testImplementation libs.junit
69+
testImplementation libs.mockito.core
7170
testImplementation libs.robolectric
7271

7372
androidTestImplementation project(':firebase-storage')
74-
androidTestImplementation 'androidx.test:runner:1.2.0'
73+
androidTestImplementation libs.androidx.test.runner
7574
androidTestImplementation libs.androidx.test.junit
7675
androidTestImplementation libs.truth
77-
androidTestImplementation 'junit:junit:4.13-beta-2'
78-
androidTestImplementation 'org.mockito:mockito-core:2.25.0'
76+
androidTestImplementation libs.junit
77+
androidTestImplementation libs.mockito.core
7978
}

appcheck/firebase-appcheck-debug/firebase-appcheck-debug.gradle

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,25 +47,24 @@ android {
4747
}
4848

4949
dependencies {
50-
javadocClasspath 'com.google.auto.value:auto-value-annotations:1.6.6'
50+
javadocClasspath libs.autovalue.annotations
5151

5252
api project(':appcheck:firebase-appcheck')
5353
api 'com.google.firebase:firebase-annotations:16.2.0'
5454
api 'com.google.firebase:firebase-common:21.0.0'
55-
api 'com.google.firebase:firebase-common-ktx:21.0.0'
5655
api 'com.google.firebase:firebase-components:18.0.0'
5756

58-
implementation 'com.google.android.gms:play-services-base:18.0.1'
59-
implementation 'com.google.android.gms:play-services-tasks:18.0.1'
57+
implementation libs.playservices.base
58+
implementation libs.playservices.tasks
6059

6160
testImplementation(project(":integ-testing")){
6261
exclude group: 'com.google.firebase', module: 'firebase-common'
6362
exclude group: 'com.google.firebase', module: 'firebase-components'
6463
}
6564
testImplementation libs.androidx.test.core
66-
testImplementation 'androidx.test:rules:1.2.0'
65+
testImplementation libs.androidx.test.rules
6766
testImplementation libs.truth
68-
testImplementation 'junit:junit:4.13-beta-2'
69-
testImplementation 'org.mockito:mockito-core:2.25.0'
67+
testImplementation libs.junit
68+
testImplementation libs.mockito.core
7069
testImplementation libs.robolectric
7170
}

appcheck/firebase-appcheck-interop/firebase-appcheck-interop.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ android {
4545
}
4646

4747
dependencies {
48-
implementation 'com.google.android.gms:play-services-base:18.0.1'
49-
implementation 'com.google.android.gms:play-services-tasks:18.0.1'
48+
implementation libs.playservices.base
49+
implementation libs.playservices.tasks
5050

5151
testImplementation libs.androidx.test.core
52-
testImplementation 'androidx.test:rules:1.2.0'
52+
testImplementation libs.androidx.test.rules
5353
testImplementation libs.truth
54-
testImplementation 'junit:junit:4.12'
55-
testImplementation 'org.mockito:mockito-core:2.25.0'
54+
testImplementation libs.junit
55+
testImplementation libs.mockito.core
5656
testImplementation libs.robolectric
5757
}

appcheck/firebase-appcheck-playintegrity/firebase-appcheck-playintegrity.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,17 @@ android {
4747
}
4848

4949
dependencies {
50-
javadocClasspath 'com.google.auto.value:auto-value-annotations:1.6.6'
50+
javadocClasspath libs.autovalue.annotations
5151

5252
api project(':appcheck:firebase-appcheck')
5353
api 'com.google.firebase:firebase-annotations:16.2.0'
5454
api 'com.google.firebase:firebase-common:21.0.0'
5555
api 'com.google.firebase:firebase-common-ktx:21.0.0'
5656
api 'com.google.firebase:firebase-components:18.0.0'
5757

58-
implementation 'com.google.android.gms:play-services-base:18.0.1'
59-
implementation 'com.google.android.gms:play-services-tasks:18.0.1'
60-
implementation 'com.google.android.play:integrity:1.2.0'
58+
implementation libs.playservices.base
59+
implementation libs.playservices.tasks
60+
implementation libs.integrity
6161

6262
testImplementation(project(":integ-testing")){
6363
exclude group: 'com.google.firebase', module: 'firebase-common'
@@ -66,6 +66,6 @@ dependencies {
6666
testImplementation libs.androidx.test.core
6767
testImplementation libs.truth
6868
testImplementation libs.junit
69-
testImplementation 'org.mockito:mockito-core:3.4.6'
69+
testImplementation libs.mockito.core
7070
testImplementation libs.robolectric
7171
}

appcheck/firebase-appcheck/firebase-appcheck.gradle

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,15 @@ android {
4848
}
4949

5050
dependencies {
51-
javadocClasspath 'com.google.auto.value:auto-value-annotations:1.6.6'
51+
javadocClasspath libs.autovalue.annotations
5252

5353
api libs.playservices.tasks
5454
api 'com.google.firebase:firebase-annotations:16.2.0'
5555
api "com.google.firebase:firebase-appcheck-interop:17.1.0"
5656
api("com.google.firebase:firebase-common:21.0.0")
57-
api("com.google.firebase:firebase-common-ktx:21.0.0")
5857
api("com.google.firebase:firebase-components:18.0.0")
5958

60-
implementation 'androidx.annotation:annotation:1.1.0'
59+
implementation libs.androidx.annotation
6160
implementation libs.playservices.base
6261
implementation libs.kotlin.stdlib
6362

@@ -66,25 +65,25 @@ dependencies {
6665
exclude group: 'com.google.firebase', module: 'firebase-components'
6766
}
6867
testImplementation libs.androidx.test.core
69-
testImplementation 'androidx.test:rules:1.2.0'
68+
testImplementation libs.androidx.test.rules
7069
testImplementation libs.truth
71-
testImplementation 'junit:junit:4.12'
72-
testImplementation 'junit:junit:4.13-beta-2'
70+
testImplementation libs.junit
71+
testImplementation libs.junit
7372
testImplementation libs.mockito.core
74-
testImplementation 'org.mockito:mockito-inline:5.2.0'
73+
testImplementation libs.mockito.mockito.inline
7574
testImplementation libs.robolectric
7675

7776
androidTestImplementation project(':appcheck:firebase-appcheck')
7877
androidTestImplementation(project(":integ-testing")){
7978
exclude group: 'com.google.firebase', module: 'firebase-common'
8079
exclude group: 'com.google.firebase', module: 'firebase-components'
8180
}
82-
androidTestImplementation "androidx.annotation:annotation:1.0.0"
81+
androidTestImplementation libs.androidx.annotation
8382
androidTestImplementation libs.androidx.test.core
84-
androidTestImplementation 'androidx.test:runner:1.2.0'
83+
androidTestImplementation libs.androidx.test.runner
8584
androidTestImplementation libs.androidx.test.junit
8685
androidTestImplementation libs.truth
87-
androidTestImplementation 'junit:junit:4.12'
88-
androidTestImplementation 'org.mockito:mockito-core:2.25.0'
89-
androidTestImplementation 'org.mockito:mockito-inline:2.25.0'
86+
androidTestImplementation libs.junit
87+
androidTestImplementation libs.mockito.core
88+
androidTestImplementation libs.mockito.mockito.inline
9089
}

appcheck/firebase-appcheck/ktx/ktx.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,13 @@ dependencies {
6161
implementation("com.google.firebase:firebase-components:18.0.0")
6262

6363
testImplementation libs.truth
64-
testImplementation 'junit:junit:4.12'
65-
testImplementation 'org.mockito:mockito-core:2.25.0'
64+
testImplementation libs.junit
65+
testImplementation libs.mockito.core
6666
testImplementation libs.robolectric
6767

6868
androidTestImplementation libs.androidx.test.core
69-
androidTestImplementation 'androidx.test:runner:1.2.0'
69+
androidTestImplementation libs.androidx.test.runner
7070
androidTestImplementation 'com.google.firebase:firebase-appcheck-interop:17.1.0'
7171
androidTestImplementation libs.truth
72-
androidTestImplementation 'junit:junit:4.12'
72+
androidTestImplementation libs.junit
7373
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Copyright 2024 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
.gradle/
16+
.idea/
17+
.kotlin/
18+
19+
build/
20+
local.properties
21+
22+
*.log
23+
*.hprof

0 commit comments

Comments
 (0)