Playground / demo app for using Kotlinova architecture. It is simple app that loads data from https://dummyjson.com. Features include:
- 100% Compose (single activity)
- Deep links to every screen
- Configuration change and process deaths handling
- Dark mode support
- Material You support
- Improved support for large screens (two-pane layout for user and post list)
- Offline support (data is saved to database and can be browsed offline)
- Pagination
- List of all reusable Compose components in-app (via Showkase)
- Unit tests for UI and all logic code
- Integration tests that test the whole app, optimized with R8
- Easy to use screenshot tests
- Macrobenchmark
See also other branches:
empty_kotlinova_project
= Empty template project with most of the kotlinova architecture set upempty_project
= Barebones empty project with some essentials pre-created
- Install Git LFS
- Checkout the repo
- Run
git lfs fetch
in the repo
Process for updating all library versions::
RunUntil AGP issue is resolved, auto update is broken. You must open libs.toml, and manually update all versions that are marked in yellow (Lint warning)./gradlew dependencyUpdates :buildSrc:dependencyUpdates --no-configuration-cache > /dev/null && ./gradlew :app:updateLibsToml
. This will check for new versions of all libraries and automatically bump versions insidelibs.toml
.- Check the output of the above task and manually update any libraries that task said it couldn't update automatically.
- Update Gradle version (see instructions in the gradle wrapper's properties)
- Sync the project, build the app and run all tests to make sure everything still works.
- Run
detektDebug
gradle task to find any new deprecated code - For any new deprecated code found by the search:
- If the fix is trivial, fix it immediately as part of the update commit
- Otherwise, make a tech debt ticket and add a @Suppress with the ticket number (and/or discuss with the team how to address it)
- Right click on the root in the project window, select New and then the project type you want
- Add module to
settings.gradle.kts
- Add module to app's
build.gradle.kts
asimplementation(projects.newModule)
)
Every feature should contain following modules:
feature-name
data
- data module with all non-UI logic (such as repositories). No other module (except for top levelapp
) should depend on this.api
- interfaces and data models exposed to other modules. This module should generally contain no logic to speed up builds.ui
- Module containing feature's ui (Screens / Fragments / ViewModels)test
(optional) - Module containing test helpers for all other modules in this group
./gradlew :app:connectedAndroidTest -PtestAppWithProguard
To create screenshot tests for your compose screen:
- Make preview functions public
- Add
showkase
plugin to the module of the screen you want to test - Add
@ShowkaseComposable(group = "Test")
annotation to the preview of the screen you want to test - run
recordPaparazziDebug
gradle task to record golden screenshot (double check that only previews for your screen were generated)