Skip to content

Commit

Permalink
Merge branch 'master' into perfDataCollectionStateForSessions
Browse files Browse the repository at this point in the history
  • Loading branch information
visumickey committed Aug 15, 2023
2 parents 564bcde + da631d2 commit c2e289a
Show file tree
Hide file tree
Showing 90 changed files with 1,584 additions and 133 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/api-information.yml
Expand Up @@ -7,7 +7,7 @@ jobs:
if: github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3.5.3
with:
fetch-depth: 2
submodules: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-release-artifacts.yml
Expand Up @@ -13,7 +13,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3.5.3

- name: Set up JDK 11
uses: actions/setup-java@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-src-check.yml
Expand Up @@ -13,7 +13,7 @@ jobs:
build-src-check:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3.0.2
- uses: actions/checkout@v3.5.3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/changelog.yml
Expand Up @@ -13,7 +13,7 @@ jobs:
env:
BUNDLE_GEMFILE: ./ci/danger/Gemfile
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3.5.3
with:
fetch-depth: 100
submodules: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-head-dependencies.yml
Expand Up @@ -10,7 +10,7 @@ jobs:
check-head-dependencies:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3.5.3

- name: Perform gradle build
run: |
Expand Down
47 changes: 44 additions & 3 deletions .github/workflows/ci_tests.yml
Expand Up @@ -16,7 +16,7 @@ jobs:
outputs:
modules: ${{ steps.changed-modules.outputs.modules }}
steps:
- uses: actions/checkout@v3.0.2
- uses: actions/checkout@v3.5.3
with:
fetch-depth: 2
submodules: true
Expand Down Expand Up @@ -44,7 +44,7 @@ jobs:
module: ${{ fromJSON(needs.determine_changed.outputs.modules) }}

steps:
- uses: actions/checkout@v3.0.2
- uses: actions/checkout@v3.5.3
with:
fetch-depth: 2
submodules: true
Expand Down Expand Up @@ -100,7 +100,7 @@ jobs:
module: ${{ fromJSON(needs.determine_changed.outputs.modules) }}

steps:
- uses: actions/checkout@v3.0.2
- uses: actions/checkout@v3.5.3
with:
fetch-depth: 2
submodules: true
Expand Down Expand Up @@ -130,6 +130,47 @@ jobs:
run: |
./gradlew ${{matrix.module}}:deviceCheck withErrorProne -PtargetBackend="prod"
firestore_custom_integ_tests:
name: "Firestore Custom Instrumentation Tests Against Named DB"
runs-on: ubuntu-22.04
needs:
- determine_changed
# only run on post submit or PRs not originating from forks.
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)) && contains(fromJSON(needs.determine_changed.outputs.modules), ':firebase-firestore')
strategy:
fail-fast: false

steps:
- uses: actions/checkout@v3.5.3
with:
fetch-depth: 2
submodules: true

- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: 11
distribution: temurin
cache: gradle

- name: Add google-services.json
env:
INTEG_TESTS_GOOGLE_SERVICES: ${{ secrets.INTEG_TESTS_GOOGLE_SERVICES }}
run: |
echo $INTEG_TESTS_GOOGLE_SERVICES | base64 -d > google-services.json
- uses: google-github-actions/auth@v0
with:
credentials_json: ${{ secrets.GCP_SERVICE_ACCOUNT }}
- uses: google-github-actions/setup-gcloud@v0
- name: Firestore Named DB Integ Tests
env:
FIREBASE_CI: 1
FTL_RESULTS_BUCKET: android-ci
FTL_RESULTS_DIR: ${{ github.event_name == 'pull_request' && format('pr-logs/pull/{0}/{1}/{2}/{3}_{4}/artifacts/', github.repository, github.event.pull_request.number, github.job, github.run_id, github.run_attempt) || format('logs/{0}/{1}_{2}/artifacts/', github.workflow, github.run_id, github.run_attempt)}}
FIREBASE_APP_CHECK_DEBUG_SECRET: ${{ secrets.FIREBASE_APP_CHECK_DEBUG_SECRET }}
run: |
./gradlew firebase-firestore:deviceCheck withErrorProne -PtargetBackend="prod" -PtargetDatabaseId="test-db"
publish-test-results:
name: "Publish Tests Results"
needs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/create_releases.yml
Expand Up @@ -26,7 +26,7 @@ jobs:
create-pull-request:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3.5.3
with:
fetch-depth: 0

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/diff-javadoc.yml
Expand Up @@ -13,7 +13,7 @@ jobs:
run: mkdir ~/diff

