mirror of
https://github.com/JulianGro/overte.git
synced 2025-06-22 22:49:38 +02:00
Adding debug info
This commit is contained in:
parent
77d53441c0
commit
af29e10fe9
2 changed files with 47 additions and 7 deletions
|
@ -74,7 +74,7 @@ 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 dumpSymsTaskName = "uploadBreakpadDumpSyms${variant.name.capitalize()}";
|
||||||
def dumpSymsTask = rootProject.getTasksByName(dumpSymsTaskName, false).first()
|
def dumpSymsTask = rootProject.getTasksByName(dumpSymsTaskName, false).first()
|
||||||
dumpSymsTask.dependsOn(task)
|
dumpSymsTask.dependsOn(task)
|
||||||
variant.assemble.dependsOn(dumpSymsTask)
|
variant.assemble.dependsOn(dumpSymsTask)
|
||||||
|
|
|
@ -21,6 +21,8 @@ buildscript {
|
||||||
plugins {
|
plugins {
|
||||||
id 'de.undercouch.download' version '3.3.0'
|
id 'de.undercouch.download' version '3.3.0'
|
||||||
id "cz.malohlava" version "1.0.3"
|
id "cz.malohlava" version "1.0.3"
|
||||||
|
id "io.github.http-builder-ng.http-plugin" version "0.1.1"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
|
@ -550,9 +552,11 @@ task cleanDependencies(type: Delete) {
|
||||||
}
|
}
|
||||||
|
|
||||||
def runBreakpadDumpSyms = { buildType ->
|
def runBreakpadDumpSyms = { buildType ->
|
||||||
|
gradle.startParameter.showStacktrace = ShowStacktrace.ALWAYS
|
||||||
|
|
||||||
def objDir = new File("${appDir}/build/intermediates/cmake/${buildType}/obj/arm64-v8a")
|
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 stripDebugSymbol = "${appDir}/build/intermediates/transforms/stripDebugSymbol/${buildType}/0/lib/arm64-v8a/"
|
||||||
def outputDir = new File("${appDir}/build/tmp/breakpadDumpSyms")
|
def outputDir = new File("${appDir}/build/tmp/breakpadDumpSyms/${buildType}")
|
||||||
if (!outputDir.exists()) {
|
if (!outputDir.exists()) {
|
||||||
outputDir.mkdirs()
|
outputDir.mkdirs()
|
||||||
}
|
}
|
||||||
|
@ -564,18 +568,44 @@ def runBreakpadDumpSyms = { buildType ->
|
||||||
file.toString(),
|
file.toString(),
|
||||||
stripDebugSymbol
|
stripDebugSymbol
|
||||||
]
|
]
|
||||||
exec {
|
println ("Executing " + HIFI_ANDROID_PRECOMPILED + '/breakpad/bin' + "/dump_syms")
|
||||||
|
println ("Arguments " + cmdArgs)
|
||||||
|
def result = exec {
|
||||||
workingDir HIFI_ANDROID_PRECOMPILED + '/breakpad/bin'
|
workingDir HIFI_ANDROID_PRECOMPILED + '/breakpad/bin'
|
||||||
commandLine './dump_syms'
|
commandLine './dump_syms'
|
||||||
args cmdArgs
|
args cmdArgs
|
||||||
standardOutput = new BufferedOutputStream(new FileOutputStream(new File(outputDir, output)))
|
standardOutput = new BufferedOutputStream(new FileOutputStream(new File(outputDir, output)))
|
||||||
errorOutput = new ByteArrayOutputStream()
|
}
|
||||||
doLast {
|
println ("Done " + result)
|
||||||
println ("Exec error output: " + errorOutput.toString())
|
println ("E:[" + new File(outputDir, output+".err").text+ "]")
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
def uploadDumpSyms = { buildType ->
|
||||||
|
def tmpDir = "${appDir}/build/tmp/breakpadDumpSyms/${buildType}/"
|
||||||
|
def zipFilename = "symbols-${RELEASE_NUMBER}.zip"
|
||||||
|
def zipDir = "${appDir}/build/tmp/breakpadDumpSyms/"
|
||||||
|
zip {
|
||||||
|
from tmpDir
|
||||||
|
include '*/*'
|
||||||
|
archiveName zipFilename
|
||||||
|
destinationDir(file(zipDir))
|
||||||
|
}
|
||||||
|
|
||||||
|
httpTask {
|
||||||
|
config {
|
||||||
|
request.uri = 'https://gcalero998.sp.backtrace.io:6098/post?format=symbols&token=d65d0d184789ac40c121952001fd91dfba7e149899b1eeccd68ccffe91dd2fd0'
|
||||||
|
}
|
||||||
|
post {
|
||||||
|
request.uri.path = '/notify'
|
||||||
|
request.body = new File(zipDir, zipFilename).bytes
|
||||||
|
response.success {
|
||||||
|
println 'Symbols upload successful'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
task runBreakpadDumpSymsRelease() {
|
task runBreakpadDumpSymsRelease() {
|
||||||
|
@ -590,7 +620,17 @@ task runBreakpadDumpSymsDebug() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
task uploadBreakpadDumpSymsRelease(dependsOn: runBreakpadDumpSymsRelease) {
|
||||||
|
doLast {
|
||||||
|
uploadDumpSyms("release")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
task uploadBreakpadDumpSymsDebug(dependsOn: runBreakpadDumpSymsDebug) {
|
||||||
|
doLast {
|
||||||
|
uploadDumpSyms("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.
|
||||||
// See the comment on the qtBundle task above
|
// See the comment on the qtBundle task above
|
||||||
|
|
Loading…
Reference in a new issue