I am breaking my application on the basis of ABI, and not on density, for example:
splits { abi { enable true reset() include 'x86', 'armeabi', 'armeabi-v7a', 'mips', 'arm64-v8a' universalApk true } }
I have several options, and 2 types of assembly (debugging and release). I want to put a universal apk file, which has its own libraries for all platforms, on a beta version of a beta version. As far as I understand, this is supported through the ext.betaDistributionApkFilePath attribute.
I can define this either at the buildType level or at the taste level. The problem is that I need both the type of assembly and the taste to choose my option - something like this:
android.applicationVariants.all { variant -> variant.ext.betaDistributionApkFilePath = "${buildDir}/outputs/apk/app-${variant.productFlavors[0].name}-universal-${variant.buildType.name}.apk" }
or
gradle.taskGraph.beforeTask { Task task -> if(task.name ==~ /crashlyticsUploadDistribution.*/) { System.out.println("task name: ${task.name}"); android.applicationVariants.all { variant -> System.out.println("match: crashlyticsUploadDistribution${variant.name}"); if(task.name ==~ /(?i)crashlyticsUploadDistribution${variant.name}/){ ext.betaDistributionApkFilePath = "${buildDir}/outputs/apk/app-${variant.productFlavors[0].name}-universal-${variant.buildType.name}.apk" System.out.println(ext.betaDistributionApkFilePath); } } }
Unfortunately, this does not work - is there a way to do it now?
source share