- name: Checkout PR branch
uses: actions/checkout@v3
uses: actions/checkout@v3.5.3
with:
fetch-depth: 2
submodules: true
Expand All @@ -32,7 +32,7 @@ jobs:
run: mv build ~/diff/modified

- name: Checkout master
uses: actions/checkout@v3
uses: actions/checkout@v3.5.3
with:
ref: ${{ github.base_ref }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fireci.yml
Expand Up @@ -15,7 +15,7 @@ jobs:
name: "fireci tests"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3.0.2
- uses: actions/checkout@v3.5.3
- uses: actions/setup-python@v2
with:
python-version: '3.8'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/fireperf-e2e.yml
Expand Up @@ -20,9 +20,9 @@ jobs:
environment: [ prod, autopush ]
steps:
- name: Checkout firebase-android-sdk
uses: actions/checkout@v3
uses: actions/checkout@v3.5.3
- name: Checkout firebase-android-buildtools
uses: actions/checkout@v3
uses: actions/checkout@v3.5.3
with:
repository: FirebasePrivate/firebase-android-buildtools
token: ${{ secrets.GOOGLE_OSS_BOT_TOKEN }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/health-metrics.yml
Expand Up @@ -24,7 +24,7 @@ jobs:
&& github.event.pull_request.head.repo.full_name == github.repository)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3.5.3
with:
fetch-depth: 2
submodules: true
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
&& github.event.pull_request.head.repo.full_name == github.repository)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3.5.3
with:
fetch-depth: 2
submodules: true
Expand Down Expand Up @@ -95,7 +95,7 @@ jobs:
&& github.event.pull_request.base.ref == 'master')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3.5.3
with:
fetch-depth: 2
submodules: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/jekyll-gh-pages.yml
Expand Up @@ -31,7 +31,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v3.5.3
- name: Setup Pages
uses: actions/configure-pages@v2
- name: Build with Jekyll
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/make-bom.yml
Expand Up @@ -11,7 +11,7 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: '3.10'
- uses: actions/checkout@v3.0.2
- uses: actions/checkout@v3.5.3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/private-mirror-sync.yml
Expand Up @@ -14,7 +14,7 @@ jobs:
if: github.repository == 'firebase/firebase-android-sdk'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3.5.3
with:
fetch-depth: 0
submodules: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-note-changes.yml
Expand Up @@ -9,7 +9,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3.5.3
with:
fetch-depth: 0

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scorecards.yml
Expand Up @@ -32,7 +32,7 @@ jobs:

steps:
- name: "Checkout code"
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
uses: actions/checkout@v3.5.3
with:
persist-credentials: false

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/semver-check.yml
Expand Up @@ -10,7 +10,7 @@ jobs:
semver-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3.5.3

- name: Perform gradle build
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sessions-e2e.yml
Expand Up @@ -18,7 +18,7 @@ jobs:

steps:
- name: Checkout firebase-sessions
uses: actions/checkout@v3
uses: actions/checkout@v3.5.3

- name: set up JDK 11
uses: actions/setup-java@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/smoke-tests.yml
Expand Up @@ -7,7 +7,7 @@ jobs:
if: github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3.5.3
with:
fetch-depth: 2
submodules: true
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/update-cpp-sdk-on-release.yml
Expand Up @@ -23,7 +23,7 @@ jobs:
outputs:
released_version_changed: ${{ steps.check_version.outputs.released_version_changed }}
steps:
- uses: actions/checkout@v2.3.1
- uses: actions/checkout@v3.5.3
with:
# Check out the actual head commit, not any merge commit.
ref: ${{ github.sha }}
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
python-version: 3.7

- name: Check out firebase-cpp-sdk
uses: actions/checkout@v2.3.1
uses: actions/checkout@v3.5.3
with:
repository: firebase/firebase-cpp-sdk
ref: main
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/validate-dependencies.yml
Expand Up @@ -10,7 +10,7 @@ jobs:
build-artifacts:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3.5.3

