How to tell Gradle not to exclude .so files in my .jar dependency when building an .apk?

I have a .jar dependency which comes with .so library inside it.

              -----*.class files

The jar makes use of this .so library internally, and I’m building an Android app that makes use of the jar.

Everything is good until after I build the apk : by exploring it using 7zip, I discover that the .so files have disappeared, leading to all sorts of errors when using the app.

So is there any way to tell Gradle not to exclude the .so files when building? I don’t want to copy them manually into a folder in my Android Project, since I’m not using them directly, but the .jar library is the one loading them.

Here is my build.gradle :

apply plugin: ''

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId ""
        minSdkVersion 24
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner ""
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), ''

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation ''
    implementation ''
    implementation ''
    testImplementation 'junit:junit:4.12'
    androidTestImplementation ''
    androidTestImplementation ''
    implementation files('libs/lib1.jar')
    implementation files('libs/lib2.jar')

Thanks in advance

I think you are best to ask these sorts of android plugin questions on the adt-dev forum