2025 年 3 月 27 日より、AOSP のビルドとコントリビューションには aosp-main
ではなく android-latest-release
を使用することをおすすめします。詳細については、AOSP の変更をご覧ください。
ビルドの概要
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
AOSP は、Soong ビルドシステムを使用して Android をビルドします。Soong は、Kati GNU Make クローンツールと Ninja ビルドシステム コンポーネントを利用して、Android のビルドを高速化します。
Soong ビルドファイルはブループリント ファイルと呼ばれ、Android.bp
という名前が付きます。このファイルの構文とセマンティクスは、Bazel BUILD ファイルに似ています。
Android.bp
ファイル形式の詳細については、Android.bp ファイル形式をご覧ください。
Make ファイルから Android.bp
ファイルへの変換についての詳細は、Make と Soong の比較をご覧ください。
機能リリースフラグとビルドフラグ
機能リリースフラグは、テストしていないコードをテスト済みコードから分離するために使用するバイナリフラグです。AOSP 外部開発ブランチのミラーを持っている場合は、このフラグを使用してミラーされたコードの安定性を保つことができます。また、一般公開されている外部開発ブランチにコードを提供する場合は、変更の審査担当者から、コードのフラグを実装するよう求められることがあります。
ビルドフラグはビルド時の定数(文字列)で、コード ライブラリを任意で追加するなど、ビルドを変更するために使用されます。
各コードブランチについての説明は、リリース ライフサイクルをご覧ください。
機能リリースフラグとビルドフラグは、ビルドファイルへの変更を必要とします。ビルドでのフラグの使い方など、これらのフラグについての詳細は、機能リリースフラグの概要と、関連する各ページをご覧ください。
このページのコンテンツやコードサンプルは、コンテンツ ライセンスに記載のライセンスに従います。Java および OpenJDK は Oracle および関連会社の商標または登録商標です。
最終更新日 2025-03-26 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-03-26 UTC。"],[],[],null,["# Build overview\n\nAOSP uses the *Soong* build system to build Android. Soong leverages the\n[kati](https://github.com/google/kati/blob/master/README.md) GNU\nMake clone tool and [Ninja](https://ninja-build.org/) build system\ncomponent to speed up builds of Android.\n\nSoong build files are called *blueprint files* and are named `Android.bp`. These\nfiles are similar in syntax and\nsematics to [Bazel BUILD files](https://bazel.build/reference/be/overview).\n\nFor a detailed description of the `Android.bp` file format, see\n[Android.bp file format](/docs/setup/reference/androidbp).\n\nFor information on converting your Make files to `Android.bp` files, see\n[Make and Soong comparison](/docs/setup/build/make-to-soong).\n\nFeature launch flags and build flags\n------------------------------------\n\n*Feature launch flags* are binary flags used to isolate untested code from\ntested code. If you have your own mirror of the AOSP external development\nbranch, you can use these flags to keep your mirrored code stable. Additionally,\nif you intend on contributing code to the public external development branch,\nyou might be asked by your change's reviewer to implement a flag for your code.\n\n*Build flags* are build-time constants (strings) used to modify your build, such\nas optionally including a code library.\n\nFor an explanation of the different code branches, see\n[Release lifecycle](/docs/setup/contribute/release-lifecycle).\n\nFeature launch flags and build flags require changes to build files. For\nadditional information on these flags, including their use in a build, see\nthe [Feature launch flags overview](/docs/setup/build/feature-flagging) and\nadjacent pages."]]