A comprehensive collection of modular Android libraries providing utilities, extensions, and common functionality for modern Android development.
Android Commons is a curated set of libraries designed to accelerate Android development by providing reusable components and utilities. Each module is independent, allowing you to include only what you need, keeping your app size minimal.
- π― Modular Architecture - Include only the modules you need
- π Modern Android - Built with Kotlin, Coroutines, and Jetpack Compose
- π§ͺ Tested - Unit tests with coverage reported to Codecov
- π¦ Small Footprint - Minimal dependencies per module
- π Active Maintenance - Regular updates and improvements
| Module | Description | Documentation | Latest Version |
|---|---|---|---|
| Bill of Materials | |||
commons-bom |
BOM for version management | - | |
| Core & Android | |||
commons-core |
Core utilities and extensions | π Docs | |
commons-android |
Android-specific utilities and extensions | π Docs | |
commons-android-compose |
Jetpack Compose utilities | π Docs | |
commons-android-test |
Android testing utilities | π Docs | |
| Storage (Room) | |||
commons-android-room |
Room BaseDao helpers |
π Docs | |
| Async & Concurrency | |||
commons-coroutines |
Kotlin Coroutines extensions | π Docs | |
commons-coroutines-test |
Coroutines testing utilities | π Docs | |
| Networking | |||
commons-network |
Network utilities and interceptors | π Docs | |
| Pagination | |||
commons-pagination |
Base pagination framework | π Docs | |
commons-pagination-co |
Coroutines-based pagination | π Docs | |
| Permissions | |||
commons-permissions |
Runtime permissions management | π Docs | |
| Storage | |||
commons-preferences |
SharedPreferences JSON extensions (kotlinx.serialization) |
π Docs | |
| Date & Time | |||
commons-time |
java.time date/time extensions (no init needed) |
π Docs |
Commons holds app-agnostic utilities with no DI framework, no Firebase/Play SDKs and no opinionated UI/design system. Framework pieces (DI, use case contracts, Failure, screen framework, theme) belong in android-platform.
commons-threetenabp, commons-threetenabp-test (use commons-time) and commons-android-binding were removed; last published versions remain on Maven Central.
Unused public APIs were removed in the next major version of each module. Each module README lists them, with the suggested replacement, in its "Removed in" section.
- Min SDK: 28 (Android 9)
- Target SDK: 36 (Android 16)
- Compile SDK: 36
- Kotlin: 2.3+
- Java: 17
The Bill of Materials (BOM) manages all library versions automatically, ensuring compatibility between modules.
dependencies {
// Import the BOM with the latest version (check badge above)
implementation(platform("com.raxdenstudios:commons-bom:<latest-version>"))
// Add modules without specifying versions
implementation("com.raxdenstudios:commons-core")
implementation("com.raxdenstudios:commons-android")
implementation("com.raxdenstudios:commons-android-compose")
implementation("com.raxdenstudios:commons-android-room")
implementation("com.raxdenstudios:commons-coroutines")
implementation("com.raxdenstudios:commons-network")
implementation("com.raxdenstudios:commons-pagination")
implementation("com.raxdenstudios:commons-pagination-co")
implementation("com.raxdenstudios:commons-permissions")
implementation("com.raxdenstudios:commons-preferences")
implementation("com.raxdenstudios:commons-time")
// Testing modules
testImplementation("com.raxdenstudios:commons-coroutines-test")
testImplementation("com.raxdenstudios:commons-android-test")
}Benefits of using BOM:
- β No need to specify versions for each module
- β Guaranteed compatibility between all modules
- β Easier updates - just change the BOM version
- β Prevents version conflicts
Run the unit tests with:
./gradlew testDebugUnitTestFor coverage reports:
./gradlew testDebugUnitTest coverageReportDetailed documentation for each module is available in their respective directories:
- Core
- Android
- Android Compose
- Android Test
- Android Room
- Coroutines
- Coroutines Test
- Network
- Pagination
- Pagination Coroutines
- Permissions
- Preferences
- Time
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Copyright 2015 Γngel GΓ³mez
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.