If you see in the image Viewpager2 module is getting added in the APK even though i am not using it anywhere in the code ,This apk contains code of one library which would be uploaded as aar in the jitpack .
How to remove unused resources like Viewpager2 and many more from Library as we can't use shrinkResources true on a library.
This is increasing the APK size to a large amount .
When i use shrinkResources true on a moduleName it gives error as
Resource shrinker cannot be used for libraries.
Here's my build.gradle file .
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'com.google.android.material:material:1.1.0'
implementation project(path: ':moduleName')
}
Thanks in Advance .
