Fix building Android Editor with separate arches
(cherry picked from commit fa03d6d3d30be7e9018f245ff42ead0a3ff911c0)
This commit is contained in:
1 parent
7f23e878f3
commit
af99bf93d3
2 files changed
+17
No files matched your search
@@ -42,6 +42,9 @@ ext {
|
||||
rootDir = "../../.."
|
||||
binDir = "$rootDir/bin/"
|
||||
androidEditorBuildsDir = "$binDir/android_editor_builds/"
|
||||
|
||||
// Used by the editor module to set abiFilters.
|
||||
detectedAbis = []
|
||||
}
|
||||
|
||||
def getSconsTaskName(String flavor, String buildType, String abi) {
|
||||
@@ -120,9 +123,18 @@ def generateBuildTasks(String flavor = "template", String edition = "standard",
|
||||
boolean excludeSconsBuildTasks = excludeSconsBuildTasks()
|
||||
boolean isTemplate = flavor == "template"
|
||||
String libsDir = isTemplate ? "lib/libs/" : "lib/libs/tools/"
|
||||
def validAbis = ["arm64-v8a", "armeabi-v7a", "x86_64", "x86"]
|
||||
for (String target : supportedFlavorsBuildTypes[flavor]) {
|
||||
File targetLibs = new File(libsDir + target)
|
||||
|
||||
if (targetLibs != null && targetLibs.isDirectory()) {
|
||||
targetLibs.listFiles()?.each { abiDir ->
|
||||
if (abiDir.isDirectory() && validAbis.contains(abiDir.name) && abiDir.listFiles()?.length > 0) {
|
||||
detectedAbis.add(abiDir.name)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
String targetSuffix = target
|
||||
|
||||
if (!excludeSconsBuildTasks || (targetLibs != null
|
||||
|
||||
@@ -166,6 +166,11 @@ android {
|
||||
android {
|
||||
dimension "android_distribution"
|
||||
missingDimensionStrategy 'products', 'editor'
|
||||
ndk {
|
||||
if (!detectedAbis.isEmpty()) {
|
||||
abiFilters += detectedAbis
|
||||
}
|
||||
}
|
||||
}
|
||||
horizonos {
|
||||
dimension "android_distribution"
|
||||
|
||||
Reference in new issue
Block a user