How to update a new version of a jar file in aar file already generated

Hello, I have an android SDK generated as an AAR file and includes an outdated jar library, my question is how to update this jar library from the gradle file of the app that using the SDK without creating a new SDK and include the new jar file.

currently I have the following inputs :

  • Aar file : ‘xxx.yyy.sss-3.0.0@aar’
  • Jar file : ‘xxxx-v1.0.jar’

gradle file of the SDK :

compile files('libs/xxxx-v1.0.jar')

gradle file of the App :

compile 'xxx.yyy.sss-3.0.0@aar

What I found out during my investigation is how to exclude a library like the following :

implementation('android.arch.work:work-runtime:1.0.0') { // needed because of a DexArchiveMergerException exclude group: 'com.google.guava', module: 'listenablefuture'}

I need help regarding how to include a new version of a Jar file (xxxx-v2.0.jar) in the SDK already generated from the gradle file of the App, and if there is any other solution it is welcome also.

Thank you