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.

lib1.jar
       |
       -----com/company
              |
              -----*.class files
       -----libs
              |
              -----lib1.so

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: 'com.android.application'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.company.myapp"
        minSdkVersion 24
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    implementation 'com.android.support:design:28.0.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    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