You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+18-20Lines changed: 18 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,19 @@
1
-
# Android Architecture Blueprints v2
1
+
# Android Architecture Blueprints
2
2
<palign="center">
3
3
<imgsrc="https://github.com/googlesamples/android-architecture/wiki/images/aab-logov2.png"alt="Illustration by Virginia Poltrack"/>
4
4
</p>
5
5
6
6
Android Architecture Blueprints is a project to showcase different architectural approaches to developing Android apps. In its different branches you'll find the same app (a TODO app) implemented with small differences.
* A single-activity architecture, using the **[Navigation component](https://developer.android.com/guide/navigation/navigation-getting-started)** to manage fragment operations.
11
-
* A presentation layer that contains a fragment (View) and a **ViewModel** per screen (or feature).
12
-
* Reactive UIs using **LiveData**observables and **Data Binding**.
13
-
* A **data layer** with a repository and two data sources (local using Room and remote) that are queried with one-shot operations (no listeners or data streams).
14
-
* Two **product flavors**, `mock` and `prod`, [to ease development and testing](https://android-developers.googleblog.com/2015/12/leveraging-product-flavors-in-android.html) (except in the Dagger branch).
9
+
*User Interface built with **[Jetpack Compose](https://developer.android.com/jetpack/compose)**
10
+
* A single-activity architecture, using **[Navigation Compose](https://developer.android.com/jetpack/compose/navigation)**.
11
+
* A presentation layer that contains a Compose screen (View) and a **ViewModel** per screen (or feature).
12
+
* Reactive UIs using **[LiveData](https://developer.android.com/topic/libraries/architecture/livedata)** and **[coroutines](https://kotlinlang.org/docs/coroutines-overview.html)** for asynchronous operations.
13
+
* A **data layer** with a repository and two data sources (local using Room and a fake remote).
14
+
* Two **product flavors**, `mock` and `prod`, [to ease development and testing](https://android-developers.googleblog.com/2015/12/leveraging-product-flavors-in-android.html).
15
15
* A collection of unit, integration and e2e **tests**, including "shared" tests that can be run on emulator/device or Robolectric.
16
+
* A simple service locator for inversion of control.
16
17
17
18
## Variations
18
19
@@ -21,13 +22,10 @@ This project hosts each sample app in separate repository branches. For more inf
21
22
### Stable samples - Kotlin
22
23
| Sample | Description |
23
24
| ------------- | ------------- |
24
-
|[master](https://github.com/googlesamples/android-architecture/tree/master)| The base for the rest of the branches. <br/>Uses Kotlin, Architecture Components, coroutines, Data Binding, etc. and uses Room as source of truth, with a reactive UI. |
25
-
|[dagger-android](https://github.com/googlesamples/android-architecture/tree/dagger-android)<br/>[[compare](https://github.com/googlesamples/android-architecture/compare/dagger-android#files_bucket)]| A simple Dagger setup that uses `dagger-android` and removes the two flavors. |
26
-
|[usecases](https://github.com/googlesamples/android-architecture/tree/usecases)<br/>[[compare](https://github.com/googlesamples/android-architecture/compare/usecases#files_bucket)]| Adds a new domain layer that uses UseCases for business logic. |
27
-
28
-
### Old samples - Kotlin and Java
29
-
30
-
Blueprints v1 had a collection of samples that are not maintained anymore, but can still be useful. See [all project branches](https://github.com/googlesamples/android-architecture/branches).
25
+
|[main](https://github.com/googlesamples/android-architecture/tree/main)| This branch |
26
+
|[hilt](https://github.com/googlesamples/android-architecture/tree/hilt)| A simple Hilt setup that removes the two flavors and service locator (not using Compose yet) |
27
+
|[usecases](https://github.com/googlesamples/android-architecture/tree/usecases)| Adds a new domain layer that uses UseCases for business logic (not using Compose yet) |
28
+
|[views](https://github.com/googlesamples/android-architecture/tree/views)| Uses Views instead of Jetpack Compose to render UI elements on the screen |
31
29
32
30
## Why a to-do app?
33
31
@@ -37,9 +35,9 @@ The app in this project aims to be simple enough that you can understand it quic
37
35
38
36
## What is it not?
39
37
40
-
* A UI/Material Design sample. The interface of the app is deliberately kept simple to focus on architecture. Check out [Plaid](https://github.com/android/plaid) instead.
41
-
* A complete Jetpack sample covering all libraries. Check out [Android Sunflower](https://github.com/googlesamples/android-sunflower) or the advanced [Github Browser Sample](https://github.com/googlesamples/android-architecture-components/tree/master/GithubBrowserSample) instead.
42
-
* A real production app with network access, user authentication, etc. Check out the [Google I/O app](https://github.com/google/iosched), [Santa Tracker](https://github.com/google/santa-tracker-android) or [Tivi](https://github.com/chrisbanes/tivi) for that.
38
+
* A UI/Material Design sample. The interface of the app is deliberately kept simple to focus on architecture. Check out the [Compose Samples](https://github.com/android/compose-samples) instead.
39
+
* A complete Jetpack sample covering all libraries. Check out [Android Sunflower](https://github.com/googlesamples/android-sunflower) or the advanced [GitHub Browser Sample](https://github.com/googlesamples/android-architecture-components/tree/master/GithubBrowserSample) instead.
40
+
* A real production app with network access, user authentication, etc. Check out the [Google I/O app](https://github.com/google/iosched) instead.
43
41
44
42
## Who is it for?
45
43
@@ -53,7 +51,7 @@ To open one of the samples in Android Studio, begin by checking out one of the s
0 commit comments