apply plugin: 'com.android.application' android { compileSdk 30 buildToolsVersion "30.0.3" defaultConfig { minSdk rootProject.ext.androidMinSdkVersion targetSdk rootProject.ext.androidTargetSdkVersion versionCode 1 versionName "1.0" multiDexEnabled false } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } compileOptions { sourceCompatibility JavaVersion.VERSION_11 targetCompatibility JavaVersion.VERSION_11 } applicationVariants.all { variant -> def buildType = variant.name.capitalize() def variantLowered = variant.name.toLowerCase() variant.outputs.all { outputFileName = "${variant.getFlavorName()}-${variant.versionName}.apk" } task "copyDex$buildType"(type: Copy) { dependsOn("assemble$buildType") def dexFilePath = "$buildDir/intermediates/dex/${variantLowered}/mergeDex${buildType}/classes.dex" from dexFilePath rename "classes.dex", "loader.dex" into "$rootProject.projectDir/out/dexes" } task "copy$buildType"() { dependsOn("copyDex$buildType") doLast { System.out.println("Dex and so files has been copy to ${rootProject.projectDir}${File.separator}out") } } } } dependencies { implementation 'de.upb.cs.swt:axml:2.1.1' compileOnly project(":hiddenapi-stubs") }