android.dexOptions.preDexLibrariesを調べた

tips - Improving Build Server performance. :

The Gradle based build system has a strong focus on incremental builds. One way it is doing this in doing pre-dexing on the dependencies of each modules, so that each gets turned into its own dex file (ie converting its Java bytecode into Android bytecode). This allows the dex task to do less work and to only re-dex what changed and merge all the dex files.

While this is great for incremental builds, especially when running from the IDE, this makes the first compilation slower. In general build system will always perform clean builds and this pre-dexing becomes a penality. Since there will not be any incremental builds, it is really not needed to use pre-dexing.

まとめると

  • pre-dexingとは、インクリメンタルビルドのために依存ライブラリを事前にdexに変換すること
  • これはIDEでは必要な設定だけど、常にクリーンビルドするbuild serverでは余計な時間をとるだけなのでdisableしてよい

See Also: