Skip to content

Commit 80f2028

Browse files
authored
Rework Android SDK installation (#5766)
This refactors the task dependency flow of `AndroidSdkModule`. Previously, most tasks provided `PathRef`s to tools depending itself on some anonymous installation tasks which needed to synchronize their work. Now, the installation steps are bound to single tasks, which return a handle to the installed resources. These tasks are: * `cmdlineTools` * `androidSdk` * `androidNdk` Existing tasks pointing to various resources and executables, now just depend on these installation tasks and simply forward the returned resources. Additional on Windows, tools will be searched for with the extensions `exe` and `bat`. This is not the final design, but a step forward in making the setup more idiomatic and readable. Pull request: #5766
1 parent b979594 commit 80f2028

File tree

2 files changed

+135
-64
lines changed

2 files changed

+135
-64
lines changed

libs/androidlib/src/mill/androidlib/AndroidAppModule.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ trait AndroidAppModule extends AndroidModule { outer =>
535535
*/
536536
def createAndroidVirtualDevice(): Command[String] = Task.Command(exclusive = true) {
537537
val command = os.call((
538-
androidSdkModule().avdExe().path,
538+
androidSdkModule().avdmanagerExe().path,
539539
"create",
540540
"avd",
541541
"--name",
@@ -558,7 +558,7 @@ trait AndroidAppModule extends AndroidModule { outer =>
558558
*/
559559
def deleteAndroidVirtualDevice: T[os.CommandResult] = Task {
560560
os.call((
561-
androidSdkModule().avdExe().path,
561+
androidSdkModule().avdmanagerExe().path,
562562
"delete",
563563
"avd",
564564
"--name",

0 commit comments

Comments
 (0)