@@ -17,7 +17,8 @@ object app extends AndroidAppKotlinModule with AndroidBuildConfig with AndroidHi
17
17
def kspVersion = "1.0.28"
18
18
19
19
def androidApplicationNamespace = "com.example.android.architecture.blueprints.todoapp"
20
- def androidApplicationId = "com.example.android.architecture.blueprints.main"
20
+ // TODO change this to com.example.android.architecture.blueprints.main when mill supports build variants
21
+ def androidApplicationId = "com.example.android.architecture.blueprints.todoapp"
21
22
22
23
def androidSdkModule = mill.define.ModuleRef(androidSdkModule0)
23
24
@@ -29,11 +30,10 @@ object app extends AndroidAppKotlinModule with AndroidBuildConfig with AndroidHi
29
30
30
31
def androidIsDebug = true
31
32
32
- def mvnDeps: T[Agg [Dep]] = Agg (
33
+ def mvnDeps: T[Seq [Dep]] = Seq (
33
34
mvn"androidx.core:core-ktx:1.15.0",
34
35
mvn"androidx.appcompat:appcompat:1.7.0",
35
36
mvn"androidx.annotation:annotation:1.9.1",
36
- mvn"org.jetbrains.kotlinx:kotlinx-coroutines-android:1.9.0",
37
37
mvn"com.jakewharton.timber:timber:5.0.1",
38
38
mvn"androidx.test.espresso:espresso-idling-resource:3.6.1",
39
39
mvn"androidx.room:room-runtime:2.6.1",
@@ -42,37 +42,34 @@ object app extends AndroidAppKotlinModule with AndroidBuildConfig with AndroidHi
42
42
mvn"androidx.activity:activity-compose:1.10.0",
43
43
mvn"androidx.compose.foundation:foundation:1.7.6",
44
44
mvn"androidx.compose.animation:animation-core:1.7.6",
45
- mvn"androidx.compose.foundation:foundation-android:1.7.6",
46
45
mvn"androidx.compose.foundation:foundation-layout:1.7.6",
47
46
mvn"androidx.compose.animation:animation:1.7.6",
48
47
mvn"androidx.compose.material3:material3:1.3.1",
49
48
mvn"androidx.compose.material:material:1.7.6",
50
- mvn"androidx.compose.material:material-android:1.7.6",
51
49
mvn"androidx.compose.material:material-icons-core:1.7.6",
52
- mvn"androidx.compose.material:material-ripple-android:1.7.6",
53
50
mvn"androidx.compose.material:material-icons-extended:1.7.6",
54
51
mvn"androidx.compose.ui:ui-tooling-preview:1.7.6",
55
52
mvn"androidx.navigation:navigation-compose:2.8.5",
56
53
mvn"androidx.compose.ui:ui:1.7.6",
57
- mvn"androidx.compose.ui:ui-android:1.7.6",
58
54
mvn"androidx.compose.ui:ui-unit:1.7.6",
59
55
mvn"androidx.compose.ui:ui-text:1.7.6",
56
+ mvn"androidx.emoji2:emoji2:1.3.0",
60
57
mvn"androidx.compose.ui:ui-graphics:1.7.6",
61
- mvn"androidx.compose.ui:ui:1.7.6",
58
+ mvn"androidx.lifecycle:lifecycle-common:2.8.7",
59
+ mvn"androidx.lifecycle:lifecycle-process:2.8.7",
62
60
mvn"androidx.lifecycle:lifecycle-runtime-compose:2.8.7",
63
61
mvn"androidx.lifecycle:lifecycle-viewmodel-compose:2.8.7",
64
- mvn"androidx.lifecycle:lifecycle-viewmodel-compose-android:2.8.7",
65
- mvn"com.google.accompanist:accompanist-appcompat-theme:0.36.0"
66
- .exclude("androix.appcompat" -> "appcompat"),
67
- mvn"androidx.compose.material:material-icons-core-android:1.7.6",
62
+ mvn"androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.7",
63
+ mvn"com.google.accompanist:accompanist-appcompat-theme:0.36.0",
68
64
mvn"com.google.dagger:hilt-android:2.56",
69
65
mvn"androidx.hilt:hilt-navigation-compose:1.2.0",
70
66
mvn"com.google.accompanist:accompanist-swiperefresh:0.36.0",
71
67
mvn"androidx.compose:compose-bom:2024.12.01",
72
- mvn"androidx.customview:customview-poolingcontainer:1.0.0"
68
+ mvn"androidx.customview:customview-poolingcontainer:1.0.0",
69
+ mvn"androidx.tracing:tracing:1.2.0"
73
70
)
74
71
75
- def kotlinSymbolProcessors: T[Agg [Dep]] = Agg (
72
+ def kotlinSymbolProcessors: T[Seq [Dep]] = Seq (
76
73
mvn"androidx.room:room-compiler:2.6.1",
77
74
mvn"com.google.dagger:hilt-android-compiler:2.56"
78
75
)
@@ -83,28 +80,6 @@ object app extends AndroidAppKotlinModule with AndroidBuildConfig with AndroidHi
83
80
)
84
81
}
85
82
86
- private val dependencyPinning = Map(
87
- "android.collection" -> "1.4.4",
88
- "androidx.lifecycle" -> "2.8.7",
89
- "androidx.compose.runtime" -> "1.7.6",
90
- "androidx.compose.material" -> "1.7.6",
91
- "androidx.compose.ui" -> "1.7.6",
92
- "androidx.appcompat" -> "1.7.0",
93
- "androidx.emoji2" -> "1.3.0",
94
- "androidx.activity" -> "1.10.0",
95
- "androidx.compose.foundation" -> "1.7.6",
96
- "androidx.compose.animation" -> "1.7.6",
97
- "androidx.collection" -> "1.4.2"
98
- )
99
- // This is a temporary fix
100
- def mapDependencies: Task[coursier.Dependency => coursier.Dependency] = Task.Anon {
101
- super.mapDependencies().andThen { (d: coursier.Dependency) =>
102
- // otherwise there are some resolution problems (version conflicts), because Coursier is using pom files only,
103
- // but Gradle is working with .module files if available
104
- dependencyPinning.get(d.module.organization.value).map(d.withVersion).getOrElse(d)
105
- }
106
- }
107
-
108
83
object test extends AndroidAppKotlinTests with TestModule.Junit4 {
109
84
def mvnDeps = super.mvnDeps() ++ Agg(
110
85
mvn"junit:junit:4.13.2"
@@ -119,6 +94,29 @@ object app extends AndroidAppKotlinModule with AndroidBuildConfig with AndroidHi
119
94
120
95
/** Usage
121
96
122
- > ./mill app.androidDex
97
+ > ./mill app.androidApk
98
+
99
+ > ./mill show app.createAndroidVirtualDevice
100
+ ...Name: test, DeviceId: medium_phone...
101
+
102
+ > ./mill show app.startAndroidEmulator
103
+
104
+ > ./mill show app.androidInstall
105
+ ...All files should be loaded. Notifying the device...
106
+
107
+ > ./mill show app.androidRun --activity com.example.android.architecture.blueprints.todoapp.TodoActivity
108
+ [
109
+ "Starting: Intent { cmp=com.example.android.architecture.blueprints.todoapp/.TodoActivity }",
110
+ "Status: ok",
111
+ "LaunchState: COLD",
112
+ "Activity: com.example.android.architecture.blueprints.todoapp/.TodoActivity",
113
+ "TotalTime: ...",
114
+ "WaitTime: ...",
115
+ "Complete"
116
+ ]
117
+
118
+ > ./mill show app.stopAndroidEmulator
119
+
120
+ > ./mill show app.deleteAndroidVirtualDevice
123
121
124
122
*/
0 commit comments