Platform Build Process
This article is a work in progress.
Apostrophy uses a build script to build and merge the system and vendor parts of the platform.
Its invocation is relatively straight-forward:
$ ./build.sh
The script automatically creates a Python 2 virtual environment (in ./venv
) should it be required.
To skip this step, specify --without-venv
.
The build script separates the working hierarchies for build variants, such that you will get a
./user/
and a ./userdebug/
hierarchy where the builds actually happen.
By default, the build script removes entire build hierarchies (the working hierarchies). To avoid
doing so, such as for repeated builds, consider using --quick
to preserve pre-existing compilation
outcomes that, if they have not changed, do not require compiling again.
Build Numbers
The exact build number to use is derived as follows:
- Check the latest commit date for all managed repositories 1
- Check if any of the managed repositories is dirty (uncommitted work)
- If any of the managed repositories is dirty, the build date is today
- If none of the managed repositories is dirty, the build date is the date of the last commit
- Using the now established build date, check the number of builds that have already happened using any existing build log files (and increment their latest number by one).
For multiple working areas, consider specifying --log-dir path/to/log/directory/
, to avoid
multiple varying builds with the exact same build version.
Build Variants
OTA Packages
To specify a specific release for which an OTA package should be created, use:
$ ./build.sh --ota <VERSION>
Footnotes
-
See
repo list
. ↩