()
| 347 | |
| 348 | |
| 349 | def setup_sdk(): |
| 350 | sdkmanager = android_home / ( |
| 351 | "cmdline-tools/latest/bin/sdkmanager" |
| 352 | + (".bat" if os.name == "nt" else "") |
| 353 | ) |
| 354 | |
| 355 | # Gradle will fail if it needs to install an SDK package whose license |
| 356 | # hasn't been accepted, so pre-accept all licenses. |
| 357 | if not all((android_home / "licenses" / path).exists() for path in [ |
| 358 | "android-sdk-arm-dbt-license", "android-sdk-license" |
| 359 | ]): |
| 360 | run( |
| 361 | [sdkmanager, "--licenses"], |
| 362 | text=True, |
| 363 | capture_output=True, |
| 364 | input="y\n" * 100, |
| 365 | ) |
| 366 | |
| 367 | # Gradle may install this automatically, but we can't rely on that because |
| 368 | # we need to run adb within the logcat task. |
| 369 | if not adb.exists(): |
| 370 | run([sdkmanager, "platform-tools"]) |
| 371 | |
| 372 | |
| 373 | # To avoid distributing compiled artifacts without corresponding source code, |
no test coverage detected
searching dependent graphs…