Skip to content
Source CodeBuild Guide

Source Build Guide

A clean contract for building from ZIP/Git, with predictable outputs and reproducible packaging.

ZIP Upload

  • Upload a ZIP directly in the New Project wizard (Source Code → ZIP).
  • We will build from an ephemeral workspace and clean up afterwards.
  • Tip: keep your ZIP small and include only what’s required to build.

Repository Rules (Recommended)

  • Put build outputs in a dedicated directory (example: dist/build).
  • Avoid committing secrets (.env, keys). Use environment variables / secret storage.
  • Keep a deterministic build command (no interactive prompts).

Optional: code2native.json

  • Add a code2native.json in your repo root to declare per-platform build commands and artifact directory.
  • This prevents “package the whole workspace” fallbacks and keeps downloads lean.
{
  "artifacts": { "dir": "dist/build" },
  "commands": {
    "ANDROID": "./gradlew bundleRelease assembleRelease",
    "WINDOWS": "npm ci && npm run build"
  }
}

APK vs AAB: match the command to your distribution

  • assembleRelease builds an APK (direct download); bundleRelease builds the .aab that Google Play requires.
  • Projects set to Play Store distribution need a bundle task. If your command only runs assembleRelease, the builder adds bundleRelease for you and says so in the log — but declaring it yourself keeps the file honest.

When builds fail

  • Check the Build Logs for the exact command and error output.
  • Fix the repo/build command, then rebuild from the same project.
  • All source builds run inside an isolated container with no host access — this is by design and cannot be disabled.