Skip to content

Commit

Permalink
Merge branch 'daymon-add-clean-command' of https://github.com/firebas…
Browse files Browse the repository at this point in the history
…e/firebase-android-sdk into daymon-add-clean-command
  • Loading branch information
daymxn committed Dec 6, 2024
2 parents 7d9c431 + 956e3a7 commit 4e9782b
Show file tree
Hide file tree
Showing 32 changed files with 2,116 additions and 42 deletions.
164 changes: 164 additions & 0 deletions .github/workflows/dataconnect_demo_app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
name: Data Connect Demo App

on:
workflow_dispatch:
inputs:
nodeVersion:
firebaseToolsVersion:
javaVersion:
gradleInfoLog:
type: boolean
pull_request:
paths:
- firebase-dataconnect/demo/**
- .github/workflows/dataconnect_demo_app.yml
schedule:
- cron: '0 11 * * *' # Run nightly at 11am UTC (3am Pacific, 6am Eastern)

env:
FDC_NODE_VERSION: ${{ inputs.nodeVersion || '20' }}
FDC_FIREBASE_TOOLS_VERSION: ${{ inputs.firebaseToolsVersion || '13.25.0' }}
FDC_JAVA_VERSION: ${{ inputs.javaVersion || '17' }}
FDC_FIREBASE_TOOLS_DIR: ${{ github.workspace }}/firebase-tools
FDC_FIREBASE_COMMAND: ${{ github.workspace }}/firebase-tools/node_modules/.bin/firebase

defaults:
run:
shell: bash
working-directory: firebase-dataconnect/demo

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
test:
continue-on-error: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
sparse-checkout: firebase-dataconnect/demo

- name: Create Cache Key Files
run: |
echo "gmagjr2b9d" >github_actions_demo_test_cache_key.txt
echo "${{ env.FDC_FIREBASE_TOOLS_VERSION }}" >github_actions_demo_assemble_firebase_tools_version.txt
- uses: actions/setup-node@v3
with:
node-version: ${{ env.FDC_NODE_VERSION }}
cache: 'npm'
cache-dependency-path: |
firebase-dataconnect/demo/github_actions_demo_test_cache_key.txt
firebase-dataconnect/demo/github_actions_demo_assemble_firebase_tools_version.txt
- name: cache package-lock.json
id: package_json_lock
uses: actions/cache@v4
with:
path: ${{ env.FDC_FIREBASE_TOOLS_DIR }}/package*.json
key: firebase_tools_package_json-${{ env.FDC_FIREBASE_TOOLS_VERSION }}

- name: install firebase-tools from scratch
if: steps.package_json_lock.outputs.cache-hit != 'true'
run: |
set -v
mkdir -p ${{ env.FDC_FIREBASE_TOOLS_DIR }}
cd ${{ env.FDC_FIREBASE_TOOLS_DIR }}
echo '{}' > package.json
npm install --fund=false --audit=false --save --save-exact firebase-tools@${{ env.FDC_FIREBASE_TOOLS_VERSION }}
- name: install firebase-tools from package-lock.json
if: steps.package_json_lock.outputs.cache-hit == 'true'
run: |
cd ${{ env.FDC_FIREBASE_TOOLS_DIR }}
npm ci --fund=false --audit=false
- uses: actions/setup-java@v4
with:
java-version: ${{ env.FDC_JAVA_VERSION }}
distribution: temurin
cache: gradle
cache-dependency-path: |
firebase-dataconnect/demo/build.gradle.kts
firebase-dataconnect/demo/gradle.properties
firebase-dataconnect/demo/gradle/wrapper/gradle-wrapper.properties
firebase-dataconnect/demo/github_actions_demo_test_cache_key.txt
- name: tool versions
continue-on-error: true
run: |
set +e -v
which java
java -version
which javac
javac -version
which node
node --version
${{ env.FDC_FIREBASE_COMMAND }} --version
./gradlew --version
- name: ./gradlew assemble test
run: |
set -x
./gradlew \
--no-daemon \
${{ (inputs.gradleInfoLog && '--info') || '' }} \
--profile \
-PdataConnect.minimalApp.firebaseCommand=${{ env.FDC_FIREBASE_COMMAND }} \
assemble test
- uses: actions/upload-artifact@v4
with:
name: apks
path: firebase-dataconnect/demo/build/**/*.apk
if-no-files-found: warn
compression-level: 0

- uses: actions/upload-artifact@v4
with:
name: gradle_build_reports
path: firebase-dataconnect/demo/build/reports/
if-no-files-found: warn
compression-level: 9

