refactor(build): Create a dedicated analytics convention plugin#3961
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3961 +/- ##
=====================================
Coverage 0.52% 0.52%
=====================================
Files 394 394
Lines 23170 23170
Branches 2943 2943
=====================================
Hits 122 122
Misses 23027 23027
Partials 21 21 ☔ View full report in Codecov by Sentry. |
This commit centralizes the analytics and crash reporting configuration into a new `meshtastic.analytics` convention plugin. This simplifies the `app/build.gradle.kts` and `core/analytics/build.gradle.kts` files and makes the build logic more modular and reusable. - Created `AnalyticsConventionPlugin.kt` to handle the application of Google Services, Firebase Crashlytics, and DataDog plugins for the `google` product flavor. - Registered the new `meshtasticAnalytics` convention plugin in `build-logic/convention/build.gradle.kts`. - Applied the new convention plugin to the main `app` module. - Moved the application of analytics-related plugins from the `app` module's `build.gradle.kts` to the new convention plugin. - Changed analytics dependencies in the `core-analytics` module from `googleImplementation` to `googleApi` to ensure they are correctly exposed to the `app` module which now applies the necessary plugins. Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
c5b17b2 to
bc9a91f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This centralizes the analytics and crash reporting configuration into a new
meshtastic.analyticsconvention plugin. This simplifies theapp/build.gradle.ktsandcore/analytics/build.gradle.ktsfiles and makes the build logic more modular and reusable.AnalyticsConventionPlugin.ktto handle the application of Google Services, Firebase Crashlytics, and DataDog plugins for thegoogleproduct flavor.meshtasticAnalyticsconvention plugin inbuild-logic/convention/build.gradle.kts.appmodule.appmodule'sbuild.gradle.ktsto the new convention plugin.core-analyticsmodule fromgoogleImplementationtogoogleApito ensure they are correctly exposed to theappmodule which now applies the necessary plugins.