Gradle builds really slow with a multi-project structure

我只是一个虾纸丫 提交于 2019-11-29 23:02:27
rciovati

Doing a clean you actually delete the already predexed libraries.
As suggested in this thread you could save some time on clean builds by disabling predexing (because at the next build they will be deleted):

android {
  dexOptions {
    preDexLibraries = false
  }
}

According to this post.

Right now each project will pre-dex its dependencies on its own. This means 2 components depending on the same library will both run pre-dex on that library's classes.jar which is silly. We're looking at fixing this.

Did you try setting the parameters of the Gradles compiler?

If you have remote dependencies, each time you run the project it will be operated with remote resources using the network. You should define the instruction to the Gradles compiler to that him to work offline using:

--offline

Here I leave you a screenshot of the compiler settings for better performance:

Or what is the same...

Source: http://gradle.org/docs/current/userguide/gradle_command_line.html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!