Capacitor
A Capacitor app has native projects under android/ and ios/, next to the web app. The capacitor source kind points at the app directory and finds the right files:
| Target type | Resolves to |
|---|---|
android |
<dir>/android/app/build.gradle |
ios |
<dir>/ios/App/App.xcodeproj |
targets: { android: { type: "android", source: { kind: "capacitor", dir: "apps/mobile" } }, ios: { type: "ios", source: { kind: "capacitor", dir: "apps/mobile" } },}launchset init finds capacitor.config.* and prefers this kind.
Details
Section titled “Details”- For Android it is the same as
gradleon that file, so the same rules apply: literalversionCodeandversionNameindefaultConfig. If bothbuild.gradleandbuild.gradle.ktsexist, launchset fails instead of guessing. - For iOS it is the same as
xcodeproj. You can limit the native targets withxcodeTargets. - The
diris relative to the repo root. Use"."when the Capacitor app is the repo root. - The web part of the app is usually a web target or part of the native build (
npx cap syncbefore the native build).
Build steps
Section titled “Build steps”Run npm ci, your web build and npx cap sync before the Gradle or Xcode step, after stamp:
- run: npm ci && npm run build && npx cap sync android if: matrix.target == 'android' && steps.verify.outputs.already-published != 'true'cap sync copies web assets into the native projects. It doesn’t touch the version files that launchset stamped.