Skip to content

Commit c7eb32a

Browse files
authored
Migrate to composite plugin (#6608)
Per [b/384990125](https://b.corp.google.com/issues/384990125), This migrates all of our `buildSrc` logic into a composite plugin called `plugins`. This PR makes no attempt to organize the code; that is out-of-scope for the PR. This PR also fixes various references to `buildSrc` (including markdown links), to avoid any breakage.
1 parent 49a637f commit c7eb32a

File tree

98 files changed

+178
-177
lines changed

Some content is hidden

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

98 files changed

+178
-177
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
name: Check buildSrc
1+
name: Check plugins
22

33
on:
44
pull_request:
55
paths:
6-
- 'buildSrc/**'
6+
- 'plugins/**'
77

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

1212
jobs:
13-
build-src-check:
13+
plugins-check:
1414
runs-on: ubuntu-22.04
1515
steps:
1616
- uses: actions/[email protected]
@@ -20,13 +20,13 @@ jobs:
2020
java-version: 17
2121
distribution: temurin
2222
cache: gradle
23-
- name: buildSrc Tests
23+
- name: plugins tests
2424
env:
2525
FIREBASE_CI: 1
2626
run: |
27-
./gradlew -b buildSrc/build.gradle.kts -PenablePluginTests=true check
27+
./gradlew plugins:check
2828
- name: Publish Test Results
2929
uses: EnricoMi/publish-unit-test-result-action@82082dac68ad6a19d980f8ce817e108b9f496c2a
3030
with:
3131
files: "**/build/test-results/**/*.xml"
32-
check_name: "buildSrc Test Results"
32+
check_name: "plugins test results"

.github/workflows/release-note-changes.yml

+49-49
Original file line numberDiff line numberDiff line change
@@ -9,59 +9,59 @@ jobs:
99
build:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/[email protected]
13-
with:
14-
fetch-depth: 0
12+
- uses: actions/[email protected]
13+
with:
14+
fetch-depth: 0
1515

16-
- name: Create output file
17-
run: touch changelog_comment.md
16+
- name: Create output file
17+
run: touch changelog_comment.md
1818

19-
- name: Get changed changelog files
20-
id: changed-files
21-
uses: tj-actions/[email protected]
22-
with:
23-
files_ignore: |
24-
buildSrc/**
25-
files: |
26-
**/CHANGELOG.md
19+
- name: Get changed changelog files
20+
id: changed-files
21+
uses: tj-actions/[email protected]
22+
with:
23+
files_ignore: |
24+
plugins/**
25+
files: |
26+
**/CHANGELOG.md
2727
28-
- name: Set up JDK 17
29-
uses: actions/[email protected]
30-
with:
31-
java-version: 17
32-
distribution: temurin
33-
cache: gradle
28+
- name: Set up JDK 17
29+
uses: actions/[email protected]
30+
with:
31+
java-version: 17
32+
distribution: temurin
33+
cache: gradle
3434

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

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

46-
- name: Generate comment
47-
id: generate-comment
48-
if: ${{ steps.install-fireci.outcome == 'success' }}
49-
run: |
50-
fireci changelog_comment -c "${{ steps.changed-files.outputs.all_changed_files }}" -o ./changelog_comment.md
46+
- name: Generate comment
47+
id: generate-comment
48+
if: ${{ steps.install-fireci.outcome == 'success' }}
49+
run: |
50+
fireci changelog_comment -c "${{ steps.changed-files.outputs.all_changed_files }}" -o ./changelog_comment.md
5151
52-
- name: Add PR Comment
53-
uses: mshick/[email protected]
54-
continue-on-error: true
55-
with:
56-
status: ${{ steps.generate-comment.outcome }}
57-
message-path: ./changelog_comment.md
58-
message-skipped: |
59-
## Release note changes
60-
No release note changes were detected. If you made changes that should be
61-
present in the next release, ensure you've added an entry in the appropriate
62-
`CHANGELOG.md` file(s).
63-
message-failure: |
64-
## Release note changes
65-
A `CHANGELOG.md` file seems to not match the expected format.
66-
Please ensure your changelog files are following the format as
67-
defined in [our documentation](#).
52+
- name: Add PR Comment
53+
uses: mshick/[email protected]
54+
continue-on-error: true
55+
with:
56+
status: ${{ steps.generate-comment.outcome }}
57+
message-path: ./changelog_comment.md
58+
message-skipped: |
59+
## Release note changes
60+
No release note changes were detected. If you made changes that should be
61+
present in the next release, ensure you've added an entry in the appropriate
62+
`CHANGELOG.md` file(s).
63+
message-failure: |
64+
## Release note changes
65+
A `CHANGELOG.md` file seems to not match the expected format.
66+
Please ensure your changelog files are following the format as
67+
defined in [our documentation](#).

buildSrc/build.gradle.kts

-115
This file was deleted.

ci/danger/Dangerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ has_changelog_changes = hasChangesIn(["CHANGELOG"])
4545
# Ignore changes in these directories
4646
$exclude_directories = [
4747
'.github/',
48-
'buildSrc/',
48+
'plugins/',
4949
'ci/',
5050
'encoders/',
5151
'firebase-annotations/',

contributor-docs/onboarding/new_sdk.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ subdirectory with its respective build file(s).
2323

2424
```bash
2525
firebase-android-sdk
26-
├── buildSrc
26+
├── plugins
2727
├── appcheck
2828
│ └── firebase-appcheck
2929
│ └── firebase-appcheck-playintegrity
@@ -45,7 +45,7 @@ Note that the build file name for any given SDK is not `build.gradle` or `build.
4545
but rather mirrors the name of the sdk, e.g.
4646
`firebase-common/firebase-common.gradle` or `firebase-common/firebase-common.gradle.kts`.
4747

48-
All of the core Gradle build logic lives in `buildSrc` and is used by all
48+
All of the core Gradle build logic lives in `plugins` and is used by all
4949
SDKs.
5050

5151
SDKs can be grouped together for convenience by placing them in a directory of

firebase-perf/dev-app/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ firebase-android-sdk$ ./gradlew :firebase-perf:dev-app:devicecheck
8383
There are differences in terms of Firebase projects when running this command in different scenarios.
8484

8585
1. **CI Run**: These tests are run under Firebase Test Lab of the unified Firebase project
86-
(according to [this](https://github.com/firebase/firebase-android-sdk/blob/main/buildSrc/src/main/java/com/google/firebase/gradle/plugins/ci/device/FirebaseTestServer.java))
86+
(according to [this](https://github.com/firebase/firebase-android-sdk/blob/main/plugins/src/main/java/com/google/firebase/gradle/plugins/ci/device/FirebaseTestServer.java))
8787
but the performance events are sent to a different project with which apps are configured with
8888
(see `copyRootGoogleServices` task).
8989

firebase-perf/e2e-app/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ firebase-android-sdk$ ./gradlew :firebase-perf:e2e-app:devicecheck
7575
There are differences in terms of Firebase projects when running this command in different scenarios.
7676

7777
1. **CI Run**: These tests are run under Firebase Test Lab of the unified Firebase project
78-
(according to [this](https://github.com/firebase/firebase-android-sdk/blob/main/buildSrc/src/main/java/com/google/firebase/gradle/plugins/ci/device/FirebaseTestServer.java))
78+
(according to [this](https://github.com/firebase/firebase-android-sdk/blob/main/plugins/src/main/java/com/google/firebase/gradle/plugins/ci/device/FirebaseTestServer.java))
7979
but the performance events are sent to a different project with which apps are configured with
8080
(see `copyRootGoogleServices` task)
8181
and the Prow Configuration in tg/831643).

buildSrc/README.md renamed to plugins/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Build Source
1+
## Plugins
22

33
> [!NOTE]
44
> Eventually, this will be merged with our [contributor documentation](https://firebase.github.io/firebase-android-sdk/).

0 commit comments

Comments
 (0)