- name: Perform gradle build
run: |
Expand Down
Expand Up @@ -99,6 +99,7 @@ abstract class PomValidator : DefaultTask() {
listOf(
"javax.inject", // javax.inject doesn't respect SemVer and doesn't update
"dagger", // dagger doesn't respect Semver
"auto-service-annotations", // auto-service-annotations doesn't respect SemVer
)
}
}
Expand Up @@ -79,7 +79,9 @@ abstract class PublishingPlugin : Plugin<Project> {
val checkHeadDependencies =
registerCheckHeadDependenciesTask(project, releasingFirebaseLibraries)
val validateProjectsToPublish =
registerValidateProjectsToPublishTask(project, releasingProjects)
registerValidateProjectsToPublishTask(project, releasingFirebaseLibraries)
val validateLibraryGroupsToPublish =
registerValidateLibraryGroupsToPublishTask(project, releasingFirebaseLibraries)
val publishReleasingLibrariesToBuildDir =
registerPublishReleasingLibrariesToBuildDirTask(project, releasingProjects)
val generateKotlindocsForRelease =
Expand Down Expand Up @@ -127,6 +129,7 @@ abstract class PublishingPlugin : Plugin<Project> {
project.tasks.register(FIREBASE_PUBLISH_TASK) {
dependsOn(
validateProjectsToPublish,
validateLibraryGroupsToPublish,
checkHeadDependencies,
// validatePomForRelease, TODO(b/279466888) - Make GmavenHelper testable
buildMavenZip,
Expand Down Expand Up @@ -275,11 +278,11 @@ abstract class PublishingPlugin : Plugin<Project> {
// TODO(b/280320915): Remove doLast when Gradle + IDEA fix task configuration avoidance bug
private fun registerValidateProjectsToPublishTask(
project: Project,
releasingProjects: List<Project>
releasinglibraries: List<FirebaseLibraryExtension>
) =
project.tasks.register(VALIDATE_PROJECTS_TO_PUBLISH_TASK) {
doLast {
if (releasingProjects.isEmpty()) {
if (releasinglibraries.isEmpty()) {
throw GradleException(
"No projects to release. " +
"Ensure you've specified the projectsToPublish parameter, " +
Expand All @@ -289,6 +292,30 @@ abstract class PublishingPlugin : Plugin<Project> {
}
}

/**
* Registers the [VALIDATE_LIBRARY_GROUPS_TO_PUBLISH_TASK] task.
*
* Validates that all library groups of all publishing projects are included in the release config
*
* @throws GradleException if a library is releasing without it's library group.
*/
private fun registerValidateLibraryGroupsToPublishTask(
project: Project,
releasinglibraries: List<FirebaseLibraryExtension>
) =
project.tasks.register(VALIDATE_LIBRARY_GROUPS_TO_PUBLISH_TASK) {
doLast {
val libraryGroupProjects = releasinglibraries.flatMap { it.librariesToRelease }
val missingProjects = libraryGroupProjects - releasinglibraries
if (missingProjects.isNotEmpty()) {
throw GradleException(
"Some libraries in library groups are not in the release: " +
missingProjects.map { it.mavenName }.joinToString("\n")
)
}
}
}

/**
* Registers the [PUBLISH_RELEASING_LIBS_TO_BUILD_TASK] task.
*
Expand Down Expand Up @@ -465,6 +492,7 @@ abstract class PublishingPlugin : Plugin<Project> {

const val GENERATE_BOM_TASK = "generateBom"
const val VALIDATE_PROJECTS_TO_PUBLISH_TASK = "validateProjectsToPublish"
const val VALIDATE_LIBRARY_GROUPS_TO_PUBLISH_TASK = "validateLibraryGroupsToPublish"
const val SEMVER_CHECK_TASK = "semverCheckForRelease"
const val RELEASE_GENEATOR_TASK = "generateReleaseConfig"
const val VALIDATE_POM_TASK = "validatePomForRelease"
Expand Down
Expand Up @@ -21,7 +21,7 @@ def jvm = org.gradle.internal.jvm.Jvm.current()

dependencies {
implementation 'com.google.firebase:firebase-encoders:17.0.0'
implementation 'com.google.auto.service:auto-service-annotations:1.0-rc6'
implementation 'com.google.auto.service:auto-service-annotations:1.0.1'
implementation 'com.squareup:javapoet:1.13.0'
compileOnly 'javax.annotation:javax.annotation-api:1.3.2'
implementation 'com.google.guava:guava:28.1-jre'
Expand Down

0 comments on commit c2e289a

Please sign in to comment.