{"id":846,"date":"2021-12-18T20:23:09","date_gmt":"2021-12-18T12:23:09","guid":{"rendered":"https:\/\/blog.cauchyschwarz.com\/?p=846"},"modified":"2021-12-18T20:23:13","modified_gmt":"2021-12-18T12:23:13","slug":"%e5%8a%a0%e9%80%9fgradle%e6%9e%84%e5%bb%ba","status":"publish","type":"post","link":"https:\/\/blog.cauchyschwarz.com\/?p=846","title":{"rendered":"\u52a0\u901fgradle\u6784\u5efa"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\" id=\"%E5%8E%9F%E5%9C%B0%E5%9D%80\"><a href=\"https:\/\/stackoverflow.com\/a\/19500539\/5357784\">\u539f\u5730\u5740<\/a><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Android Studio gradle\u6784\u5efa\u52a0\u901ftips:<br>\u5728gradle.properties\u6587\u4ef6\u4e2d\u6dfb\u52a0\u4ee5\u4e0b\u9009\u9879\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\"># IDE (e.g. Android Studio) users:\n# Settings specified in this file will override any Gradle settings\n# configured through the IDE.\n\n# For more details on how to configure your build environment visit\n# http:<em>\/\/www.gradle.org\/docs\/current\/userguide\/build_environment.html<\/em>\n\n# The Gradle daemon aims to improve the startup and execution time of Gradle.\n# When set to true the Gradle daemon is to run the build.\n# TODO: disable daemon on CI, since builds should be clean and reliable on servers\norg.gradle.daemon=true\n\n# Specifies the JVM arguments used for the daemon process.\n# The setting is particularly useful for tweaking memory settings.\n# https:<em>\/\/medium.com\/google-developers\/faster-android-studio-builds-with-dex-in-process-5988ed8aa37e#.krd1mm27v<\/em>\norg.gradle.jvmargs=-Xmx5120m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8\n\n# When configured, Gradle will run in incubating parallel mode.\n# This option should only be used with decoupled projects. More details, visit\n# http:<em>\/\/www.gradle.org\/docs\/current\/userguide\/multi_project_builds.html#sec:decoupled_projects<\/em>\norg.gradle.parallel=true\n\n# Enables new incubating mode that makes Gradle selective when configuring projects. \n# Only relevant projects are configured which results in faster builds for large multi-projects.\n# http:<em>\/\/www.gradle.org\/docs\/current\/userguide\/multi_project_builds.html#sec:configuration_on_demand<\/em>\norg.gradle.configureondemand=true\n\n# Set to true or false to enable or disable the build cache. \n# If this parameter is not set, the build cache is disabled by default.\n# http:<em>\/\/tools.android.com\/tech-docs\/build-cache<\/em>\nandroid.enableBuildCache=true\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u4e2agradle.properties\u5728\u9879\u76ee\u6839\u76ee\u5f55\u4e0b\u5c31\u53ea\u5bf9\u9879\u76ee\u751f\u6548\uff0c\u82e5\u5728\u4ee5\u4e0b\u76ee\u5f55\u5c31\u5bf9\u8be5\u7528\u6237\u751f\u6548\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><code>\/home\/&lt;username&gt;\/.gradle\/<\/code>&nbsp;(Linux)<\/li><li><code>\/Users\/&lt;username&gt;\/.gradle\/<\/code>&nbsp;(Mac)<\/li><li><code>C:\\Users\\&lt;username&gt;\\.gradle<\/code>&nbsp;(Windows)<\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u539f\u5730\u5740 Android Studio gradle\u6784\u5efa\u52a0\u901ftips:\u5728gradle.properties\u6587\u4ef6\u4e2d\u6dfb\u52a0\u4ee5\u4e0b\u9009\u9879\uff1a \u8fd9\u4e2agradle.properties\u5728\u9879\u76ee\u6839\u76ee\u5f55\u4e0b\u5c31\u53ea\u5bf9\u9879\u76ee\u751f\u6548\uff0c\u82e5\u5728\u4ee5&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[49],"class_list":["post-846","post","type-post","status-publish","format-standard","hentry","category-10","tag-gradle"],"_links":{"self":[{"href":"https:\/\/blog.cauchyschwarz.com\/index.php?rest_route=\/wp\/v2\/posts\/846","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.cauchyschwarz.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.cauchyschwarz.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.cauchyschwarz.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.cauchyschwarz.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=846"}],"version-history":[{"count":1,"href":"https:\/\/blog.cauchyschwarz.com\/index.php?rest_route=\/wp\/v2\/posts\/846\/revisions"}],"predecessor-version":[{"id":847,"href":"https:\/\/blog.cauchyschwarz.com\/index.php?rest_route=\/wp\/v2\/posts\/846\/revisions\/847"}],"wp:attachment":[{"href":"https:\/\/blog.cauchyschwarz.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=846"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.cauchyschwarz.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=846"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.cauchyschwarz.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=846"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}