There is no deobfuscation file associated with this App Bundle

Error in Google Play Console while publishing app:

There is no deobfuscation file associated with this App Bundle. 
If you use obfuscated code (R8/proguard), uploading a deobfuscation file 
will make crashes and ANRs easier to analyze and debug. Using R8/proguard 
can help reduce app size.

Solution is to add the following text in build.gradle file under android >> build types >> release section

minifyEnabled true

The complete android section might look like this:

android {
    compileSdkVersion rootProject.ext.compileSdkVersion
    defaultConfig {
        applicationId "aaaaaa"
        minSdkVersion rootProject.ext.minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion
        versionCode 5
        versionName "1.0.1"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        aaptOptions {
             // Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
             // Default: https://android.googlesource.com/platform/frameworks/base/+/282e181b58cf72b6ca770dc7ca5f91f135444502/tools/aapt/AaptAssets.cpp#61
            ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~'
        }
    }
    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}