Gradle automatically handles up-to-date checks for output files and directories. This behavior sometimes causes the `copyAndRename*` task to fail on Windows machines when gradle tries to check on existing files in the output directories it doesn't have access to.
To fix the issue, we disable this gradle behavior following the instructions in https://docs.gradle.org/8.2/userguide/incremental_build.html#sec:disable-state-tracking
Once sensor listeners are registered, onSensorChanged() (and subsequently
getRotatedValues()) gets called multiple times per socond. Obtaining
WindowManager on each of those calls is superfluous and can be avoided
by extracting it to a lazy class val. getRotatedValue() can also be
called before checking sensor type, and used for each one of them,
resulting in less code repetition.
This PR prevents potential NPEs, and follows Kotlin conventions more closely
by replacing the unsafe !! operator with safe ?. (or ?.let) (usually
!! would only be used very rarely, and with a good reason - there is one
place left in this PR where !! makes sense), and by replacing Java style
'if (x != null)' with Kotlin's '?.'
- Update Android gradle plugin version from 7.2.1 to 8.2.0
- Update gradle version from 7.4.2 to 8.2
- Update target SDK from 33 to 34
- Update build tools version from 33.0.2 to 34.0.0
- Update kotlin version from 1.7.0 to 1.9.20
- Update Android fragment version from 1.3.6 to 1.6.2
- Update AndroidX window version from 1.0.0 to 1.2.0
The feature was added in Godot 4.2, but it goes against recommended best practices for permissions request, as such it's being reverted.
In its place, developers now have to explicitly request the permissions they need to access.
Currently the render thread is started / stopped when the activity is respectively resumed / paused. However, according to the `GLSurfaceView` documentation, this should be done instead when the activity is started / stopped, so this change updates the start / stop logic for the render thread to match the documentation.
- Add contexts to give a better sense of benchmarked areas.
- Add missing benchmarks and adjust some begin/end points.
- Clean up names.
- Improve Android's internal benchmarks in a similar manner.
Co-authored-by: Fredia Huya-Kouadio <fhuya@meta.com>
The issue occurred because during the 'close' event, the logic was trying to terminate the native engine on the UI thread instead of doing on the render thread.
- Provide api to retrieve the running Godot instance from a GodotHost
- Provide api for the GodotHost to register runtime GodotPlugin instances
- Hide the GodotService class until it's completed
- Include project setting to enable long press for Android devices
- Include project setting to enable pan and scale gestures on Android devices
When a hardware keyboard is connected, all key events come through so we can route them directly to the engine.
This is not the case for soft keyboards, for which the current logic was designed as it requires extra processing.
Decouples the Godot java entry point from the Android Fragment component. This enables the Godot component to be more easily reused across different types of Android components including Activities and Services.
The follow options were added to the (new) `run/window_placement/android_window` editor setting:
- `Same as Editor`: run the project in the same window as the editor
- `Side-by-side with Editor`: run the project in an adjacent window to the editor
- `Auto`: choose how to run the project based on the device screen size
- Fix issues with using a touchpad to click, drag, interact with the navigation controls, etc..
- Fix issues with panning with 2+ fingers
- Fix issues with using double-tap to magnify on the spatial editor
Move the benchmarking measuring methods from `Engine` to `OS` to allow for platform specific overrides (e.g: can be used to hook into platform specific benchmarking and tracing capabilities).
Adds a new OS::get_system_ca_certs method which can be implemented by
platforms to retrieve the list of trusted CA certificates using OS
specific APIs.
The function should return the certificates in PEM format, and is
currently implemented for Windows/macOS/LinuxBSD(*)/Android.
mbedTLS will fall back to bundled certificates when the OS returns no
certificates.
(*) LinuxBSD does not have a standardized certificates store location.
The current implementation will test for common locations and may
return an empty string on some distributions (falling back to the
bundled certificates).
A snapshot version is a version that has not yet been released which allows us to deploy the same transient version incrementally, without requiring projects to upgrade the artifact version they're consuming. Those projects can use the same version to get an updated snapshot version.
This addresses issues where some drivers are reporting they don't meet the vulkan hardware level 1 support requirements even though they render as expected when the check is removed.
- Add runtime check and abort when the device doesn't meet the requirements for vulkan support
- Add filters to the AndroidManifest when exporting with a vulkan renderer
Remove the XR export logic from the legacy build system:
- On Android, Godot 4 export requires the use of Android plugins which are not supported by the legacy build system
- Provides added flexibility for configuring the Android manifest for XR specific capabilities.
The issue was caused because the running game pid was not set, and thus had a value of `0`. When trying to stop the running game, the `EditorRun::stop()` logic would kill the process with pid 0, which on Android corresponds to the running app's own process, thus causing the editor to crash.
This issue did not happen on Godot 3 because pid with value of `0` are not considered valid.