החל מ-27 במרץ 2025, מומלץ להשתמש ב-android-latest-release
במקום ב-aosp-main
כדי ליצור תרומות ל-AOSP. מידע נוסף זמין במאמר שינויים ב-AOSP.
סקירה כללית על פיתוח
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
מערכת ה-build של AOSP מבוססת על Soong כדי ליצור את Android. Soong משתמש בכלי ההעתקה של GNU Make kati וברכיב של מערכת ה-build Ninja כדי לזרז את ה-build של Android.
קובצי ה-build של Soong נקראים קובצי תוכנית וכוללים את השם Android.bp
. הקבצים האלה דומים בתחביר ובסמנטיקה לקבצי BUILD של Bazel.
תיאור מפורט של פורמט הקובץ Android.bp
זמין במאמר פורמט הקובץ Android.bp.
מידע על המרת קובצי Make לקובצי Android.bp
זמין במאמר השוואה בין Make ל-Soong.
דגלים להשקת תכונות ודגלים ל-build
דגלים להשקת תכונות הם דגלים בינאריים שמשמשים לניתוק קוד שלא נבדק מקוד שנבדק. אם יש לכם רפליקת מראה משלכם להסתעפות הפיתוח החיצונית של AOSP, תוכלו להשתמש בדגלים האלה כדי לשמור על יציבות הקוד שמוצג במראה. בנוסף, אם אתם מתכוונים לתרום קוד להסתעפות הפיתוח החיצונית והציבורית, יכול להיות שבודק השינוי יבקש מכם להטמיע דגל לקוד שלכם.
דגלים של build הם קבועים (מחרוזות) בזמן ה-build שמשמשים לשינוי ה-build, למשל, הוספה אופציונלית של ספריית קוד.
הסבר על ההסתעפויות השונות של הקוד זמין במאמר מחזור החיים של גרסאות.
כדי להשתמש בדגלים להשקת תכונות ובדגלים ל-build, צריך לבצע שינויים בקובצי ה-build. למידע נוסף על הדגלים האלה, כולל השימוש בהם ב-build, אפשר לעיין בסקירה הכללית על דגלים להשקת תכונות ובדפים הסמוכים.
דוגמאות התוכן והקוד שבדף הזה כפופות לרישיונות המפורטים בקטע רישיון לתוכן. Java ו-OpenJDK הם סימנים מסחריים או סימנים מסחריים רשומים של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-27 (שעון 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-07-27 (שעון 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."]]