mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 17:01:18 +02:00
Add gradle task runBreakpadDumpSyms
This commit is contained in:
parent
e1b5564c7b
commit
e2ddaeac02
2 changed files with 46 additions and 4 deletions
|
@ -74,6 +74,10 @@ android {
|
||||||
// so our merge has to depend on the external native build
|
// so our merge has to depend on the external native build
|
||||||
variant.externalNativeBuildTasks.each { task ->
|
variant.externalNativeBuildTasks.each { task ->
|
||||||
variant.mergeResources.dependsOn(task)
|
variant.mergeResources.dependsOn(task)
|
||||||
|
def dumpSymsTaskName = "runBreakpadDumpSyms${variant.name.capitalize()}";
|
||||||
|
def dumpSymsTask = rootProject.getTasksByName(dumpSymsTaskName, false).first()
|
||||||
|
dumpSymsTask.dependsOn(task)
|
||||||
|
variant.assemble.dependsOn(dumpSymsTask)
|
||||||
}
|
}
|
||||||
|
|
||||||
variant.mergeAssets.doLast {
|
variant.mergeAssets.doLast {
|
||||||
|
|
|
@ -151,11 +151,11 @@ def packages = [
|
||||||
checksum: '14b02795d774457a33bbc60e00a786bc'
|
checksum: '14b02795d774457a33bbc60e00a786bc'
|
||||||
],
|
],
|
||||||
breakpad: [
|
breakpad: [
|
||||||
file: 'breakpad.zip',
|
file: 'breakpad_dump_syms.zip',
|
||||||
versionId: '2OwvCCZrF171wnte5T44AnjTYFhhJsGJ',
|
versionId: 'udimLCwfB7tMbfGdE1CcLRt5p0.ehtoM',
|
||||||
checksum: 'a46062a3167dfedd4fb4916136e204d2',
|
checksum: '92b6ace2edb95ea82dca257cf0fe522b',
|
||||||
sharedLibFolder: 'lib',
|
sharedLibFolder: 'lib',
|
||||||
includeLibs: ['libbreakpad_client.a','libbreakpad.a']
|
includeLibs: ['libbreakpad_client.a']
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -549,6 +549,44 @@ task cleanDependencies(type: Delete) {
|
||||||
delete 'app/src/main/res/values/libs.xml'
|
delete 'app/src/main/res/values/libs.xml'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def runBreakpadDumpSyms = { buildType ->
|
||||||
|
def objDir = new File("${appDir}/build/intermediates/cmake/${buildType}/obj/arm64-v8a")
|
||||||
|
def stripDebugSymbol = "${appDir}/build/intermediates/transforms/stripDebugSymbol/${buildType}/0/lib/arm64-v8a/"
|
||||||
|
def outputDir = new File("${appDir}/build/tmp/breakpadDumpSyms")
|
||||||
|
if (!outputDir.exists()) {
|
||||||
|
outputDir.mkdirs()
|
||||||
|
}
|
||||||
|
|
||||||
|
objDir.eachFileRecurse (FileType.FILES) { file ->
|
||||||
|
if (file.name.endsWith('.so')) {
|
||||||
|
def output = file.name + ".sym"
|
||||||
|
def cmdArgs = [
|
||||||
|
file.toString(),
|
||||||
|
stripDebugSymbol
|
||||||
|
]
|
||||||
|
exec {
|
||||||
|
workingDir HIFI_ANDROID_PRECOMPILED + '/breakpad/bin'
|
||||||
|
commandLine './dump_syms'
|
||||||
|
args cmdArgs
|
||||||
|
standardOutput = new BufferedOutputStream(new FileOutputStream(new File(outputDir, output)))
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
task runBreakpadDumpSymsRelease() {
|
||||||
|
doLast {
|
||||||
|
runBreakpadDumpSyms("release");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
task runBreakpadDumpSymsDebug() {
|
||||||
|
doLast {
|
||||||
|
runBreakpadDumpSyms("debug");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// FIXME this code is prototyping the desired functionality for doing build time binary dependency resolution.
|
// FIXME this code is prototyping the desired functionality for doing build time binary dependency resolution.
|
||||||
|
|
Loading…
Reference in a new issue