mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 13:38:02 +02:00
Trying to fix Android pre-build
This commit is contained in:
parent
673a396fdc
commit
ca83999546
1 changed files with 17 additions and 14 deletions
|
@ -154,16 +154,18 @@ def options = [
|
||||||
|
|
||||||
def qmlRoot = new File(HIFI_ANDROID_PRECOMPILED, 'qt')
|
def qmlRoot = new File(HIFI_ANDROID_PRECOMPILED, 'qt')
|
||||||
|
|
||||||
def captureOutput = { String command ->
|
def captureOutput = { String command, List<String> commandArgs ->
|
||||||
def proc = command.execute()
|
def result
|
||||||
def sout = new StringBuilder(), serr = new StringBuilder()
|
new ByteArrayOutputStream().withStream { os ->
|
||||||
proc.consumeProcessOutput(sout, serr)
|
def execResult = exec {
|
||||||
proc.waitForOrKill(30000)
|
executable = command
|
||||||
def errorOutput = serr.toString()
|
args = commandArgs
|
||||||
if (!errorOutput.isEmpty()) {
|
standardOutput = os
|
||||||
throw new GradleException("Command '${command}' failed with error ${errorOutput}")
|
errorOutput = new ByteArrayOutputStream()
|
||||||
}
|
}
|
||||||
return sout.toString()
|
result = os.toString()
|
||||||
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
def relativize = { File root, File absolute ->
|
def relativize = { File root, File absolute ->
|
||||||
|
@ -177,12 +179,13 @@ def scanQmlImports = { File qmlRootPath ->
|
||||||
throw new GradleException('Unable to find required qmlimportscanner executable at ' + qmlImportCommandFile.parent.toString())
|
throw new GradleException('Unable to find required qmlimportscanner executable at ' + qmlImportCommandFile.parent.toString())
|
||||||
}
|
}
|
||||||
|
|
||||||
def command = qmlImportCommandFile.absolutePath +
|
def command = qmlImportCommandFile.absolutePath
|
||||||
" -rootPath ${qmlRootPath.absolutePath}" +
|
def args = [
|
||||||
" -importPath ${qmlRoot.absolutePath}/qml"
|
'-rootPath', qmlRootPath.absolutePath,
|
||||||
|
'-importPath', "${qmlRoot.absolutePath}/qml"
|
||||||
|
]
|
||||||
|
|
||||||
println command
|
def commandResult = captureOutput(command, args)
|
||||||
def commandResult = captureOutput(command)
|
|
||||||
new JsonSlurper().parseText(commandResult).each {
|
new JsonSlurper().parseText(commandResult).each {
|
||||||
if (!it.containsKey('path')) {
|
if (!it.containsKey('path')) {
|
||||||
println "Warning: QML import could not be resolved in any of the import paths: ${it.name}"
|
println "Warning: QML import could not be resolved in any of the import paths: ${it.name}"
|
||||||
|
|
Loading…
Reference in a new issue