mirror of https://github.com/auygun/kaliber.git
Unify arch types in gradle and gn
This commit is contained in:
parent
ea93f80aa1
commit
05252bfae8
|
@ -17,18 +17,14 @@ abstract class WriteFileTask extends DefaultTask {
|
|||
}
|
||||
|
||||
class Utils implements Plugin<Project> {
|
||||
final def ABI_CODES = ["Arm7": "armeabi-v7a",
|
||||
"Arm8": "arm64-v8a",
|
||||
"X86_64": "x86_64",
|
||||
final def ABI_CODES = ["Arm": "armeabi-v7a",
|
||||
"Arm64": "arm64-v8a",
|
||||
"X64": "x86_64",
|
||||
"X86": "x86"].asImmutable()
|
||||
final def ARCH_CODES = ["armeabi-v7a": "Arm7",
|
||||
"arm64-v8a": "Arm8",
|
||||
"x86_64": "X86_64",
|
||||
final def ARCH_CODES = ["armeabi-v7a": "Arm",
|
||||
"arm64-v8a": "Arm64",
|
||||
"x86_64": "X64",
|
||||
"x86": "X86"].asImmutable()
|
||||
final def CPU_CODES = ["Arm7": "arm",
|
||||
"Arm8": "arm64",
|
||||
"X86_64": "x64",
|
||||
"X86": "x86"].asImmutable()
|
||||
|
||||
def project
|
||||
|
||||
|
@ -100,7 +96,7 @@ class Utils implements Plugin<Project> {
|
|||
|
||||
def generateGnArgsContent(String buildType, String arch) {
|
||||
def content = 'target_os="android"\n'
|
||||
content += 'target_cpu="' + CPU_CODES[arch] + '"\n'
|
||||
content += 'target_cpu="' + arch.uncapitalize() + '"\n'
|
||||
content += "is_debug=${buildType != 'Release'}\n"
|
||||
content += 'ndk="' + project.android.ndkDirectory + '"\n'
|
||||
content += "ndk_api=${project.rootProject.ext.minSdk}\n"
|
||||
|
@ -167,13 +163,13 @@ android {
|
|||
}
|
||||
}
|
||||
|
||||
arm7 {
|
||||
arm {
|
||||
dimension 'arch'
|
||||
ndk {
|
||||
abiFilters = ["armeabi-v7a"]
|
||||
}
|
||||
}
|
||||
arm8 {
|
||||
arm64 {
|
||||
dimension 'arch'
|
||||
ndk {
|
||||
abiFilters = ["arm64-v8a"]
|
||||
|
@ -185,7 +181,7 @@ android {
|
|||
abiFilters = ["x86"]
|
||||
}
|
||||
}
|
||||
x86_64 {
|
||||
x64 {
|
||||
dimension 'arch'
|
||||
ndk {
|
||||
abiFilters = ["x86_64"]
|
||||
|
|
Loading…
Reference in New Issue