Skip to content

Commit 87a7aca

Browse files
author
Fredia Huya-Kouadio
committed
Update the plugin to Godot v2 Android plugin
1 parent c1db954 commit 87a7aca

28 files changed

Lines changed: 877 additions & 31 deletions

.github/workflows/build-addon-on-push.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ jobs:
3636
cp aar/CHANGES.md asset/addons/godotopenxr/GodotOpenXRLoaders_CHANGES.md
3737
- name: Adding vendor licences
3838
run: |
39-
cp aar/godotopenxrmeta/LICENSE.txt asset/addons/godotopenxr/export/meta/
40-
cp aar/godotopenxrpico/src/main/jniLibs/arm64-v8a/README.md asset/addons/godotopenxr/export/pico/LICENSE.md
41-
cp aar/godotopenxrkhr/LICENSE asset/addons/godotopenxr/export/khr/LICENSE
39+
cp aar/godotopenxrmeta/LICENSE.txt asset/addons/godotopenxr/.export/meta/
40+
cp aar/godotopenxrpico/src/main/jniLibs/arm64-v8a/README.md asset/addons/godotopenxr/.export/pico/LICENSE.md
41+
cp aar/godotopenxrkhr/LICENSE asset/addons/godotopenxr/.export/khr/LICENSE
4242
- name: Create Godot OpenXR loader addon artifact
4343
uses: actions/upload-artifact@v3
4444
with:

CHANGES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## 2.0.0
44
- Update to the new Godot 4.2 Android plugin packaging format
5+
- Update the plugin to Godot v2 Android plugin
6+
- Update to the Godot 4.2 Android library
57

68
## 1.1.0
79
- Update Meta OpenXR loader to version 54

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ buildscript {
66
google()
77
mavenCentral()
88
maven { url "https://plugins.gradle.org/m2/" }
9+
maven { url "https://s01.oss.sonatype.org/content/repositories/snapshots/"}
910
}
1011
dependencies {
1112
classpath "com.android.tools.build:gradle:$versions.gradlePluginVersion"

config.gradle

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
1+
final snapshotGodotAndroidLib = "org.godotengine:godot:4.2.0.dev-SNAPSHOT"
2+
final stableGodotAndroidLib = "org.godotengine:godot:4.1.0.stable"
3+
14
ext {
25
versions = [
3-
gradlePluginVersion: '7.2.1',
6+
gradlePluginVersion: '7.4.0',
47
compileSdk : 33,
58
minSdk : 21,
69
targetSdk : 33,
7-
godotLibVersion : '4.1.0.stable',
810
javaVersion : JavaVersion.VERSION_11,
911
nexusPublishVersion : '1.3.0'
1012
]
13+
14+
libraries = [
15+
godotAndroidLib: snapshotGodotAndroidLib,
16+
]
1117
}
1218

1319
// Parse the release version from the gradle project properties (e.g: -Prelease_version=<version>)

demo/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Godot 4+ specific ignores
22
.godot/
3-
/addons/godotopenxr/export/*/*.aar
3+
/addons/godotopenxr/.bin/*/*.aar
44
/android/

demo/addons/godotopenxr/.export/.gdignore

Whitespace-only changes.

demo/addons/godotopenxr/export/godot_openxr_editor_export_plugin.gd renamed to demo/addons/godotopenxr/.export/godot_openxr_editor_export_plugin.gd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func _get_name() -> String:
1818
# Path to the Android library aar file
1919
# If this is not available, we fall back to the maven central dependency
2020
func _get_android_aar_file_path(debug: bool) -> String:
21-
return "res://addons/godotopenxr/export/" + _vendor + "/godotopenxr" + _vendor + "-" + ("debug.aar" if debug else "release.aar")
21+
return "res://addons/godotopenxr/.bin/" + _vendor + "/godotopenxr" + _vendor + "-" + ("debug.aar" if debug else "release.aar")
2222

2323

2424
# Maven central dependency used as fall back when the Android library aar file is not available
@@ -114,7 +114,7 @@ func _get_android_libraries(platform, debug) -> PackedStringArray:
114114
if not _supports_platform(platform):
115115
return PackedStringArray()
116116

117-
if _is_vendor_plugin_enabled() and _is_android_aar_file_available(debug):
117+
if _is_vendor_plugin_enabled() and _is_android_aar_file_available(debug):
118118
return PackedStringArray([_get_android_aar_file_path(debug)])
119119

120120
return PackedStringArray()

demo/addons/godotopenxr/export/godot_openxr_editor_plugin.gd renamed to demo/addons/godotopenxr/.export/godot_openxr_editor_plugin.gd

File renamed without changes.

demo/addons/godotopenxr/export/khr/godot_openxr_khr_editor_export_plugin.gd renamed to demo/addons/godotopenxr/.export/khr/godot_openxr_khr_editor_export_plugin.gd

File renamed without changes.

0 commit comments

Comments
 (0)