1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-24 15:26:15 +00:00

OpenXR add core support for Khronos loader

This commit is contained in:
Bastiaan Olij
2025-05-28 14:55:55 +10:00
parent ef34c3d534
commit c056cae437
7 changed files with 213 additions and 16 deletions

View File

@@ -203,6 +203,8 @@ dependencies {
implementation "androidx.constraintlayout:constraintlayout:2.2.1"
implementation "org.bouncycastle:bcprov-jdk15to18:1.78"
implementation "org.khronos.openxr:openxr_loader_for_android:$versions.openxrLoaderVersion"
// Android XR dependencies
androidImplementation "org.godotengine:godot-openxr-vendors-androidxr:$versions.openxrVendorsVersion"
// Meta dependencies
@@ -217,3 +219,26 @@ dependencies {
androidTestImplementation "androidx.test:runner:$versions.testRunnerVersion"
androidTestUtil "androidx.test:orchestrator:$versions.testOrchestratorVersion"
}
/*
* Older versions of our vendor plugin include a loader that we no longer need.
* This code ensures those are removed.
*/
tasks.withType( com.android.build.gradle.internal.tasks.MergeNativeLibsTask) {
doFirst {
externalLibNativeLibs.each { jniDir ->
if (jniDir.getCanonicalPath().contains("godot-openxr-") || jniDir.getCanonicalPath().contains("godotopenxr")) {
// Delete the 'libopenxr_loader.so' files from the vendors plugin so we only use the version from the
// openxr loader dependency.
File armFile = new File(jniDir, "arm64-v8a/libopenxr_loader.so")
if (armFile.exists()) {
armFile.delete()
}
File x86File = new File(jniDir, "x86_64/libopenxr_loader.so")
if (x86File.exists()) {
x86File.delete()
}
}
}
}
}