Gradle builds really slow with a multi-project structure

后端 未结 3 1926
旧巷少年郎
旧巷少年郎 2020-12-24 07:12

When building with gradle on a multi-project setup containing roughly 140 projects/libraries, the build time took 1 hour and 22 minutes. And i was using --parallel

3条回答
  •  滥情空心
    2020-12-24 07:58

    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
      }
    }
    

提交回复
热议问题