title: openjdk platform binary use so much memory when build android app
body: <p>When I build android app it can take from 5 minutes to 15 minutes.
  How to solve problem whith memory. Is there a way to reduce memory consumption?
  How make build faster?</p>
  
  <p>my <strong>build.gradle</strong> :</p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 25
      buildToolsVersion "25.0.2"
      defaultConfig {
          applicationId "com.xxx.xxx"
          minSdkVersion 15
          targetSdkVersion 25
          versionCode 1
          versionName "1.0"
          testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
          jackOptions {
              enabled true
          }
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
      compileOptions {
          targetCompatibility 1.8
          sourceCompatibility 1.8
      }
      lintOptions {
          abortOnError false
          checkReleaseBuilds false
      }
  }
  
  dependencies {
      compile fileTree(dir: 'libs', include: ['*.jar'])
      androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
          exclude group: 'com.android.support', module: 'support-annotations'
      })
  
      compile('com.philliphsu:bottomsheetpickers:2.3.3') {
          exclude group: 'com.android.support', module: 'appcompat-v7'
          exclude group: 'com.android.support', module: 'design'
          exclude group: 'com.android.support', module: 'gridlayout-v7'
      }
  
      compile 'com.android.support:appcompat-v7:25.3.1'
      compile 'com.android.support:design:25.3.1'
      compile 'com.android.support:gridlayout-v7:25.3.1'
      compile 'com.philliphsu:bottomsheetpickers:2.3.3'
      compile 'com.vk:androidsdk:1.6.8'
      compile 'com.android.support:support-v4:25.3.1'
      compile 'com.jakewharton:butterknife:8.4.0'
      compile 'com.android.support.constraint:constraint-layout:1.0.2'
      annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0'
  }
  </code></pre>
  
  <p>also my <strong>gradle.properties</strong></p>
  
  <pre><code>org.gradle.jvmargs=-Xmx1536m
  org.gradle.daemon=true
  org.gradle.parallel=true
  </code></pre>
  
  <p>also add report
  <a href="https://i.stack.imgur.com/dQ7kU.png" rel="noreferrer"><img src="https://i.stack.imgur.com/dQ7kU.png" alt="enter image description here"></a></p>
  
  <p>Why it takes so long and how you can speed up the assembly of the project?</p>