{"id":19,"date":"2024-06-17T00:19:48","date_gmt":"2024-06-16T16:19:48","guid":{"rendered":"https:\/\/www.swreader.com\/?p=19"},"modified":"2024-06-18T22:51:55","modified_gmt":"2024-06-18T14:51:55","slug":"android-build-system","status":"publish","type":"post","link":"https:\/\/www.swreader.com\/index.php\/2024\/06\/17\/android-build-system\/","title":{"rendered":"Android Build System(1)"},"content":{"rendered":"<blockquote>\n<p>\u672c\u6587\u8bf4\u660eAndroid\u7f16\u8bd1\u7cfb\u7edf\u7684\u6574\u4f53\u67b6\u6784\uff0c\u7f16\u8bd1\u8fc7\u7a0b<\/p>\n<\/blockquote>\n<h2>\u7f16\u8bd1\u7cfb\u7edf\u7efc\u8ff0<\/h2>\n<h3>\u53d1\u5c55\u5386\u53f2<\/h3>\n<ul>\n<li>\n<p>Android 7 \u4e4b\u524d\uff0cAndroid \u4f7f\u7528GNU Make\u548cShell\u7f16\u8bd1<\/p>\n<\/li>\n<li>\n<p>Android 7 Google\u5f15\u5165ninja\u7528\u6765\u66ff\u4ee3make\uff0c\u5e76\u4e14\u63d0\u4f9b\u4e86kati\u5de5\u5177\uff0c\u5c06Android.mk\u8f6c\u6362\u4e3aninja\u7684\u6784\u5efa\u89c4\u5219\u6587\u4ef6<\/p>\n<\/li>\n<li>\n<p>Android 8 Google\u5f15\u5165\u4e86Soong\uff0csoong\u662f\u6574\u4e2aAndroid\u6784\u5efa\u7cfb\u7edf\u7684\u6838\u5fc3\uff0c\u4ed6\u8c03\u7528kati\u3001Make\u3001Ninja\u6784\u5efa\u7cfb\u7edf\uff0c\u5b8c\u6210\u6574\u4e2a\u6784\u5efa<\/p>\n<\/li>\n<li>\n<p>\u4e0b\u4e00\u4ee3\u6784\u5efa\u5206\u5e03\u5f0f\u7f16\u8bd1\u7cfb\u7edfbazel\uff0c\u5230Android 14 \u5c1a\u672a\u6b63\u5f0f\u53d1\u5e03\uff0c\u5c06\u5927\u5e45\u63d0\u9ad8\u7f16\u8bd1\u901f\u5ea6<\/p>\n<\/li>\n<\/ul>\n<table>\n<thead>\n<tr>\n<th>Android\u7248\u672c<\/th>\n<th>\u7f16\u8bd1\u7cfb\u7edf<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>7.0 \u4e4b\u524d<\/td>\n<td>Make \u3001Shell<\/td>\n<\/tr>\n<tr>\n<td>7.0<\/td>\n<td>\u5f15\u5165ninjia\u3001kati<\/td>\n<\/tr>\n<tr>\n<td>8.0<\/td>\n<td>\u5f15\u5165soong\u548cblueprint\uff0cAndroid.mk\u9010\u6e10\u4f5c\u5e9f<\/td>\n<\/tr>\n<tr>\n<td>NA<\/td>\n<td>Google\u6b63\u5728\u5f00\u53d1\u5168\u65b0\u7684bazel\u5206\u5e03\u5f0f\u7f16\u8bd1\u7cfb\u7edf<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u7f16\u8bd1\u7cfb\u7edf\u67b6\u6784<\/h3>\n<p><img decoding=\"async\" src=\"..\/assets\/e5219a8834fb44f0982e98815913b21b.png\" alt=\"\" \/><\/p>\n<h4>soong<\/h4>\n<p>\u6574\u4e2a\u7cfb\u7edf\u7684\u6838\u5fc3\uff0csoong\u8c03\u7528kati\/ckati\u3001ninja\u3001make\u7b49\uff0c\u5b8c\u6210\u5bf9\u6574\u4e2aAndroid\u7684\u7f16\u8bd1\u3002\u6e90\u7801\u76ee\u5f55\uff1abuild\/soong<\/p>\n<h4>kati\/ckati<\/h4>\n<p>\u5c06Android.mk\u8f6c\u6362\u4e3aninja\u7684\u6784\u5efa\u89c4\u5219\u6587\u4ef6\uff0ckati\u4f7f\u7528go\u8bed\u8a00\u5f00\u53d1\uff0c\u540e\u7eed\u4e3a\u4e86\u63d0\u9ad8\u6027\u80fd\u4f7f\u7528c++\u91cd\u5199\uff0c\u5373ckati<\/p>\n<h4>blueprint<\/h4>\n<p>bluprint\u662fgo\u8bed\u8a00\u5f00\u53d1\u7684\u751f\u6210ninja manifest\u7684\u5e93\uff0c\u5b98\u65b9\u89e3\u91ca\u53c2\u8003<a href=\"https:\/\/pkg.go.dev\/git.halogenos.org\/xdevs23\/blueprint#section-readme\">blueprint reference<\/a>:<\/p>\n<blockquote>\n<p>Blueprint is a meta-build system that reads in Blueprints files that describe modules that need to be built, and produces a <a href=\"https:\/\/ninja-build.org\/\">Ninja<\/a> manifest describing the commands that need to be run and their dependencies. Where most build systems use built-in rules or a domain-specific language to describe the logic for converting module descriptions to build rules, Blueprint delegates this to per-project build logic written in Go. For large, heterogenous projects this allows the inherent complexity of the build logic to be maintained in a high-level language, while still allowing simple changes to individual modules by modifying easy to understand Blueprints files.<\/p>\n<\/blockquote>\n<p>Blueprint\u662f\u4e00\u4e2a\u5143\u7f16\u8bd1\u7cfb\u7edf\uff0cBlueprint\u8bfb\u5165\u63cf\u8ff0\u9700\u8981\u7f16\u8bd1\u7684\u6a21\u5757\u7684 Blueprints files \uff0c\u8f93\u51faninja manifest\u6587\u4ef6\uff0cmanifest\u6587\u4ef6\u4e2d\u5305\u542b\u6a21\u5757\u7684\u4f9d\u8d56\u548c\u7f16\u8bd1\u6a21\u5757\u6240\u9700\u8981\u7684\u547d\u4ee4\u3002<\/p>\n<p>\u5927\u90e8\u5206\u7f16\u8bd1\u7cfb\u7edf\u4f7f\u7528\u5185\u7f6e\u7684\u89c4\u5219\u6216\u7279\u5b9a\u9886\u57df\u7684\u8bed\u8a00\uff0c\u6765\u63cf\u8ff0\u5982\u4f55\u5c06\u6a21\u5757\u5b9a\u4e49\u8f6c\u6362\u4e3a\u7f16\u8bd1\u89c4\u5219\u7684\u903b\u8f91\uff0cBlueprint\u7684\u76ee\u7684\u5c31\u662f\u4ee3\u7406\u5b9e\u73b0\u8fd9\u79cd\u903b\u8f91\u3002<\/p>\n<h2>source \u6267\u884c\u6d41\u7a0b<\/h2>\n<p>soource\u6267\u884c\u7684build\/ensetup.sh\uff0c\u9996\u5148\u4f1a\u6267\u884c\u6700\u4e0b\u9762\u7684\u4e09\u884c\u8bed\u53e5<\/p>\n<pre><code class=\"language-shell\">validate_current_shell\nsource_vendorsetup\naddcompletions<\/code><\/pre>\n<p>\u4e3b\u8981\u662fsource_vendorsetup\u51fd\u6570\uff0c\u6b64\u51fd\u6570\u7684\u4f5c\u7528\u662f \u67e5\u627edevice vendor product\u4e0b\u7684vendorsetup.sh\u5e76\u6267\u884c\uff0c\u67e5\u627e\u7684\u6700\u5927\u6df1\u5ea6\u662f4\u3002\u4f8b\u5982\u8f93\u51fa\u5982\u4e0b\uff1a<\/p>\n<pre><code class=\"language-shell\">including device\/qcom\/common\/cuttlestone\/vendorsetup.sh\nincluding vendor\/long\/common\/vendorsetup.sh\nincluding vendor\/qcom\/opensource\/core-utils\/vendorsetup.sh\nincluding vendor\/qcom\/proprietary\/common\/vendorsetup.sh\nincluding vendor\/qcom\/proprietary\/prebuilt_HY11\/vendorsetup.sh<\/code><\/pre>\n<p>\u6240\u4ee5\uff1avendor\u53ef\u4ee5\u901a\u8fc7vendorsetup.sh\u6765\u505a\u4e00\u4e9b\u7f16\u8bd1\u524d\u7684\u51c6\u5907\u5de5\u4f5c\uff0c\u6bd4\u5982\u521b\u5efa\u8f6f\u8fde\u63a5\u4e4b\u7c7b\u7684\u3002<\/p>\n<h2>luncher \u6267\u884c\u6d41\u7a0b<\/h2>\n<p>\u5728luncher\u51fd\u6570\u7684\u5b9e\u73b0\u4e2d\uff0c\u662f\u8c03\u7528print_lunch_menu\u51fd\u6570\u8f93\u51fa\u627e\u5230\u7684\u4ea7\u54c1\u9009\u9879<\/p>\n<h3>print_lunch_menu\u7684\u5b9e\u73b0\u5982\u4e0b\uff1a<\/h3>\n<pre><code class=\"language-shell\">function print_lunch_menu()\n{\n    local uname=$(uname)\n    local choices\n    choices=$(TARGET_BUILD_APPS= TARGET_PRODUCT= TARGET_BUILD_VARIANT= get_build_var COMMON_LUNCH_CHOICES 2&gt;\/dev\/null)\n    local ret=$?\n\n    local i=1\n    local choice\n    for choice in $(echo $choices)\n    do\n        echo &quot;     $i. $choice&quot;\n        i=$(($i+1))\n    done\n}<\/code><\/pre>\n<p>\u6838\u5fc3\u903b\u8f91\u662f\u901a\u8fc7<strong>get_build_var COMMON_LUNCH_CHOICES 2<\/strong> \u83b7\u53d6\u6240\u6709\u7684\u7f16\u8bd1\u9009\u9879\u3002<\/p>\n<h3>get_build_var\u5b9e\u73b0\u5982\u4e0b\uff1a<\/h3>\n<pre><code class=\"language-shell\"># Get the exact value of a build variable.\nfunction get_build_var()\n{\n    if [ &quot;$BUILD_VAR_CACHE_READY&quot; = &quot;true&quot; ]\n    then\n        eval &quot;echo \\&quot;\\${var_cache_$1}\\&quot;&quot;\n        return 0\n    fi\n\n    local T=$(gettop)\n    if [ ! &quot;$T&quot; ]; then\n        echo &quot;Couldn&#039;t locate the top of the tree.  Try setting TOP.&quot; &gt;&amp;2\n        return 1\n    fi\n    (\\cd $T; build\/soong\/soong_ui.bash --dumpvar-mode $1)\n}<\/code><\/pre>\n<p>get_build_var\u4e3b\u8981\u662f\u8c03\u7528<strong>build\/soong\/soong_ui.bash &#8211;dumpvar-mode COMMON_LUNCH_CHOICES<\/strong> \u6765\u83b7\u53d6\u503c\u3002<\/p>\n<h3>build\/soong\/soong_ui.bash<\/h3>\n<p>soong_ui.bash \u6838\u5fc3\u903b\u8f91\u5982\u4e0b\uff1a<\/p>\n<pre><code class=\"language-shell\"># Save the current PWD for use in soong_ui\nexport ORIGINAL_PWD=${PWD}\nexport TOP=$(gettop)\nsource ${TOP}\/build\/soong\/scripts\/microfactory.bash\n\nsoong_build_go soong_ui android\/soong\/cmd\/soong_ui\nsoong_build_go mk2rbc android\/soong\/mk2rbc\/cmd\nsoong_build_go rbcrun rbcrun\/cmd\n\ncd ${TOP}\nexec &quot;$(getoutdir)\/soong_ui&quot; &quot;$@&quot;<\/code><\/pre>\n<pre><code class=\"language-plantuml\">@startmindmap\n* soong_ui.bash\n** build\/soong\/scripts\/microfactory.bash\n*** setup GOROOT\n*** \u5b9a\u4e49soong_build_go\n*** build\/blueprint\/microfactory\/microfactory.bash\n**** \u5b9a\u4e49build_go\n** soong_build_go soong_ui android\/soong\/cmd\/soong_ui\\nsoong_build_go mk2rbc android\/soong\/mk2rbc\/cmd\\nsoong_build_go rbcrun rbcrun\/cmd \n*** \u7f16\u8bd1soong_ui\u7b49\u53ef\u6267\u884c\u7a0b\u5e8f\n** exec &quot;$(getoutdir)\/soong_ui&quot; &quot;$@&quot;\n*** \u901a\u8fc7soong_ui\u6267\u884c\u547d\u4ee4\n@endmindmap<\/code><\/pre>\n<p><img decoding=\"async\" src=\"\/\/www.plantuml.com\/plantuml\/png\/SoWkIImgoStCIybDBE3IKYZEpyzBZo_Dr4jABCxWqj9II2hDp4dH1mlh5oSNPHQK5EldPYONvQSb9fVa5rN250ArffQK5YYu-mVv-uU01Pwkc_LaPoV4HB0nyUdvG0cOcKavfQa5HPbv9IZcOJCSOHYICGge1iDThf2ObrAKdmbpSt8ka0MLYib3qvERRLIKb8oc0o88qeYX7YXUL9e7fK0g5C3-URvdselr4s6sF5_R-RH__RFEvIyMzZnVqVrqLp_8jQaLgSaAIYeQwQab-QKbAPb5cd1dAG757PJ09hricFLYVpjC0cB6qubxd-nUmiN5vP2QbmADAG00\" alt=\"\" \/><\/p>\n<h3>product_config.mk\u7684\u5904\u7406<\/h3>\n<p>android_products_makefiles\u4fdd\u5b58\u7684\u662f\u6240\u6709\u7684AndroidProducts.mk\u6587\u4ef6\u5217\u8868\uff1a<\/p>\n<pre><code class=\"language-makefile\"># Products are defined in AndroidProducts.mk files:\nandroid_products_makefiles := $(file &lt;$(OUT_DIR)\/.module_paths\/AndroidProducts.mk.list) \\\n  $(SRC_TARGET_DIR)\/product\/AndroidProducts.mk<\/code><\/pre>\n<p>\u4e0b\u9762\u8fd9\u6bb5\u4ee3\u7801\u7528\u4e8e\u6839\u636e\u7b2c\u4e00\u4e2a\u53c2\u6570\u662f\u5426\u5305\u542b\u5192\u53f7\u6765\u8bbe\u7f6e <code>_product-spec<\/code> \u53d8\u91cf\u7684\u503c\u3002\u5982\u679c\u53c2\u6570\u4e2d\u5305\u542b\u5192\u53f7\uff0c\u5219\u53d8\u91cf\u503c\u5c06\u8bbe\u7f6e\u4e3a\u53c2\u6570\u672c\u8eab\u3002\u5426\u5219\uff0c\u53d8\u91cf\u503c\u5c06\u8bbe\u7f6e\u4e3a\u6587\u4ef6\u540d\u548c\u53c2\u6570\u7684\u7ec4\u5408\uff0c\u4e2d\u95f4\u7528\u5192\u53f7\u5206\u9694\u3002<\/p>\n<pre><code class=\"language-makefile\"># Products are defined in AndroidProducts.mk files:\n\n_product-spec=$(strip \\\n    $(if $(findstring :,$(1)), \\\n        $(1), \\\n        $(basename $(notdir $(1))):$(1) \\\n    ) \\\n)<\/code><\/pre>\n<p>\u5bf9\u6bcf\u4e2aAndroidProducts.mk\u6587\u4ef6\uff0c\u6267\u884c\u4e0b\u9762\u7684\u64cd\u4f5c\uff1a<\/p>\n<pre><code class=\"language-makefile\"># Build cumulative lists of all product specs\/lunch choices\/Starlark-based products.\nproduct_paths :=\ncommon_lunch_choices :=\nproducts_using_starlark_config :=\n$(foreach f,$(android_products_makefiles), \\\n    $(call _read-ap-file,$(f)) \\\n    $(eval product_paths += $(ap_product_paths)) \\\n    $(eval common_lunch_choices += $(ap_common_lunch_choices)) \\\n    $(eval products_using_starlark_config += $(ap_products_using_starlark_config)) \\\n)<\/code><\/pre>\n<p>_read-ap-file\u7684\u5b9a\u4e49\u5982\u4e0b\uff0c\u4e3b\u8981\u662f\u8bfb\u53d6AndroidProducts.mk\uff0c\u5e76\u8fdb\u884c\u521d\u6b65\u7684\u6821\u9a8c\uff0c\u6821\u9a8c\u5931\u8d25\u5219\u62a5\u9519\u3002$(f) \u4ee3\u8868\u4e00\u4e2aAndroidProducts.mk\u6587\u4ef6<\/p>\n<pre><code class=\"language-makefile\"># Reads given AndroidProduct.mk file and sets the following variables:\n#  ap_product_paths -- the list of &lt;product&gt;:&lt;path&gt; pairs\n#  ap_common_lunch_choices -- the list of &lt;product&gt;-&lt;build variant&gt; items\n#  ap_products_using_starlark_config -- the list of products using starlark config\n# In addition, validates COMMON_LUNCH_CHOICES and STARLARK_OPT_IN_PRODUCTS values\ndefine _read-ap-file\n  $(eval PRODUCT_MAKEFILES :=) \\\n  $(eval COMMON_LUNCH_CHOICES :=) \\\n  $(eval STARLARK_OPT_IN_PRODUCTS := ) \\\n  $(eval ap_product_paths :=) \\\n  # \u6e05\u7a7a\u4e0a\u9762\u51e0\u4e2a\u53d8\u91cf\u7684\u503c\n  $(eval LOCAL_DIR := $(patsubst %\/,%,$(dir $(f)))) \\\n  # \u8bbe\u7f6eLOCAL_DIR\u7684\u503c\n  $(eval include $(f)) \\\n  # include f\u4ee3\u8868\u7684makefile\n  $(foreach p, $(PRODUCT_MAKEFILES),$(eval ap_product_paths += $(call _product-spec,$(p)))) \\\n  # $(PRODUCT_MAKEFILES)\u662f\u67d0\u4e2aAndroidProduct.mk\u4e2d\u5b9a\u4e49\u7684\u53d8\u91cf\uff0c\u6240\u4ee5\u904d\u5386$(PRODUCT_MAKEFILES) \u4e2d\u7684\u6bcf\u4e2aitem\uff0c\u7136\u540e\u83b7\u53d6\u5230_product-spec\uff0c\u5373\u6bcf\u4e00\u4e2a\u90fd\u4ee3\u8868\u4e00\u4e2a\u89c4\u683c\n  $(eval ap_common_lunch_choices  := $(COMMON_LUNCH_CHOICES)) \\\n  # AndroidMakefile\u4e2d\u5b9a\u4e49\u7684COMMON_LUNCH_CHOICES\u53d8\u91cf\n  $(eval ap_products_using_starlark_config := $(STARLARK_OPT_IN_PRODUCTS)) \\\n  $(eval _products := $(call _first,$(ap_product_paths),:)) \\\n  # \u5f53\u524dAndroidProduct.mk\u4e2d\u5b9a\u4e49\u7684\u6240\u6709\u4ea7\u54c1\n  $(eval _bad := $(filter-out $(_products),$(call _first,$(ap_common_lunch_choices),-))) \\\n  # \u6821\u9a8c1\uff1a\u6839\u636e-\u62c6\u5206COMMON_LUNCH_CHOICES\u4e2d\u7684\u6240\u6709\u5b57\u7b26\u4e32\uff0c\u4ece_products\u4e2d\u8fc7\u6ee4\u6389\uff0c\u5982\u679c\u8fc7\u6ee4\u7ed3\u679c\u8fd8\u6709\u503c\uff0c\u8bf4\u660e\u6709\u914d\u7f6e\u5b58\u5728\u9519\u8bef\n  $(if $(_bad),$(error COMMON_LUNCH_CHOICES contains products(s) not defined in this file: $(_bad))) \\\n  $(eval _bad := $(filter-out %-eng %-userdebug %-user,$(ap_common_lunch_choices))) \\\n  # \u6821\u9a8c2\uff1a\u6821\u9a8cvariant\u662f\u5426\u6b63\u5e38\n  $(if $(_bad),$(error invalid variant in COMMON_LUNCH_CHOICES: $(_bad)))\n  $(eval _bad := $(filter-out $(_products),$(ap_products_using_starlark_config))) \\\n  $(if $(_bad),$(error STARLARK_OPT_IN_PRODUCTS contains product(s) not defined in this file: $(_bad)))\nendef<\/code><\/pre>\n<pre><code class=\"language-plantuml\">@startmindmap\n* product_config.mk\n** $(BUILD_SYSTEM)\/node_fns.mk\n   *** \u5b9a\u4e49\u4e86\u4e00\u7ec4var\u76f8\u5173\u7684\u64cd\u4f5c\u51fd\u6570\n** $(BUILD_SYSTEM)\/product.mk\n   *** \u5b9a\u4e49\u4ea7\u54c1Product\u76f8\u5173Makefile\u53d8\u91cf\n       **** \u8fd9\u4e9b\u53d8\u91cf\u90fd\u4ee5 PRODUCT_ \u5f00\u5934\n       **** _product_single_value_vars(\u53ea\u80fd\u4fdd\u5b58\u4e00\u4e2a\u503c)\n       **** _product_list_vars(\u53ef\u4ee5\u4fdd\u5b58\u591a\u4e2a\u503c)\n   *** \u5b9a\u4e49Product \u76f8\u5173Makefile\u51fd\u6570\n       **** inherit-product\n       **** inherit-product-if-exists\n** $(BUILD_SYSTEM)\/device.mk\n   *** \u5b9a\u4e49device \u76f8\u5173Makefile\u53d8\u91cf \\nDEVICE_NAME\\nDEVICE_BOARD\\nDEVICE_REGION\n   *** \u5b9a\u4e49Product \u76f8\u5173Makefile\u51fd\u6570 \\ninherit-device\\ndump-device\\nimport-devices\n@endmindmap<\/code><\/pre>\n<p><img decoding=\"async\" src=\"\/\/www.plantuml.com\/plantuml\/png\/SoWkIImgoStCIybDBE3IKYWeoayfJIw9JyxFIyjCrylDvjBIKb3HS0hrz7693uuC3d7rrTJFoqz9ZK_BAmP9AoWeQ06LF5qtwydEpYUxsfxiQ7Y-kwKiiUZvx1rFMpS_dzNoR7BlaxrpdhRlVJPr0pRJe5PYCMpvqycD0H1PY6c-YTcfQPavgK_xPxnix-TIW00ja9uN-sS-sJKR8l6oUU-JtKiL0eByNKATG-8LdkvfUBfa2uhoU9X7YpFpqdDIuyiISqf1P56nnjF-LI-01koV-tJj3A1ldknOzRHXZoPstJcPnIKmNUk1Ta9qFLqo2weBrKTGloYWUWOICYZcP-Pbf1PbbkX2hS4dfvkPffjQ0NH6CRQmJKajoqnEnGXQYB02ja1LYCbpSGtpT7QDztFqTOLpdFmTWrpWl21NTqz_F-8z1pGKvco8rJ5vAQMv1N1EPcv1VX5ChfZB8JKl1Pea0G00\" \/><\/p>\n<h3>BoardConfig.mk<\/h3>\n<p>BoardConfig.mk\u662f\u5fc5\u987b\u7684\uff0c\u56e0\u4e3a\u5982\u679cdevice\u6216\u8005vendor\/$(PRODUCT_DEVICE)\/BoardConfig.mk\u627e\u4e0d\u5230\uff0c\u5219lunch\u547d\u4ee4\u4f1a\u62a5\u9519\uff0c\u4e0d\u62a5\u9519\u5982\u4e0b\uff1a<\/p>\n<pre><code class=\"language-shell\">In file included from build\/make\/core\/config.mk:356:\nIn file included from build\/make\/core\/envsetup.mk:371:\nbuild\/make\/core\/board_config.mk:228: error: No config file found for TARGET_DEVICE orange_x86_64.\n16:50:34 dumpvars failed with: exit status 1<\/code><\/pre>\n<p>build\/make\/core\/board_config.mk 228\u884c\u7684\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<pre><code class=\"language-makefile\"># Boards may be defined under $(SRC_TARGET_DIR)\/board\/$(TARGET_DEVICE)\n# or under vendor\/*\/$(TARGET_DEVICE).  Search in both places, but\n# make sure only one exists.\n# Real boards should always be associated with an OEM vendor.\nifdef TARGET_DEVICE_DIR\n  ifneq ($(origin TARGET_DEVICE_DIR),command line)\n    $(error TARGET_DEVICE_DIR may not be set manually)\n  endif\n  board_config_mk := $(TARGET_DEVICE_DIR)\/BoardConfig.mk\nelse\n  board_config_mk := \\\n    $(strip $(sort $(wildcard \\\n      $(SRC_TARGET_DIR)\/board\/$(TARGET_DEVICE)\/BoardConfig.mk \\\n      $(shell test -d device &amp;&amp; find -L device -maxdepth 4 -path &#039;*\/$(TARGET_DEVICE)\/BoardConfig.mk&#039;) \\\n      $(shell test -d vendor &amp;&amp; find -L vendor -maxdepth 4 -path &#039;*\/$(TARGET_DEVICE)\/BoardConfig.mk&#039;) \\\n    )))\n  ifeq ($(board_config_mk),)\n    $(error No config file found for TARGET_DEVICE $(TARGET_DEVICE))\n  endif\n  ifneq ($(words $(board_config_mk)),1)\n    $(error Multiple board config files for TARGET_DEVICE $(TARGET_DEVICE): $(board_config_mk))\n  endif\n  TARGET_DEVICE_DIR := $(patsubst %\/,%,$(dir $(board_config_mk)))\n  .KATI_READONLY := TARGET_DEVICE_DIR\nendif<\/code><\/pre>\n<p>\u5176\u4e2dTARGET_DEVICE_DIR\u662f\u5728make\/core\/product_config.mk\u4e2d\u8d4b\u503c\u7684\uff0c\u76f8\u5173\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<pre><code class=\"language-makefile\"># Quick check and assign default values\nTARGET_DEVICE := $(PRODUCT_DEVICE)<\/code><\/pre>\n<h2>Reference<\/h2>\n<p><a href=\"https:\/\/blog.csdn.net\/daoshuti\/article\/details\/108513754\">https:\/\/blog.csdn.net\/daoshuti\/article\/details\/108513754<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u672c\u6587\u8bf4\u660eAndroid\u7f16\u8bd1\u7cfb\u7edf\u7684\u6574\u4f53\u67b6\u6784\uff0c\u7f16\u8bd1\u8fc7\u7a0b \u7f16\u8bd1\u7cfb\u7edf\u7efc\u8ff0 \u53d1\u5c55\u5386\u53f2 Android 7 \u4e4b\u524d\uff0cAndroid \u4f7f\u7528GNU Make\u548cShell\u7f16\u8bd1 Android 7 Google\u5f15\u5165ninja\u7528\u6765\u66ff\u4ee3make\uff0c\u5e76\u4e14\u63d0\u4f9b\u4e86kati\u5de5\u5177\uff0c\u5c06Android.mk\u8f6c\u6362\u4e3aninja\u7684\u6784\u5efa\u89c4\u5219\u6587\u4ef6 Android 8 Google\u5f15\u5165\u4e86Soong\uff0csoong\u662f\u6574\u4e2aAndroid\u6784\u5efa\u7cfb\u7edf\u7684\u6838\u5fc3\uff0c\u4ed6\u8c03\u7528kati\u3001Make\u3001Ninja\u6784\u5efa\u7cfb\u7edf\uff0c\u5b8c\u6210\u6574\u4e2a\u6784\u5efa \u4e0b\u4e00\u4ee3\u6784\u5efa\u5206\u5e03\u5f0f\u7f16\u8bd1\u7cfb\u7edfbazel\uff0c\u5230Android 14 \u5c1a\u672a\u6b63\u5f0f\u53d1\u5e03\uff0c\u5c06\u5927\u5e45\u63d0\u9ad8\u7f16\u8bd1\u901f\u5ea6 Android\u7248\u672c \u7f16\u8bd1\u7cfb\u7edf 7.0 \u4e4b\u524d Make \u3001Shell 7.0 \u5f15\u5165ninjia\u3001kati 8.0 \u5f15\u5165soong\u548cblueprint\uff0cAndroid.mk\u9010\u6e10\u4f5c\u5e9f NA Google\u6b63\u5728\u5f00\u53d1\u5168\u65b0\u7684bazel\u5206\u5e03\u5f0f\u7f16\u8bd1\u7cfb\u7edf \u7f16\u8bd1\u7cfb\u7edf\u67b6\u6784 soong \u6574\u4e2a\u7cfb\u7edf\u7684\u6838\u5fc3\uff0csoong\u8c03\u7528kati\/ckati\u3001ninja\u3001make\u7b49\uff0c\u5b8c\u6210\u5bf9\u6574\u4e2aAndroid\u7684\u7f16\u8bd1\u3002\u6e90\u7801\u76ee\u5f55\uff1abuild\/soong kati\/ckati \u5c06Android.mk\u8f6c\u6362\u4e3aninja\u7684\u6784\u5efa\u89c4\u5219\u6587\u4ef6\uff0ckati\u4f7f\u7528go\u8bed\u8a00\u5f00\u53d1\uff0c\u540e\u7eed\u4e3a\u4e86\u63d0\u9ad8\u6027\u80fd\u4f7f\u7528c++\u91cd\u5199\uff0c\u5373ckati blueprint bluprint\u662fgo\u8bed\u8a00\u5f00\u53d1\u7684\u751f\u6210ninja manifest\u7684\u5e93\uff0c\u5b98\u65b9\u89e3\u91ca\u53c2\u8003blueprint reference: Blueprint is a meta-build system that reads in Blueprints files that describe modules that need to be built, and produces a Ninja manifest describing the commands that need to be run and their dependencies. Where most build systems use built-in rules or a domain-specific language to describe the logic for converting module descriptions to build rules, Blueprint delegates this to per-project build logic written in Go. For large, heterogenous projects this allows the inherent complexity of the build logic to be maintained in a high-level language, while still allowing simple changes to individual modules by modifying easy to understand Blueprints files. Blueprint\u662f\u4e00\u4e2a\u5143\u7f16\u8bd1\u7cfb\u7edf\uff0cBlueprint\u8bfb\u5165\u63cf\u8ff0\u9700\u8981\u7f16\u8bd1\u7684\u6a21\u5757\u7684 Blueprints files \uff0c\u8f93\u51faninja manifest\u6587\u4ef6\uff0cmanifest\u6587\u4ef6\u4e2d\u5305\u542b\u6a21\u5757\u7684\u4f9d\u8d56\u548c\u7f16\u8bd1\u6a21\u5757\u6240\u9700\u8981\u7684\u547d\u4ee4\u3002 \u5927\u90e8\u5206\u7f16\u8bd1\u7cfb\u7edf\u4f7f\u7528\u5185\u7f6e\u7684\u89c4\u5219\u6216\u7279\u5b9a\u9886\u57df\u7684\u8bed\u8a00\uff0c\u6765\u63cf\u8ff0\u5982\u4f55\u5c06\u6a21\u5757\u5b9a\u4e49\u8f6c\u6362\u4e3a\u7f16\u8bd1\u89c4\u5219\u7684\u903b\u8f91\uff0cBlueprint\u7684\u76ee\u7684\u5c31\u662f\u4ee3\u7406\u5b9e\u73b0\u8fd9\u79cd\u903b\u8f91\u3002 source \u6267\u884c\u6d41\u7a0b soource\u6267\u884c\u7684build\/ensetup.sh\uff0c\u9996\u5148\u4f1a\u6267\u884c\u6700\u4e0b\u9762\u7684\u4e09\u884c\u8bed\u53e5 validate_current_shell source_vendorsetup addcompletions \u4e3b\u8981\u662fsource_vendorsetup\u51fd\u6570\uff0c\u6b64\u51fd\u6570\u7684\u4f5c\u7528\u662f \u67e5\u627edevice vendor product\u4e0b\u7684vendorsetup.sh\u5e76\u6267\u884c\uff0c\u67e5\u627e\u7684\u6700\u5927\u6df1\u5ea6\u662f4\u3002\u4f8b\u5982\u8f93\u51fa\u5982\u4e0b\uff1a including device\/qcom\/common\/cuttlestone\/vendorsetup.sh including vendor\/long\/common\/vendorsetup.sh including vendor\/qcom\/opensource\/core-utils\/vendorsetup.sh including vendor\/qcom\/proprietary\/common\/vendorsetup.sh including vendor\/qcom\/proprietary\/prebuilt_HY11\/vendorsetup.sh \u6240\u4ee5\uff1avendor\u53ef\u4ee5\u901a\u8fc7vendorsetup.sh\u6765\u505a\u4e00\u4e9b\u7f16\u8bd1\u524d\u7684\u51c6\u5907\u5de5\u4f5c\uff0c\u6bd4\u5982\u521b\u5efa\u8f6f\u8fde\u63a5\u4e4b\u7c7b\u7684\u3002 luncher \u6267&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","fifu_image_url":"","fifu_image_alt":"","footnotes":""},"categories":[3],"tags":[14,9,5],"class_list":["post-19","post","type-post","status-publish","format-standard","hentry","category-android","tag-android","tag-build","tag-linux"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Android Build System(1) - TianYa Blog<\/title>\n<meta name=\"description\" content=\"\u672c\u6587\u8be6\u7ec6\u603b\u7ed3\u4e86Android\u7f16\u8bd1\u7cfb\u7edf\u7684\u6574\u4f53\u67b6\u6784\u548c\u5173\u952e\u7ec4\u6210\u90e8\u5206\uff0c\u5305\u62ec\u4eceGNU Make\u548cShell\u5230ninja\u548ckati\u7684\u6f14\u8fdb\uff0c\u4ee5\u53caSoong\u548cBlueprint\u7684\u96c6\u6210\u3002\u8fdb\u4e00\u6b65\u5206\u6790\u4e86\u5728Android\u7f16\u8bd1\u8fc7\u7a0b\u4e2d\uff0c\u5173\u952e\u547d\u4ee4\u5982source\u3001lunch\u548csoong\u7684\u6267\u884c\u6d41\u7a0b\u548c\u4f5c\u7528\uff0c\u63ed\u793a\u4e86\u5b83\u4eec\u5728\u6784\u5efaAndroid\u7cfb\u7edf\u4e2d\u7684\u91cd\u8981\u89d2\u8272\u548c\u529f\u80fd\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.swreader.com\/index.php\/2024\/06\/17\/android-build-system\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Android Build System(1) - TianYa Blog\" \/>\n<meta property=\"og:description\" content=\"\u672c\u6587\u8be6\u7ec6\u603b\u7ed3\u4e86Android\u7f16\u8bd1\u7cfb\u7edf\u7684\u6574\u4f53\u67b6\u6784\u548c\u5173\u952e\u7ec4\u6210\u90e8\u5206\uff0c\u5305\u62ec\u4eceGNU Make\u548cShell\u5230ninja\u548ckati\u7684\u6f14\u8fdb\uff0c\u4ee5\u53caSoong\u548cBlueprint\u7684\u96c6\u6210\u3002\u8fdb\u4e00\u6b65\u5206\u6790\u4e86\u5728Android\u7f16\u8bd1\u8fc7\u7a0b\u4e2d\uff0c\u5173\u952e\u547d\u4ee4\u5982source\u3001lunch\u548csoong\u7684\u6267\u884c\u6d41\u7a0b\u548c\u4f5c\u7528\uff0c\u63ed\u793a\u4e86\u5b83\u4eec\u5728\u6784\u5efaAndroid\u7cfb\u7edf\u4e2d\u7684\u91cd\u8981\u89d2\u8272\u548c\u529f\u80fd\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.swreader.com\/index.php\/2024\/06\/17\/android-build-system\/\" \/>\n<meta property=\"og:site_name\" content=\"TianYa Blog\" \/>\n<meta property=\"article:published_time\" content=\"2024-06-16T16:19:48+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-06-18T14:51:55+00:00\" \/>\n<meta name=\"author\" content=\"zdm\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"zdm\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.swreader.com\\\/index.php\\\/2024\\\/06\\\/17\\\/android-build-system\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.swreader.com\\\/index.php\\\/2024\\\/06\\\/17\\\/android-build-system\\\/\"},\"author\":{\"name\":\"zdm\",\"@id\":\"https:\\\/\\\/www.swreader.com\\\/#\\\/schema\\\/person\\\/9c90501e33afc9307d757bc8cfaf1c6f\"},\"headline\":\"Android Build System(1)\",\"datePublished\":\"2024-06-16T16:19:48+00:00\",\"dateModified\":\"2024-06-18T14:51:55+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.swreader.com\\\/index.php\\\/2024\\\/06\\\/17\\\/android-build-system\\\/\"},\"wordCount\":274,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/www.swreader.com\\\/#\\\/schema\\\/person\\\/9c90501e33afc9307d757bc8cfaf1c6f\"},\"keywords\":[\"Android\",\"Build\",\"linux\"],\"articleSection\":[\"Android\"],\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.swreader.com\\\/index.php\\\/2024\\\/06\\\/17\\\/android-build-system\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.swreader.com\\\/index.php\\\/2024\\\/06\\\/17\\\/android-build-system\\\/\",\"url\":\"https:\\\/\\\/www.swreader.com\\\/index.php\\\/2024\\\/06\\\/17\\\/android-build-system\\\/\",\"name\":\"Android Build System(1) - TianYa Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.swreader.com\\\/#website\"},\"datePublished\":\"2024-06-16T16:19:48+00:00\",\"dateModified\":\"2024-06-18T14:51:55+00:00\",\"description\":\"\u672c\u6587\u8be6\u7ec6\u603b\u7ed3\u4e86Android\u7f16\u8bd1\u7cfb\u7edf\u7684\u6574\u4f53\u67b6\u6784\u548c\u5173\u952e\u7ec4\u6210\u90e8\u5206\uff0c\u5305\u62ec\u4eceGNU Make\u548cShell\u5230ninja\u548ckati\u7684\u6f14\u8fdb\uff0c\u4ee5\u53caSoong\u548cBlueprint\u7684\u96c6\u6210\u3002\u8fdb\u4e00\u6b65\u5206\u6790\u4e86\u5728Android\u7f16\u8bd1\u8fc7\u7a0b\u4e2d\uff0c\u5173\u952e\u547d\u4ee4\u5982source\u3001lunch\u548csoong\u7684\u6267\u884c\u6d41\u7a0b\u548c\u4f5c\u7528\uff0c\u63ed\u793a\u4e86\u5b83\u4eec\u5728\u6784\u5efaAndroid\u7cfb\u7edf\u4e2d\u7684\u91cd\u8981\u89d2\u8272\u548c\u529f\u80fd\u3002\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.swreader.com\\\/index.php\\\/2024\\\/06\\\/17\\\/android-build-system\\\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.swreader.com\\\/index.php\\\/2024\\\/06\\\/17\\\/android-build-system\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.swreader.com\\\/index.php\\\/2024\\\/06\\\/17\\\/android-build-system\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\\\/\\\/www.swreader.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Android Build System(1)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.swreader.com\\\/#website\",\"url\":\"https:\\\/\\\/www.swreader.com\\\/\",\"name\":\"TianYa Blog\",\"description\":\"Technology And Life\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.swreader.com\\\/#\\\/schema\\\/person\\\/9c90501e33afc9307d757bc8cfaf1c6f\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.swreader.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-Hans\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.swreader.com\\\/#\\\/schema\\\/person\\\/9c90501e33afc9307d757bc8cfaf1c6f\",\"name\":\"zdm\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2670c9b6412a56381880b2ca03988f659e8a378fe7332238a4a741b660a60997?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2670c9b6412a56381880b2ca03988f659e8a378fe7332238a4a741b660a60997?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2670c9b6412a56381880b2ca03988f659e8a378fe7332238a4a741b660a60997?s=96&d=mm&r=g\",\"caption\":\"zdm\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2670c9b6412a56381880b2ca03988f659e8a378fe7332238a4a741b660a60997?s=96&d=mm&r=g\"},\"sameAs\":[\"http:\\\/\\\/www.swreader.com\"],\"url\":\"https:\\\/\\\/www.swreader.com\\\/index.php\\\/author\\\/zdm\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Android Build System(1) - TianYa Blog","description":"\u672c\u6587\u8be6\u7ec6\u603b\u7ed3\u4e86Android\u7f16\u8bd1\u7cfb\u7edf\u7684\u6574\u4f53\u67b6\u6784\u548c\u5173\u952e\u7ec4\u6210\u90e8\u5206\uff0c\u5305\u62ec\u4eceGNU Make\u548cShell\u5230ninja\u548ckati\u7684\u6f14\u8fdb\uff0c\u4ee5\u53caSoong\u548cBlueprint\u7684\u96c6\u6210\u3002\u8fdb\u4e00\u6b65\u5206\u6790\u4e86\u5728Android\u7f16\u8bd1\u8fc7\u7a0b\u4e2d\uff0c\u5173\u952e\u547d\u4ee4\u5982source\u3001lunch\u548csoong\u7684\u6267\u884c\u6d41\u7a0b\u548c\u4f5c\u7528\uff0c\u63ed\u793a\u4e86\u5b83\u4eec\u5728\u6784\u5efaAndroid\u7cfb\u7edf\u4e2d\u7684\u91cd\u8981\u89d2\u8272\u548c\u529f\u80fd\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.swreader.com\/index.php\/2024\/06\/17\/android-build-system\/","og_locale":"zh_CN","og_type":"article","og_title":"Android Build System(1) - TianYa Blog","og_description":"\u672c\u6587\u8be6\u7ec6\u603b\u7ed3\u4e86Android\u7f16\u8bd1\u7cfb\u7edf\u7684\u6574\u4f53\u67b6\u6784\u548c\u5173\u952e\u7ec4\u6210\u90e8\u5206\uff0c\u5305\u62ec\u4eceGNU Make\u548cShell\u5230ninja\u548ckati\u7684\u6f14\u8fdb\uff0c\u4ee5\u53caSoong\u548cBlueprint\u7684\u96c6\u6210\u3002\u8fdb\u4e00\u6b65\u5206\u6790\u4e86\u5728Android\u7f16\u8bd1\u8fc7\u7a0b\u4e2d\uff0c\u5173\u952e\u547d\u4ee4\u5982source\u3001lunch\u548csoong\u7684\u6267\u884c\u6d41\u7a0b\u548c\u4f5c\u7528\uff0c\u63ed\u793a\u4e86\u5b83\u4eec\u5728\u6784\u5efaAndroid\u7cfb\u7edf\u4e2d\u7684\u91cd\u8981\u89d2\u8272\u548c\u529f\u80fd\u3002","og_url":"https:\/\/www.swreader.com\/index.php\/2024\/06\/17\/android-build-system\/","og_site_name":"TianYa Blog","article_published_time":"2024-06-16T16:19:48+00:00","article_modified_time":"2024-06-18T14:51:55+00:00","author":"zdm","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"zdm","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.swreader.com\/index.php\/2024\/06\/17\/android-build-system\/#article","isPartOf":{"@id":"https:\/\/www.swreader.com\/index.php\/2024\/06\/17\/android-build-system\/"},"author":{"name":"zdm","@id":"https:\/\/www.swreader.com\/#\/schema\/person\/9c90501e33afc9307d757bc8cfaf1c6f"},"headline":"Android Build System(1)","datePublished":"2024-06-16T16:19:48+00:00","dateModified":"2024-06-18T14:51:55+00:00","mainEntityOfPage":{"@id":"https:\/\/www.swreader.com\/index.php\/2024\/06\/17\/android-build-system\/"},"wordCount":274,"commentCount":1,"publisher":{"@id":"https:\/\/www.swreader.com\/#\/schema\/person\/9c90501e33afc9307d757bc8cfaf1c6f"},"keywords":["Android","Build","linux"],"articleSection":["Android"],"inLanguage":"zh-Hans","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.swreader.com\/index.php\/2024\/06\/17\/android-build-system\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.swreader.com\/index.php\/2024\/06\/17\/android-build-system\/","url":"https:\/\/www.swreader.com\/index.php\/2024\/06\/17\/android-build-system\/","name":"Android Build System(1) - TianYa Blog","isPartOf":{"@id":"https:\/\/www.swreader.com\/#website"},"datePublished":"2024-06-16T16:19:48+00:00","dateModified":"2024-06-18T14:51:55+00:00","description":"\u672c\u6587\u8be6\u7ec6\u603b\u7ed3\u4e86Android\u7f16\u8bd1\u7cfb\u7edf\u7684\u6574\u4f53\u67b6\u6784\u548c\u5173\u952e\u7ec4\u6210\u90e8\u5206\uff0c\u5305\u62ec\u4eceGNU Make\u548cShell\u5230ninja\u548ckati\u7684\u6f14\u8fdb\uff0c\u4ee5\u53caSoong\u548cBlueprint\u7684\u96c6\u6210\u3002\u8fdb\u4e00\u6b65\u5206\u6790\u4e86\u5728Android\u7f16\u8bd1\u8fc7\u7a0b\u4e2d\uff0c\u5173\u952e\u547d\u4ee4\u5982source\u3001lunch\u548csoong\u7684\u6267\u884c\u6d41\u7a0b\u548c\u4f5c\u7528\uff0c\u63ed\u793a\u4e86\u5b83\u4eec\u5728\u6784\u5efaAndroid\u7cfb\u7edf\u4e2d\u7684\u91cd\u8981\u89d2\u8272\u548c\u529f\u80fd\u3002","breadcrumb":{"@id":"https:\/\/www.swreader.com\/index.php\/2024\/06\/17\/android-build-system\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.swreader.com\/index.php\/2024\/06\/17\/android-build-system\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.swreader.com\/index.php\/2024\/06\/17\/android-build-system\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.swreader.com\/"},{"@type":"ListItem","position":2,"name":"Android Build System(1)"}]},{"@type":"WebSite","@id":"https:\/\/www.swreader.com\/#website","url":"https:\/\/www.swreader.com\/","name":"TianYa Blog","description":"Technology And Life","publisher":{"@id":"https:\/\/www.swreader.com\/#\/schema\/person\/9c90501e33afc9307d757bc8cfaf1c6f"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.swreader.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-Hans"},{"@type":["Person","Organization"],"@id":"https:\/\/www.swreader.com\/#\/schema\/person\/9c90501e33afc9307d757bc8cfaf1c6f","name":"zdm","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/secure.gravatar.com\/avatar\/2670c9b6412a56381880b2ca03988f659e8a378fe7332238a4a741b660a60997?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/2670c9b6412a56381880b2ca03988f659e8a378fe7332238a4a741b660a60997?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/2670c9b6412a56381880b2ca03988f659e8a378fe7332238a4a741b660a60997?s=96&d=mm&r=g","caption":"zdm"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/2670c9b6412a56381880b2ca03988f659e8a378fe7332238a4a741b660a60997?s=96&d=mm&r=g"},"sameAs":["http:\/\/www.swreader.com"],"url":"https:\/\/www.swreader.com\/index.php\/author\/zdm\/"}]}},"_links":{"self":[{"href":"https:\/\/www.swreader.com\/index.php\/wp-json\/wp\/v2\/posts\/19","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.swreader.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.swreader.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.swreader.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.swreader.com\/index.php\/wp-json\/wp\/v2\/comments?post=19"}],"version-history":[{"count":3,"href":"https:\/\/www.swreader.com\/index.php\/wp-json\/wp\/v2\/posts\/19\/revisions"}],"predecessor-version":[{"id":39,"href":"https:\/\/www.swreader.com\/index.php\/wp-json\/wp\/v2\/posts\/19\/revisions\/39"}],"wp:attachment":[{"href":"https:\/\/www.swreader.com\/index.php\/wp-json\/wp\/v2\/media?parent=19"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.swreader.com\/index.php\/wp-json\/wp\/v2\/categories?post=19"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.swreader.com\/index.php\/wp-json\/wp\/v2\/tags?post=19"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}