ninja-to-soong
is a project to generate Soong
files (Android.bp
) for the Android build system.
ninja-to-soong
is licensed under the terms opf the Apache 2.0 license
ninja-to-soong
generates Ninja files using either:ninja-to-soong
generatesSoong
files using Ninja files.
Project | Ninja Generator | Targets |
---|---|---|
clvk | CMake |
libclvk.so |
clspv | CMake |
clvk dependencies |
llvm-project | CMake |
clvk & clspv dependencies |
SPIRV-Tools | CMake |
clvk dependencies |
SPIRV-Headers | CMake |
clspv & SPIRV-Tools dependencies |
angle (WIP) | GN |
libEGL_angle.so , libGLESv2_angle.so , libGLESv1_CM_angle.so |
ninja-to-soong
depends on the following:
<ninja-to-soong> $ cargo run --release -- <android_tree_path>
ninja-to-soong
uses github actions to check that changes do not bring regression. It checks that the generated files match their reference (located in the tests
folder).
Each project in the tests
folder contains the following files:
Android.bp
: the reference file to generateREPO
: a file containing the git URL of the projectVERSION
: a file containing thesha1
to use to checkout the project
To reduce CI time, the environment variable N2S_SKIP_CMAKE_BUILD
is set to avoid building projects. While it is correct to do for test purpose, it means that things will be missing when trying to update certain project (e.g. llvm-project
).
If you want more information take a look at the github action script
-
After a full first run of
ninja-to-soong
, it is possible to run with the environment variableN2S_SKIP_GEN_NINJA
set to skip the generation ofNinja
file for every project. -
It is possible to run a specific set of projects by adding them after the required arguments:
<ninja-to-soong> $ cargo run -- <android_tree_path> <project1> <project2>
Android.bp
files can be automatically copied to the Android tree by settingNS2_COPY_TO_AOSP
.