Platforms
Android builds
Build an Expo app as a release APK that trusts danwo's proxy, and reuse it until its sources change.
An Android app trusts only the system's certificates unless its build says otherwise. danwo's
proxy has its own certificate, created for each run. danwo build-android builds your Expo app so
it trusts it.
Build it
npx @danwo/cli build-android appapp is the folder of your Expo project. danwo:
- runs
expo prebuild; - adds a network security config that also trusts user-installed certificates, where danwo puts each run's;
- runs
gradlew assembleReleasewithDANWO=1, using Android Studio's JDK whenJAVA_HOMEis unset.
The JavaScript is bundled into the APK, so no Metro server runs during tests. Gradle runs with
--no-daemon and compiles Kotlin in its own process, so the build leaves no Gradle or Kotlin
daemon running.
Reuse it
The APK is kept under <project>/.danwo/builds/, keyed by a hash of the app's sources. An
unchanged app isn't built again. Force a rebuild with --force.
Build it from the config
buildAndroid from @danwo/expo does the same inside your environment, so a test run always has
a current build:
import { buildAndroid } from "@danwo/expo"
export async function currentApk(): Promise<string> {
const build = await buildAndroid({ project: "app" })
return build.apk
}This build trusts user-installed certificates. Use it only for testing; ship your store builds without it.