|
|
|
@ -51,33 +51,100 @@ android {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
splits {
|
|
|
|
|
|
|
|
|
|
// Configures multiple APKs based on ABI.
|
|
|
|
|
abi {
|
|
|
|
|
// kinda of cheaty, would prefer to use if (System.getEnv("GOARCH") == "arm64") {
|
|
|
|
|
// but it doesn't want to work in this context
|
|
|
|
|
if (qt5AndroidDir.contains("arm64")) {
|
|
|
|
|
|
|
|
|
|
// Enables building multiple APKs per ABI.
|
|
|
|
|
enable true
|
|
|
|
|
splits {
|
|
|
|
|
|
|
|
|
|
// By default all ABIs are included, so use reset() and include to specify that we only
|
|
|
|
|
// want APKs for x86 and x86_64.
|
|
|
|
|
// Configures multiple APKs based on ABI.
|
|
|
|
|
abi {
|
|
|
|
|
|
|
|
|
|
// Resets the list of ABIs that Gradle should create APKs for to none.
|
|
|
|
|
reset()
|
|
|
|
|
// Enables building multiple APKs per ABI.
|
|
|
|
|
enable true
|
|
|
|
|
|
|
|
|
|
// Specifies a list of ABIs that Gradle should create APKs for.
|
|
|
|
|
// Note that because of the way that therecipe/qt bundles libraries
|
|
|
|
|
// only the specific architecture specified by GOARCH /GOARM will *actually*
|
|
|
|
|
// work so we currently have to do separate builds for each arch - this needs to be fixed.
|
|
|
|
|
include "armeabi-v7a", "arm64-v8a"
|
|
|
|
|
// By default all ABIs are included, so use reset() and include to specify that we only
|
|
|
|
|
// want APKs for x86 and x86_64.
|
|
|
|
|
|
|
|
|
|
// Specifies that we do not want to also generate a universal APK that includes all ABIs.
|
|
|
|
|
universalApk true
|
|
|
|
|
// Resets the list of ABIs that Gradle should create APKs for to none.
|
|
|
|
|
reset()
|
|
|
|
|
|
|
|
|
|
// Specifies a list of ABIs that Gradle should create APKs for.
|
|
|
|
|
// Note that because of the way that therecipe/qt bundles libraries
|
|
|
|
|
// only the specific architecture specified by GOARCH /GOARM will *actually*
|
|
|
|
|
// work so we currently have to do separate builds for each arch - this needs to be fixed.
|
|
|
|
|
include "arm64-v8a"
|
|
|
|
|
|
|
|
|
|
// Specifies that we do not want to also generate a universal APK that includes all ABIs.
|
|
|
|
|
// QT deploy has to be run twice to generate the libgo_base.so for each arch
|
|
|
|
|
universalApk false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
task linkBuildDebugArm64(type: Exec) {
|
|
|
|
|
workingDir '../build/build/outputs/apk/debug/'
|
|
|
|
|
commandLine 'ln', '-sf', 'build-arm64-v8a-debug.apk', 'build-debug.apk'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
task renameBuildReleaseArm64(type: Exec) {
|
|
|
|
|
workingDir '../build/build/outputs/apk/release/'
|
|
|
|
|
commandLine 'mv', 'build-arm64-v8a-release-unsigned.apk', 'build-release-unsigned.apk'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
afterEvaluate {
|
|
|
|
|
assembleDebug.finalizedBy(linkBuildDebugArm64)
|
|
|
|
|
assembleRelease.finalizedBy(renameBuildReleaseArm64)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
splits {
|
|
|
|
|
|
|
|
|
|
// Configures multiple APKs based on ABI.
|
|
|
|
|
abi {
|
|
|
|
|
|
|
|
|
|
// Enables building multiple APKs per ABI.
|
|
|
|
|
enable true
|
|
|
|
|
|
|
|
|
|
// By default all ABIs are included, so use reset() and include to specify that we only
|
|
|
|
|
// want APKs for x86 and x86_64.
|
|
|
|
|
|
|
|
|
|
// Resets the list of ABIs that Gradle should create APKs for to none.
|
|
|
|
|
reset()
|
|
|
|
|
|
|
|
|
|
// Specifies a list of ABIs that Gradle should create APKs for.
|
|
|
|
|
// Note that because of the way that therecipe/qt bundles libraries
|
|
|
|
|
// only the specific architecture specified by GOARCH /GOARM will *actually*
|
|
|
|
|
// work so we currently have to do separate builds for each arch - this needs to be fixed.
|
|
|
|
|
include "armeabi-v7a"
|
|
|
|
|
|
|
|
|
|
// Specifies that we do not want to also generate a universal APK that includes all ABIs.
|
|
|
|
|
// QT deploy has to be run twice to generate the libgo_base.so for each arch
|
|
|
|
|
universalApk false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
task linkBuildDebugArm7(type: Exec) {
|
|
|
|
|
workingDir '../build/build/outputs/apk/debug/'
|
|
|
|
|
commandLine 'ln', '-sf', 'build-armeabi-v7a-debug.apk', 'build-debug.apk'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
task renameBuildReleaseArm7(type: Exec) {
|
|
|
|
|
workingDir '../build/build/outputs/apk/release/'
|
|
|
|
|
commandLine 'mv', 'build-armeabi-v7a-release-unsigned.apk', 'build-release-unsigned.apk'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
afterEvaluate {
|
|
|
|
|
assembleDebug.finalizedBy(linkBuildDebugArm7)
|
|
|
|
|
assembleRelease.finalizedBy(renameBuildReleaseArm7)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lintOptions {
|
|
|
|
|
abortOnError true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|