[Dependency Analysis] Add Android Gradle Plugin #21022
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Project Thread: paaHJt-6yU-p2
Required By: BuildkiteCI#456
This PR adds the dependency analysis Android Gradle plugin to this project, for dependency analysis purposes. Also, a custom meta-data is added to the dependency analysis scheduled build so that it can be easily queried via Buildkite's REST API.
For now, only the main
buildHealth
task is going to be utilized and produce data once every week on CI (see this commit and this PR). Amongst other, this data will include the following:projectCount
)unusedCount
)undeclaredCount
)misDeclaredCount
)compileOnlyCount
)runtimeOnlyCount
)Afterward, this data will get collected from CI and uploaded to our Apps Metrics infrastructure, for visualization and alerting purposes.
To Test:
./gradlew buildHealth
task and verify that under the root levelbuild/reports/dependency-analysis
folder you get the below 2 reports both, in JSON and text format:build-health-report.json
build-health-report.txt
New Build
🟢 CI button for WPAndroid, test this standalone dependency analysis job (see form below). Then:/meta-data
to that CI build's URL (example) will give you one extra meta-data, theschedule-build
one, with a value ofdependency-analysis
(see screenshot below):build/reports/dependency-analysis/build-health-report.json
build/reports/dependency-analysis/build-health-report.txt
https://api.buildkite.com/v2/organizations/automattic/pipelines/wordpress-android/builds?meta_data[scheduled-build]=dependency-analysis
Regression Notes: (
N/A
)PR Submission Checklist:
RELEASE-NOTES.txt
if necessary.Testing Checklist (strike-out the not-applying and unnecessary ones):
N/A