mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-25 15:19:42 -06:00
Android: Allow NDK location to be overridden
This commit is contained in:
@ -161,6 +161,14 @@ String getGitPath() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
String getNdkPath() {
|
String getNdkPath() {
|
||||||
|
def propsFile = rootProject.file("build.properties")
|
||||||
|
def ndkPath = null
|
||||||
|
if (propsFile.canRead()) {
|
||||||
|
def buildProperties = new Properties()
|
||||||
|
buildProperties.load(new FileInputStream(propsFile))
|
||||||
|
ndkPath = buildProperties.ndkPath
|
||||||
|
}
|
||||||
|
if (ndkPath == null) {
|
||||||
try {
|
try {
|
||||||
def stdout = new ByteArrayOutputStream()
|
def stdout = new ByteArrayOutputStream()
|
||||||
|
|
||||||
@ -171,16 +179,16 @@ String getNdkPath() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def ndkCmdPath = stdout.toString()
|
def ndkCmdPath = stdout.toString()
|
||||||
def ndkPath = ndkCmdPath.substring(0, ndkCmdPath.lastIndexOf('/'))
|
ndkPath = ndkCmdPath.substring(0, ndkCmdPath.lastIndexOf('/'))
|
||||||
|
|
||||||
project.logger.quiet("Gradle: Found Android NDK:" + ndkPath)
|
|
||||||
|
|
||||||
return ndkPath
|
|
||||||
} catch (ignored) {
|
} catch (ignored) {
|
||||||
project.logger.error("Gradle error: Couldn't find NDK.")
|
project.logger.error("Gradle error: Couldn't find NDK.")
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (ndkPath != null) {
|
||||||
|
project.logger.quiet("Gradle: Found Android NDK: " + ndkPath)
|
||||||
|
}
|
||||||
|
return ndkPath
|
||||||
|
}
|
||||||
|
|
||||||
String getAbi() {
|
String getAbi() {
|
||||||
String taskName = getGradle().startParameter.taskNames[0]
|
String taskName = getGradle().startParameter.taskNames[0]
|
||||||
|
Reference in New Issue
Block a user