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: website/blog/modules/ROOT/pages/15-android-build-flow.adoc
+39-11Lines changed: 39 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,9 @@ _{author}, {revdate}_
10
10
Until recently, Gradle was the only realistic option for Android builds. Today, Mill - a fast, predictable build tool for Java, Scala, and Kotlin - can build Android applications end-to-end.
11
11
12
12
In less than a year, Mill went from minimal Android support to producing installable APKs for projects as complex as xref:mill::android/hilt-sample.adoc[the Android Architecture Samples] and https://github.com/vaslabs/Pokedex_Compose_Multi_Module/tree/testing-mill[multi-module apps] with xref:mill::android/java.adoc#_using_third_party_native_libraries[native code] and xref:mill::android/compose-samples.adoc[Jetpack Compose].
image:AndroidPokedexMultimoduleExample.png[A multi-module Android app built with Mill, showing a list of Pokémon and details for each pokemon.]
13
16
14
17
This was possible because Mill’s design, incremental, transparent, and extensible maps surprisingly well onto Android’s intricate build process.
15
18
@@ -146,35 +149,60 @@ The diagram above still doesn’t tell the whole story! It shows a typical build
146
149
147
150
We cover a lot of these architecture styles in various Android examples, based on xref:mill::android/java.adoc[Java], xref:mill::android/kotlin.adoc[Kotlin] and third party integration examples covering xref:mill::android/compose-samples.adoc[Android Compose], xref:mill::android/android-native-example.adoc[Android Native] and xref:mill::android/hilt-sample.adoc[Dependency Injection with Hilt].
148
151
152
+
Endless tunnel sample app
153
+
image:AndroidEndlessTunnelExample.png[An Android app built with Mill using native code, showing a 3D tunnel effect.]
149
154
150
155
== Try it out
151
156
152
157
Mill’s Android support is still young, but it already covers the full build pipeline: resource compilation, manifest merging, packaging, signing, running, and even testing on emulators. This is possible thanks to Mill’s core design, fast, incremental, transparent, and extensible, which maps Android’s intricate flow into understandable, inspectable build targets.
153
158
154
159
If you’re curious, the best way to appreciate this is to try it yourself:
155
160
156
-
Clone one of the example Android projects (Compose, Native code, Hilt DI, etc).
161
+
Get the `architecture-samples` containing the Todo App.
./mill show app.androidRun --activity com.example.android.architecture.blueprints.todoapp.TodoActivity
176
194
----
177
195
196
+
Run the instrumented tests and watch the app being tested inside the emulator:
197
+
198
+
[source,bash]
199
+
----
200
+
./mill app.androidTest
201
+
----
202
+
203
+
The Android Todo App built with Mill
204
+
image:AndroidTodoExample.png[The Todo app built with Mill, showing a list of tasks and a button to add new tasks.]
205
+
178
206
You may also inspect xref:mill::android/android-initial-setup.adoc[the getting started docs] to find out more.
179
207
180
208
We’d love feedback from the Android community, whether it’s bug reports, feature requests, or success stories. If you’ve ever wished Android builds felt less like a black box, Mill is worth a look.
0 commit comments