47
45

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

AndroidStudio gradle build高速化

Last updated at Posted at 2015-10-16

5分とかかかっててとても遅いので調べつついろいろやってみました
最終的に早ければ1分切るぐらいになったので満足

AndroidStudio 1.4
gradle 1.3.0

root/gradle.properties追加

org.gradle.daemon=true
org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
org.gradle.parallel=true
org.gradle.configureondemand=true

|プロパティ|意味|
|----|----|----|
|org.gradle.daemon|デーモンプロセスを使うか|
|org.gradle.jvmargs|実行時のJVM引数|
|org.gradle.parallel|gradleの並列ビルドモードを有効にする|
|org.gradle.configureondemand|関連するプロジェクトがある場合に必要な部分だけビルドする|

オフライン化

AndroidStudio > Preference > Build, Ececution, Deploymente > Build Tools > Gradle を開きOffline work にチェック

インクリメンタルビルド化

各モジュールの build.gradle でインクリメンタルビルドを有効化

android {
    (いろいろ)
    dexOptions {
        incremental true
    }
}
47
45
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
47
45

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?