Skip to content

Commit

Permalink
Merge branch 'firebase:main' into stream-functions-api
Browse files Browse the repository at this point in the history
  • Loading branch information
MustafaJadid2025 authored Dec 26, 2024
2 parents 6d3012d + c7eb32a commit a4a442c
Show file tree
Hide file tree
Showing 111 changed files with 585 additions and 370 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
name: Check buildSrc
name: Check plugins

on:
pull_request:
paths:
- 'buildSrc/**'
- 'plugins/**'

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

jobs:
build-src-check:
plugins-check:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4.1.1
Expand All @@ -20,13 +20,13 @@ jobs:
java-version: 17
distribution: temurin
cache: gradle
- name: buildSrc Tests
- name: plugins tests
env:
FIREBASE_CI: 1
run: |
./gradlew -b buildSrc/build.gradle.kts -PenablePluginTests=true check
./gradlew plugins:check
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@82082dac68ad6a19d980f8ce817e108b9f496c2a
with:
files: "**/build/test-results/**/*.xml"
check_name: "buildSrc Test Results"
check_name: "plugins test results"
98 changes: 49 additions & 49 deletions .github/workflows/release-note-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,59 +9,59 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1
with:
fetch-depth: 0
- uses: actions/checkout@v4.1.1
with:
fetch-depth: 0

- name: Create output file
run: touch changelog_comment.md
- name: Create output file
run: touch changelog_comment.md

- name: Get changed changelog files
id: changed-files
uses: tj-actions/changed-files@v41.0.0
with:
files_ignore: |
buildSrc/**
files: |
**/CHANGELOG.md
- name: Get changed changelog files
id: changed-files
uses: tj-actions/changed-files@v41.0.0
with:
files_ignore: |
plugins/**
files: |
**/CHANGELOG.md
- name: Set up JDK 17
uses: actions/setup-java@v4.1.0
with:
java-version: 17
distribution: temurin
cache: gradle
- name: Set up JDK 17
uses: actions/setup-java@v4.1.0
with:
java-version: 17
distribution: temurin
cache: gradle

- name: Set up Python 3.10
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3
if: ${{ steps.changed-files.outputs.any_changed == 'true' }}
with:
python-version: '3.10'
- name: Set up Python 3.10
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3
if: ${{ steps.changed-files.outputs.any_changed == 'true' }}
with:
python-version: '3.10'

- name: Set up fireci
id: install-fireci
if: ${{ steps.changed-files.outputs.any_changed == 'true' }}
run: pip3 install -e ci/fireci
- name: Set up fireci
id: install-fireci
if: ${{ steps.changed-files.outputs.any_changed == 'true' }}
run: pip3 install -e ci/fireci

- name: Generate comment
id: generate-comment
if: ${{ steps.install-fireci.outcome == 'success' }}
run: |
fireci changelog_comment -c "${{ steps.changed-files.outputs.all_changed_files }}" -o ./changelog_comment.md
- name: Generate comment
id: generate-comment
if: ${{ steps.install-fireci.outcome == 'success' }}
run: |
fireci changelog_comment -c "${{ steps.changed-files.outputs.all_changed_files }}" -o ./changelog_comment.md
- name: Add PR Comment
uses: mshick/add-pr-comment@v2.8.1
continue-on-error: true
with:
status: ${{ steps.generate-comment.outcome }}
message-path: ./changelog_comment.md
message-skipped: |
## Release note changes
No release note changes were detected. If you made changes that should be
present in the next release, ensure you've added an entry in the appropriate
`CHANGELOG.md` file(s).
message-failure: |
## Release note changes
A `CHANGELOG.md` file seems to not match the expected format.
Please ensure your changelog files are following the format as
defined in [our documentation](#).
- name: Add PR Comment
uses: mshick/add-pr-comment@v2.8.1
continue-on-error: true
with:
status: ${{ steps.generate-comment.outcome }}
message-path: ./changelog_comment.md
message-skipped: |
## Release note changes
No release note changes were detected. If you made changes that should be
present in the next release, ensure you've added an entry in the appropriate
`CHANGELOG.md` file(s).
message-failure: |
## Release note changes
A `CHANGELOG.md` file seems to not match the expected format.
Please ensure your changelog files are following the format as
defined in [our documentation](#).
93 changes: 0 additions & 93 deletions build.gradle

This file was deleted.

71 changes: 71 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
/*
* 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.
*/

import com.diffplug.gradle.spotless.SpotlessPlugin
import java.util.regex.Pattern

plugins {
alias(libs.plugins.spotless)
alias(libs.plugins.protobuf) apply false
alias(libs.plugins.errorprone)
alias(libs.plugins.crashlytics) apply false
id("PublishingPlugin")
id("firebase-ci")
id("smoke-tests")
alias(libs.plugins.google.services)
}

extra["targetSdkVersion"] = 34

extra["compileSdkVersion"] = 34

extra["minSdkVersion"] = 21

firebaseContinuousIntegration {
ignorePaths =
listOf(
Pattern.compile(".*\\.gitignore$"),
Pattern.compile(".*\\/.*.md$"),
Pattern.compile(".*\\.gitignore$"),
)
}

fun Project.applySpotless() {
apply<SpotlessPlugin>()
spotless {
java {
target("src/**/*.java")
targetExclude("**/test/resources/**")
googleJavaFormat("1.22.0").reorderImports(true).skipJavadocFormatting()
}
kotlin {
target("src/**/*.kt")
ktfmt("0.41").googleStyle()
}
kotlinGradle {
target("*.gradle.kts") // default target for kotlinGradle
ktfmt("0.41").googleStyle()
}
}
}

applySpotless()

configure(subprojects) { applySpotless() }

tasks.named("clean") { delete(rootProject.layout.buildDirectory) }

apply(from = "gradle/errorProne.gradle")
Loading

0 comments on commit a4a442c

Please sign in to comment.