spotlessCheck:
continue-on-error: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
sparse-checkout: firebase-dataconnect/demo

- name: Create Cache Key Files
run: echo "h99ee4egfd" >github_actions_demo_spotless_cache_key.txt

- uses: actions/setup-java@v4
with:
java-version: ${{ env.FDC_JAVA_VERSION }}
distribution: temurin
cache: gradle
cache-dependency-path: |
firebase-dataconnect/demo/build.gradle.kts
firebase-dataconnect/demo/gradle.properties
firebase-dataconnect/demo/gradle/wrapper/gradle-wrapper.properties
firebase-dataconnect/demo/github_actions_demo_spotless_cache_key.txt
- name: tool versions
continue-on-error: true
run: |
set +e -v
which java
java -version
which javac
javac -version
./gradlew --version
- name: ./gradlew spotlessCheck
run: |
set -x
./gradlew \
--no-daemon \
${{ (inputs.gradleInfoLog && '--info') || '' }} \
spotlessCheck
Original file line number Diff line number Diff line change
Expand Up @@ -50,30 +50,29 @@ android {
}

dependencies {
javadocClasspath 'com.google.auto.value:auto-value-annotations:1.6.6'
javadocClasspath libs.autovalue.annotations

api project(':appcheck:firebase-appcheck')
api project(':appcheck:firebase-appcheck-debug')
api 'com.google.firebase:firebase-appcheck-interop:17.0.0'
api 'com.google.firebase:firebase-common:21.0.0'
api 'com.google.firebase:firebase-common-ktx:21.0.0'
api 'com.google.firebase:firebase-components:18.0.0'

implementation libs.androidx.test.core
implementation 'com.google.android.gms:play-services-base:18.0.1'
implementation 'com.google.android.gms:play-services-tasks:18.0.1'
implementation libs.playservices.base
implementation libs.playservices.tasks

testImplementation project(':appcheck:firebase-appcheck-playintegrity')
testImplementation libs.androidx.test.core
testImplementation libs.truth
testImplementation 'junit:junit:4.13-beta-2'
testImplementation 'org.mockito:mockito-core:2.25.0'
testImplementation libs.junit
testImplementation libs.mockito.core
testImplementation libs.robolectric

androidTestImplementation project(':firebase-storage')
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation libs.androidx.test.runner
androidTestImplementation libs.androidx.test.junit
androidTestImplementation libs.truth
androidTestImplementation 'junit:junit:4.13-beta-2'
androidTestImplementation 'org.mockito:mockito-core:2.25.0'
androidTestImplementation libs.junit
androidTestImplementation libs.mockito.core
}
13 changes: 6 additions & 7 deletions appcheck/firebase-appcheck-debug/firebase-appcheck-debug.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,25 +47,24 @@ android {
}

