Documentation
¶
Overview ¶
Package androiddriver exposes the prebuilt UiAutomator driver APKs as an embedded filesystem, so the Tales binary can install them on a device without the Android SDK being present.
Unlike the Apple driver — whose Swift source is embedded and compiled on first use, because building it needs Xcode which every iOS host already has — the Android driver ships as built artifacts. Requiring the Android SDK just to *run* a test would be a steep toll for a single-binary tool, so the APKs are built once, committed, and embedded. `make check-android-driver-fresh` guards against them drifting from the Kotlin source.
Index ¶
Constants ¶
const ( AppAPKName = "tales-driver.apk" TestAPKName = "tales-driver-test.apk" // SentinelName holds the SHA-256 of the Kotlin sources the committed // APKs were built from. SentinelName = "source.sha256" )
File names of the two APKs. The app APK is an empty shell that owns the driver's package and permissions; the test APK carries the instrumentation that actually serves the driver.
const PrebuiltRoot = "prebuilt"
PrebuiltRoot is the directory holding the committed artifacts inside the embedded filesystem.
Variables ¶
var ErrNotBuilt = errors.New("the Android driver APKs are not embedded in this build")
ErrNotBuilt reports that the driver APKs are absent from the binary. This happens in a working tree where the driver has never been built; a released binary always carries them.
Functions ¶
func Available ¶
func Available() bool
Available reports whether this binary carries usable driver APKs.
func SourceHash ¶
SourceHash returns the recorded hash of the Kotlin sources the embedded APKs were built from. It identifies a driver build, and feeds the on-device install cache key so a device is not reinstalled on every run.
Types ¶
This section is empty.