0

I tried all the methods which I found in search, but not helped.

Our company app already has 8 modules.

I had split one more feature, and it does not make significant build-time changes when I build in Android Studio. (about 7min 30sec)

And in Jenkins, before my split task, it usually takes time about 20 min(because of all the things re-download, not cached), but after the split task, it takes time about 30 minutes.

I profiled these tasks with --profile option, I found that ':app:minifyStageForQAWithR8' task was significantly slow after my split work. (more than 10 min)

But I don't know what parts I have to check and fix.. please help

Here is information about my project status.

  1. new module's proguard-rules.pro file is empty.

  2. new module's build.gradle

plugins {
    id 'com.android.library'
    id 'kotlin-android'
}

apply from: '../default.gradle'

android {
    defaultConfig {
        versionCode 1
        versionName "1.0"
    }

    lintOptions {
        abortOnError false
    }
}

dependencies {
    implementation project(':base')
}
  1. build.properties status
android.enableBuildCache=true
org.gradle.jvmargs=-Xmx4g -Dkotlin.daemon.jvm.options\="-Xmx2048M" -noverify
org.gradle.caching=true
org.gradle.parallel=true
org.gradle.configureondemand=true
kapt.incremental.apt=true
android.useAndroidX=true
android.enableJetifier=true
include_leakcanary=true
Woochan Lee
  • 324
  • 2
  • 9
  • Well, splitting APK builds several APKs based on specified ABIs in `splits` closure's `include` property. However, all modern Android devices run either on `armeabi-v7a` or `arm64-v8a` ABI. So you should try to build the split APKs only for 2 ABIs as `include "armeabi-v7a", "arm64-v8a"`. If you want the split APKs for `x86` and `x86_64` ABIs, you need to use a high-end build system with [adequate virtual memory assigned for gradle JVM](https://docs.gradle.org/current/userguide/build_environment.html#sec:configuring_jvm_memory). – Jay Aug 03 '21 at 05:22
  • Jetifier might be redundant - most libraries already migrated to AndroidX. Check with `::dependencies` gradle task. – Shlomi Katriel Aug 03 '21 at 05:50

0 Answers0