Skip to content

refactor(tauri): fold mobile into asset-tauri + align Tauri versions - #71

Open
Armaldio wants to merge 7 commits into
developfrom
codespace-psychic-happiness-7r6rvwwjj53r5qr
Open

refactor(tauri): fold mobile into asset-tauri + align Tauri versions#71
Armaldio wants to merge 7 commits into
developfrom
codespace-psychic-happiness-7r6rvwwjj53r5qr

Conversation

@Armaldio

Copy link
Copy Markdown
Member

Summary

  • Removed the redundant standalone apps/mobile package; mobile (Android/iOS) builds now go through the @pipelab/asset-tauri template, which already drives tauri android/ios build.
  • assets/asset-tauri/template/src-tauri/src/lib.rs: register shell/fs/opener plugins on every platform; devtools/localhost are desktop-only via #[cfg(desktop)] guards.
  • assets/asset-tauri/template/src-tauri/Cargo.toml: aligned Tauri crate versions to 2.11.5 (removes the 2.1.1 drift vs the previously separate mobile app).
  • packages/core-node/src/utils/remote.ts: fetchPipelabAsset now also resolves the local asset via PIPELAB_ASSET_ROOT (in addition to the auto-detected monorepo root), so a published CLI can be pointed at a local asset checkout. PIPELAB_FORCE_NPM=true still forces the published asset.
  • plugins/plugin-tauri/src/tauri.ts: preserve app.mobile config for mobile builds (previously always deleted).
  • Removed stale Cargo.lock / nested pnpm-lock.yaml that pinned @tauri-apps/api@2.1.1; added a changeset.

Test plan

  • Verified Cargo.toml (valid TOML) and no 2.1.1 references remain in the asset.
  • Verified local-asset resolution logic (path exists) + code read of fetchPipelabAsset.
  • A full Tauri build (APK/desktop) cannot run in the sandbox (no make/pkg-config/system libs), so this is validated at code/manifest level.

🤖 Generated with opencode

- Build Android (and iOS) apps via `tauri <platform> init` + `tauri <platform> build`
- Self-heal the Android toolchain: reuse an existing SDK or download the
  command-line tools and provision NDK/build-tools/platform into the shared
  cache folder; add the aarch64-linux-android Rust target
- Pin @tauri-apps/* npm versions to the resolved Rust crate versions so Tauri's
  version-mismatch check passes
- Discover the produced APK recursively (Tauri names it per target) and register
  it as a pipeline artifact so it persists beyond the build sandbox
- Prefer the local asset template so pinned Cargo dependencies are used offline
- Add an example Tauri mobile pipeline
… cache

Previously the SDK/NDK (several GB) was written under the per-pipeline cache
(CacheFolder.Pipelines/<pipelineId>), so every Android pipeline re-downloaded
its own copy. Point ensureAndroidEnvironment at
getCachePath('Pipelines')/android-sdk so the toolchain is shared across all
pipelines.
Use context.getCachePath() (the cache base, alongside pacote) instead of the
per-pipeline cache so the SDK lives at cache/android-sdk. Also fixes a
typecheck bug: the CacheFolder value is lowercase 'pipelines', so the previous
getCachePath('Pipelines') literal would fail the typecheck.
…on field

- Remove the mobileConfig input: it was merged into completeConfiguration.mobile
  but then deleted before the config was written (to stay valid across Tauri
  2.x), so it silently did nothing and was misleading.
- Remove the unused `configuration` field from the shared params const (the
  package action uses configureParams, not it).
- Update the example pipeline accordingly.
…ld path

- Add TargetPlatform/TargetArch types (NodeJS.Platform/Architecture don't know
  about android/ios/armv7l/universal/mips64el) and use them for the platform/
  arch param values, the handler's finalPlatform/finalArch, and the mobile
  target-resolution helpers.
- Export ensureAndroidEnvironment/findAndroidApk/resolveMobileCliTarget/
  resolveMobileOutputTriple (and re-export from the plugin entry) so future
  mobile-first plugins can reuse the SDK provisioning and target resolution.
- Example now builds the SAME app for both desktop (linux) and android from one
  input folder.
- Remove redundant apps/mobile; mobile builds now use the asset-tauri template
- Register Tauri plugins (shell/fs/opener) on all platforms; devtools and
  localhost are desktop-only via cfg guards
- Align Tauri crate versions to 2.11.5 (removes the 2.1.1 drift)
- fetchPipelabAsset: add PIPELAB_ASSET_ROOT local override so a published CLI
  can be pointed at a local asset checkout
- Preserve app.mobile config for mobile builds
- Add changeset
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying pipelab with  Cloudflare Pages  Cloudflare Pages

Latest commit: ce19270
Status: ✅  Deploy successful!
Preview URL: https://b3f653c1.pipelab.pages.dev
Branch Preview URL: https://codespace-psychic-happiness.pipelab.pages.dev

View logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant