CLI / oroc build

oroc build

Build an Oro Runtime application.

Provide a project directory, HTML file, or JavaScript module. When no oro.toml is found, oroc infers a minimal configuration automatically.

Usage#

oroc build [options] [<project-or-source>]

Options#

Option Description
--platform=<platform> platform target to build application for (defaults to host):<br>- android<br>- android-emulator<br>- ios<br>- ios-simulator
--config=<path> use an explicit oro.toml/oro.ini file
--device=<serial> Android device to install and run on
--copy=<source:dest> extra copy mapping (like [build] copy; can be repeated)
--port=<port> load "index.html" from a specific port (if host is not specified, defaults to localhost)
--host=<host> load "index.html" from a specific host (if port is not specified, defaults to 80)
-t, --test=<path> enable test mode and import a test file relative to resource files
-H, --headless build application to run in headless mode (without frame or window)
-P, --prod build for production (disables debugging info, inspector, etc.)
-D, --debug enable debug mode
-E, --env=<name[=value]> add environment variables
-o, --only-build only run the build step
-p, --package package the app for distribution
-q, --quiet hint for less log output
-r, --run run after building
-V, --verbose enable verbose output
-w, --watch watch for changes to rerun build step
--allow-exec allow native extension commands (git/build scripts)
--sanitizers enable developer sanitizers (ASan/UBSan) for desktop core builds
--cache enable all supported build result caches (default: off)
--no-cache disable supported build result caches for this build
--compiler-cache enable ccache/sccache for native object compilation
--no-compiler-cache disable the native compiler cache
--android-cache enable all supported caches for Android builds
--no-android-cache disable supported caches for Android builds
--android-build-cache enable Gradle's task output cache
--no-android-build-cache disable Gradle's task output cache
--android-configuration-cache enable Gradle's configuration cache
--no-android-configuration-cache disable Gradle's configuration cache
--tls-keylog=<path> write NSS TLS key log lines to <path> (OpenSSL provider)
--log-file=<path> mirror logs to a JSON file
--editor-project=<dir> export an Android editor project
--remote-debugging-port=<port> set the remote debugging port
-h, --help show help

Linux options#

Option Description
-f, --package-format=<format> package a Linux application in a specified format for distribution:<br>- deb (default)<br>- rpm<br>- zip<br>- aur (generate AUR PKGBUILD only)
--sign sign Linux packages with GPG (writes .asc next to the artifact)
--sign-key=<id> optional GPG key ID or fingerprint to use with '--sign' (letters/digits/@._- only)

macOS options#

Option Description
-c, --codesign code sign application with 'codesign'
-n, --notarize notarize application with 'notarytool'
-f, --package-format=<format> package a macOS application in a specified format for distribution:<br>- zip (default)<br>- pkg

iOS options#

Option Description
-c, --codesign code sign application during xcodebuild (requires '[ios] provisioning_profile' in your config file)

Windows options#

Option Description
-f, --package-format=<format> package a Windows application in a specified format for distribution:<br>- appx (default)

Environment#

Variable Description
ORO_ALLOW_EXEC allow native extension commands during builds
ORO_ENABLE_SANITIZERS enable ASan/UBSan on desktop builds

Notes#

Relative paths are resolved from the project root or from the directory containing the explicit --config file when one is supplied. --prod controls packaging/debug defaults; --package controls whether a distributable artifact is produced in addition to the build output directory.

Use --copy for one-off extra bundle mappings without modifying oro.toml.

Cache flags override oro.toml; specific cache flags override broader cache flags.

Set [build] cache=true for a project default, [android] cache=true for Android only, or [android] configuration_cache=true for only Gradle configuration caching.

Use compiler_cache in [build] or a platform section to control native object caching.

Compiler caching uses ccache/sccache from PATH and compiles directly if neither is installed.

Download caches and existing incremental build behavior retain their toolchain defaults.

Android run targets use --device, then ANDROID_SERIAL, then the first ready device listed by adb devices. The android-emulator target selects the first ready emulator.

NO_ANDROID and NO_IOS do not control this application build command. They are independent, presence-based exclusions for runtime source bootstrap (bin/install.sh / npm run relink).

Common errors#

Android builds: run oroc setup --platform=android and accept SDK licenses. macOS/iOS signing: set [ios] provisioning_profile/specifier or [mac.productbuild] identity in your config file.

Standard Android builds run NDK and Gradle automatically. Native extension commands may require --allow-exec or ORO_ALLOW_EXEC=1.

Linux dependencies#

deb packaging requires dpkg and fakeroot (e.g., sudo apt-get install dpkg-dev fakeroot). rpm packaging requires rpmbuild (e.g., sudo dnf install rpm-build).

macOS dependencies#

Xcode and Command Line Tools are required (xcode-select --install). For Gradle/JDK: brew install gradle openjdk (or use SDKMAN).

Windows dependencies#

Windows 10/11 SDK and Visual Studio Build Tools are recommended. Ensure signtool.exe is available (set SIGNTOOL or add SDK bin to PATH).

Examples#

oroc build .

build the current project for the host platform

oroc build -r --debug .

rebuild and immediately run a debug build

oroc build --platform=ios --prod --package .

produce a signed/package-ready iOS build using your config

oroc build --copy assets:assets .

include an extra assets directory in the bundle for this build only

oroc build --platform=android --cache --no-android-configuration-cache .

enable supported caches except Gradle configuration caching

Source repository · Edit this page · View Markdown

Quick links

Type to search across the site. Use the up and down arrow keys to choose a result, Enter to open it, and Escape to close.