Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replaced the buildSrc plugin with discrete build files #2107

Merged
merged 2 commits into from
Nov 27, 2024

Conversation

lemnik
Copy link
Contributor

@lemnik lemnik commented Nov 18, 2024

Goal

Break up the build plugin moving the majority of the build logic back into the build.gradle.kts files.

The build plugin within buildSrc created a Gradle classpath structure and plugin application order that has blocked various upgrades (AGP and Kotlin mostly). By splitting up the build plugin and moving to simpler utility functions, we can upgrade components and then migrate more of the build logic back into utilities when/if we can.

Design

The common version details have been rearranged within the Versions object, which now includes a ModuleWithVersion utility class. This serves a similar purpose to a Gradle Version catalog, but can easily be used from within the build sources (buildSrc) and therefore used within utility functions (such as addCommonModuleDependencies() and loadDefaultPlugins()).

Testing

The existing build steps all still work without change. Manually published to Sonatype staging repository.

@lemnik lemnik force-pushed the PLAT-13038/build-rework branch from 86c9040 to 77699e1 Compare November 18, 2024 12:03
@bugsnagbot
Copy link
Collaborator

bugsnagbot commented Nov 18, 2024

Android notifier sizes

Format Size impact of Bugsnag (kB) Size impact of Bugsnag when Minified (kB)
APK 1864.02 1675.78
arm64_v8a 643.33 450.82
armeabi_v7a 577.8 385.29
x86 717.04 528.62
x86_64 688.38 495.86

Generated by 🚫 Danger

@lemnik lemnik force-pushed the PLAT-13038/build-rework branch 6 times, most recently from 3131afd to 6d9443a Compare November 18, 2024 16:25
Copy link
Contributor

@tomlongridge tomlongridge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - largely going on looking for inconsistencies and letting the build speak for itself. Seems like a good approach.

Copy link
Contributor

@YYChen01988 YYChen01988 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lemnik lemnik force-pushed the PLAT-13038/build-rework branch from 6d9443a to 7f86a25 Compare November 27, 2024 09:12
@lemnik lemnik merged commit dc76620 into next Nov 27, 2024
34 checks passed
@lemnik lemnik deleted the PLAT-13038/build-rework branch November 27, 2024 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants