дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-05 17:47:08 +02:00
* feat(run): choose the run device from plugin device providers Plugins can declare device providers (`[[contributes.devices]]`): a program that lists simulators, emulators or phones as JSON, the run configurations it applies to, and how a chosen device reaches the run (extra arguments, environment, an optional prepare step that boots it). The title bar shows a device chooser for the selected configuration; Run and Debug prepare the chosen device first. Before-launch and build-on-update runs skip the device. * feat(plugins): document run devices and require plugin API 1.21 `[[contributes.devices]]` now needs `engines.openidea = "^1.21"` and uses camelCase fields (`appliesTo`, `runArgs`) like the other run contribution points. The plugin README, the manifest reference and the API versions page (en/zh) describe it, and `plugins/official/android-devices` is a small example that lists the devices adb sees for Gradle install tasks. * fix(plugins): harden device runner process handling, guard refresh races, verbatim headers, and add en.json entries * fix(plugins): use portable process:sh capability in android-devices example and README --------- Co-authored-by: l0ng-ai <[email protected]>
23 рядки
860 B
TOML
23 рядки
860 B
TOML
# A device provider is data only: a program that lists devices, no `wasm`.
|
|
id = "openidea.android-devices"
|
|
name = "Android Devices (API Example)"
|
|
version = "0.1.0"
|
|
description = "Lists the emulators and phones adb sees and runs Gradle install tasks on the chosen one; see the package README."
|
|
authors = ["OpenIDEA contributors"]
|
|
license = "Apache-2.0"
|
|
engines.openidea = "^1.21"
|
|
|
|
[capabilities]
|
|
# `process:sh` runs `devices/list.sh`, which calls `adb` from PATH.
|
|
required = ["process:sh"]
|
|
|
|
[[contributes.devices]]
|
|
id = "android"
|
|
name = "Android Devices"
|
|
command = "sh"
|
|
args = ["./devices/list.sh"]
|
|
# Gradle install and connected test tasks: `./gradlew :app:installDebug`.
|
|
appliesTo = '\b(install\w+|connected\w*AndroidTest)\b'
|
|
# adb, and the Android Gradle plugin's install tasks, use the device ANDROID_SERIAL names.
|
|
env = { ANDROID_SERIAL = "${device.id}" }
|