dependencies {
javadocClasspath 'com.google.auto.value:auto-value-annotations:1.6.6'
javadocClasspath libs.autovalue.annotations

api project(':appcheck:firebase-appcheck')
api 'com.google.firebase:firebase-annotations:16.2.0'
api 'com.google.firebase:firebase-common:21.0.0'
api 'com.google.firebase:firebase-common-ktx:21.0.0'
api 'com.google.firebase:firebase-components:18.0.0'

implementation 'com.google.android.gms:play-services-base:18.0.1'
implementation 'com.google.android.gms:play-services-tasks:18.0.1'
implementation libs.playservices.base
implementation libs.playservices.tasks

testImplementation(project(":integ-testing")){
exclude group: 'com.google.firebase', module: 'firebase-common'
exclude group: 'com.google.firebase', module: 'firebase-components'
}
testImplementation libs.androidx.test.core
testImplementation 'androidx.test:rules:1.2.0'
testImplementation libs.androidx.test.rules
testImplementation libs.truth
testImplementation 'junit:junit:4.13-beta-2'
testImplementation 'org.mockito:mockito-core:2.25.0'
testImplementation libs.junit
testImplementation libs.mockito.core
testImplementation libs.robolectric
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ android {
}

dependencies {
implementation 'com.google.android.gms:play-services-base:18.0.1'
implementation 'com.google.android.gms:play-services-tasks:18.0.1'
implementation libs.playservices.base
implementation libs.playservices.tasks

testImplementation libs.androidx.test.core
testImplementation 'androidx.test:rules:1.2.0'
testImplementation libs.androidx.test.rules
testImplementation libs.truth
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:2.25.0'
testImplementation libs.junit
testImplementation libs.mockito.core
testImplementation libs.robolectric
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,17 @@ android {
}

dependencies {
javadocClasspath 'com.google.auto.value:auto-value-annotations:1.6.6'
javadocClasspath libs.autovalue.annotations

api project(':appcheck:firebase-appcheck')
api 'com.google.firebase:firebase-annotations:16.2.0'
api 'com.google.firebase:firebase-common:21.0.0'
api 'com.google.firebase:firebase-common-ktx:21.0.0'
api 'com.google.firebase:firebase-components:18.0.0'

implementation 'com.google.android.gms:play-services-base:18.0.1'
implementation 'com.google.android.gms:play-services-tasks:18.0.1'
implementation 'com.google.android.play:integrity:1.2.0'
implementation libs.playservices.base
implementation libs.playservices.tasks
implementation libs.integrity

testImplementation(project(":integ-testing")){
exclude group: 'com.google.firebase', module: 'firebase-common'
Expand All @@ -66,6 +66,6 @@ dependencies {
testImplementation libs.androidx.test.core
testImplementation libs.truth
testImplementation libs.junit
testImplementation 'org.mockito:mockito-core:3.4.6'
testImplementation libs.mockito.core
testImplementation libs.robolectric
}
23 changes: 11 additions & 12 deletions appcheck/firebase-appcheck/firebase-appcheck.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,15 @@ android {
}

dependencies {
javadocClasspath 'com.google.auto.value:auto-value-annotations:1.6.6'
javadocClasspath libs.autovalue.annotations

api libs.playservices.tasks
api 'com.google.firebase:firebase-annotations:16.2.0'
api "com.google.firebase:firebase-appcheck-interop:17.1.0"
api("com.google.firebase:firebase-common:21.0.0")
api("com.google.firebase:firebase-common-ktx:21.0.0")
api("com.google.firebase:firebase-components:18.0.0")

implementation 'androidx.annotation:annotation:1.1.0'
implementation libs.androidx.annotation
implementation libs.playservices.base
implementation libs.kotlin.stdlib

Expand All @@ -66,25 +65,25 @@ dependencies {
exclude group: 'com.google.firebase', module: 'firebase-components'
}
testImplementation libs.androidx.test.core
testImplementation 'androidx.test:rules:1.2.0'
testImplementation libs.androidx.test.rules
testImplementation libs.truth
testImplementation 'junit:junit:4.12'
testImplementation 'junit:junit:4.13-beta-2'
testImplementation libs.junit
testImplementation libs.junit
testImplementation libs.mockito.core
testImplementation 'org.mockito:mockito-inline:5.2.0'
testImplementation libs.mockito.mockito.inline
testImplementation libs.robolectric

androidTestImplementation project(':appcheck:firebase-appcheck')
androidTestImplementation(project(":integ-testing")){
exclude group: 'com.google.firebase', module: 'firebase-common'
exclude group: 'com.google.firebase', module: 'firebase-components'
}
androidTestImplementation "androidx.annotation:annotation:1.0.0"
androidTestImplementation libs.androidx.annotation
androidTestImplementation libs.androidx.test.core
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation libs.androidx.test.runner
androidTestImplementation libs.androidx.test.junit
androidTestImplementation libs.truth
androidTestImplementation 'junit:junit:4.12'
androidTestImplementation 'org.mockito:mockito-core:2.25.0'
androidTestImplementation 'org.mockito:mockito-inline:2.25.0'
androidTestImplementation libs.junit
androidTestImplementation libs.mockito.core
androidTestImplementation libs.mockito.mockito.inline
}
8 changes: 4 additions & 4 deletions appcheck/firebase-appcheck/ktx/ktx.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ dependencies {
implementation("com.google.firebase:firebase-components:18.0.0")

testImplementation libs.truth
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:2.25.0'
testImplementation libs.junit
testImplementation libs.mockito.core
testImplementation libs.robolectric

androidTestImplementation libs.androidx.test.core
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation libs.androidx.test.runner
androidTestImplementation 'com.google.firebase:firebase-appcheck-interop:17.1.0'
androidTestImplementation libs.truth
androidTestImplementation 'junit:junit:4.12'
androidTestImplementation libs.junit
}
23 changes: 23 additions & 0 deletions firebase-dataconnect/demo/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

.gradle/
.idea/
.kotlin/

build/
local.properties

*.log
*.hprof
Loading

0 comments on commit 4e9782b

Please sign in to comment.