Meshtastic-Android
Meshtastic-Android copied to clipboard
feat(build): Upgrade to AGP 9.0 and refactor build logic
This commit upgrades the Android Gradle Plugin to v9.0.0-beta02 and refactors the build logic to improve modularity, maintainability, and compatibility with the new plugin version.
Key changes include:
-
AGP 9.0.0-beta02 Upgrade:
- Updated the Android Gradle Plugin from 8.13.1 to 9.0.0-beta02.
- Replaced deprecated
androidextension access with theandroidComponentsAPI for variant configuration inapp/build.gradle.kts. - Removed obsolete
com.android.libraryandorg.jetbrains.kotlin.androidplugin aliases, centralizing plugin management in convention plugins. - Set
android.newDsl=falseingradle.propertiesto maintain compatibility with existing build scripts during the transition.- Hilt is our big blocker here.
-
Build Logic Refactoring:
- Centralized SDK and Java version configurations into
config.properties, accessed via a newconfigPropertiesextension inProjectExtensions.kt. - Updated
KotlinAndroid.ktandKmpLibraryConventionPlugin.ktto readcompileSdk,minSdk, andtargetSdkfrom the centralized properties. - Removed redundant plugin applications (e.g.,
com.android.library,org.jetbrains.kotlin.android) from individual convention plugins (AndroidLibraryConventionPlugin,AndroidApplicationConventionPlugin, etc.), as they are now handled by base plugins. - Simplified
AndroidCompose.ktby removing dependency declarations now handled by thecompose-compilerplugin.
- Centralized SDK and Java version configurations into
-
Domain Layer and UseCase:
- Introduced a new
core:domainmodule to encapsulate business logic. - Created
SavePacketLogsUseCaseto abstract the logic for exporting packet logs to a CSV file, moving this responsibility out ofSettingsViewModel. SettingsViewModelnow callsSavePacketLogsUseCasefor data export, simplifying its implementation.
- Introduced a new
-
Testing Improvements:
- Added
testFixturesto thecore:modelmodule. - Created
NodeInfoFixtures.ktto provide reusableNodeInfoobjects for tests. - Refactored
NodeInfoTest.ktto use the new fixtures.
- Added
:warning: JUnit XML file not found
The CLI was unable to find any JUnit XML files to upload. For more help, visit our troubleshooting guide.