From 7fd49bbb2c0c691bde54a115912f762269e3e087 Mon Sep 17 00:00:00 2001 From: Aaron Kling Date: Fri, 24 May 2019 00:53:30 -0500 Subject: [PATCH] Add variant builds aarch64 is a 64-bit only build that was used for some time so users on the main builds could use armv7 dynarecs. Keeping for now so users of this variant won't lose updates. ra32 is 32-bit only. Google is mandating 64-bit support in all apps on the play store. So users of the main builds on 64-bit devices will no longer have access to 32-bit cores. This build will be available on alternate stores and via sideloading so cores with only 32-bit dynarecs can be used on 64-bit devices. --- pkg/android/phoenix/build.gradle | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/pkg/android/phoenix/build.gradle b/pkg/android/phoenix/build.gradle index f0cc8d6bd8..0fe3483d7d 100644 --- a/pkg/android/phoenix/build.gradle +++ b/pkg/android/phoenix/build.gradle @@ -22,6 +22,8 @@ android { compileSdkVersion 28 buildToolsVersion "28.0.3" + flavorDimensions "variant" + defaultConfig { externalNativeBuild { ndkBuild { @@ -30,6 +32,30 @@ android { } } + productFlavors { + normal { + dimension "variant" + } + aarch64 { + applicationIdSuffix '.aarch64' + resValue "string", "app_name", "RetroArch (AArch64)" + + dimension "variant" + ndk { + abiFilters 'arm64-v8a', 'x86_64' + } + } + ra32 { + applicationIdSuffix '.ra32' + resValue "string", "app_name", "RetroArch (32-bit)" + + dimension "variant" + ndk { + abiFilters 'armeabi-v7a', 'x86' + } + } + } + sourceSets { main { manifest.srcFile 'AndroidManifest.xml' @@ -39,6 +65,9 @@ android { jni.srcDirs = [] res.srcDirs = ['../phoenix-common/res'] } + aarch64 { + res.srcDirs = ['res64'] + } } externalNativeBuild {