Emre Kultursay
3b8d0bee4a
Fix detecting when Gradle is invoked from Studio
...
The existing 'idea.platform.prefix' system-property approach
only worked because of a Android Studio bug that leaks the
system properties from Android Studio into Gradle build:
- https://issuetracker.google.com/201075423
This bug was fixed in Android Studio 2023.3.1 (Jellyfish).
The correct way of identifying builds from Android Studio is to
use the following project property (not system property):
- android.injected.invoked.from.ide
2024-05-20 17:02:36 -07:00
Alexander Hartmann
ab9e377fe6
Fix InputEventScreenDrag on Android
2024-05-21 01:04:23 +02:00
Fredia Huya-Kouadio
5a74e5812b
Add logic to unregister the Godot plugins on engine termination
2024-05-19 19:27:04 -07:00
Fredia Huya-Kouadio
625b92e3cd
Input logic cleanup:
...
- Fix invalid detection of mouse input. Prioritize using the event tool type to detect the type of the event, and only use the event source as fallback.
- Ensure that pressure and tilt information is passed for touch drag events
- Consolidate logic and remove redundant methods
- Improve the logic to detect when external hardware keyboards are connected to the device
2024-05-19 14:08:01 -07:00
Fredia Huya-Kouadio
ab4fbbcaa7
Switch to the WindowInsetsAnimationCompat api
...
Replace the use of WindowInsetsAnimation with WindowInsetsAnimationCompat; the former was only introdcued in api 30 and caused a crash on older versions of Android.
Fixes https://github.com/godotengine/godot/issues/91773
2024-05-13 00:59:03 -07:00
A Thousand Ships
a0dbdcc3ab
Replace find
with contains/has
where applicable
...
* Replaces `find(...) != -1` with `contains` for `String`
* Replaces `find(...) == -1` with `!contains` for `String`
* Replaces `find(...) != -1` with `has` for containers
* Replaces `find(...) == -1` with `!has` for containers
2024-05-08 12:37:42 +02:00
Rémi Verschelde
7d03b1de0b
Style: Trim trailing whitespace and ensure newline at EOF
...
Found by apply the file_format checks again via #91597 .
2024-05-08 10:12:46 +02:00
Rémi Verschelde
e63252b421
Merge pull request #90705 from AThousandShips/foreach_list
...
Reduce and prevent unnecessary random-access to `List`
2024-05-07 09:04:44 +02:00
Rob Blanckaert
3093ef49bc
Fix missing space in missing tools error message.
...
Currently prints as `ANDROID_HOME is correct and cmdline-toolsare installed, or install NDK version`
2024-05-04 20:51:21 -07:00
A Thousand Ships
955d5affa8
Reduce and prevent unnecessary random-access to List
...
Random-access access to `List` when iterating is `O(n^2)` (`O(n)` when
accessing a single element)
* Removed subscript operator, in favor of a more explicit `get`
* Added conversion from `Iterator` to `ConstIterator`
* Remade existing operations into other solutions when applicable
2024-05-04 16:08:55 +02:00
Radiant
789c6ebdfd
Implement amplitude
to Input.vibrate_handheld
...
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
Co-authored-by: m4gr3d <m4gr3d@users.noreply.github.com>
2024-05-02 19:09:42 +03:00
Rémi Verschelde
9824a9003f
Merge pull request #91339 from TCROC/windows-apk-build-fix
...
Fix for Android build on Windows
2024-05-01 09:55:15 +02:00
Travis Lange
cc0d5a43cc
added fix for android build on windows
2024-04-29 20:32:41 -04:00
Rémi Verschelde
947f5a8741
Merge pull request #91247 from AThousandShips/callable_fix
...
Fix unsafe uses of `Callable.is_null()`
2024-04-29 10:10:32 +02:00
Thaddeus Crews
e0e8ce1fc0
SCons: Colorize warnings/errors during generation
2024-04-28 16:24:48 -05:00
A Thousand Ships
31e7ee63f2
Fix unsafe uses of Callable.is_null()
...
`Callable.is_null()` is not equivalent to `!Callable.is_valid()` and
doesn't guarantee the call is valid.
2024-04-27 16:22:57 +02:00
Fredia Huya-Kouadio
3a06b447cc
Cleanup Android file errors
...
Follow up to https://github.com/godotengine/godot/pull/90403
2024-04-22 07:48:45 -07:00
Rémi Verschelde
6cf03a5bbb
Merge pull request #90802 from m4gr3d/fix_android_gradle_build_copy_rename_permissions_error
...
Fix issue causing the `copyAndRename*` task to fail on occasions on Windows machines
2024-04-22 12:52:56 +02:00
Rémi Verschelde
8c474ddd49
Merge pull request #90710 from m4gr3d/fix_jstring_leaks
...
Fix leakage of JNI object references
2024-04-22 12:52:16 +02:00
Rémi Verschelde
e500046e00
Merge pull request #90611 from m4gr3d/automatically_generate_debug_keystore
...
Automatically generate the Android debug keystore
2024-04-22 12:52:03 +02:00
Rémi Verschelde
504d01b61e
Merge pull request #90403 from bruvzg/file_resize
...
[FileAccess] Implement `resize` method.
2024-04-22 12:51:55 +02:00
Fredia Huya-Kouadio
764de7fe31
Collapse the gdextension arguments into the GDExtensionData
struct
...
This is used to reduce the number of arguments to `OS::open_dynamic_library(...)`.
2024-04-19 07:56:02 -07:00
Fredia Huya-Kouadio
ede88cf59d
Fix loading GDExtension dependencies on Android
2024-04-19 07:55:08 -07:00
Fredia Huya-Kouadio
1cc935fa6c
Fix issue causing the copyAndRename*
task to fail on occasions on Windows machines
...
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
2024-04-17 08:38:32 -07:00
Fredia Huya-Kouadio
f291a4ed3a
Fix leakage of JNI object references
...
Fixes https://github.com/godotengine/godot/issues/87548
2024-04-15 10:30:18 -07:00
Fredia Huya-Kouadio
a8c9b59f3f
Automatically generate the Android debug keystore
...
Automatically generate the Android debug keystore when the Java SDK path is specified.
2024-04-12 23:53:28 -07:00
Fredia Huya-Kouadio
6fd5238955
Fix issue with resolving the path for the Android keystore file
...
The previous logic passed the path to the Android keystore as-is to an external tool. This causes the tool to fail if the path is Godot-specific (e.g: 'res://<path_to_keystore>'
2024-04-12 17:00:09 -07:00
bruvzg
88b3e68f93
[FileAccess] Implement resize
method.
2024-04-12 19:20:49 +03:00
melquiadess
0ce8365dd7
Standardize descriptions, add urls, remove deprecated tag from non-deprecated permission
2024-04-11 20:23:03 +01:00
Rémi Verschelde
e73f40e260
Merge pull request #87117 from DmitriySalnikov/rename_pdb
...
Add renaming of PDB files to avoid blocking them
2024-04-11 11:02:31 +02:00
Mikael Hermansson
a057158d75
Revert pack trimming introduced by #82084
2024-04-10 12:00:04 +02:00
bruvzg
bf558adcdd
[.NET] Disable output embedding on macOS, move it to the advanced options on other platforms.
2024-04-09 17:47:39 +03:00
Rémi Verschelde
0d0d23cb61
Merge pull request #90377 from melquiadess/add-post-notification-permission-to-a-list-of-available-permissions
...
Android: Add `POST_NOTIFICATIONS` permission to the list of permissions available in the Export dialog
2024-04-08 18:42:41 +02:00
Rémi Verschelde
6b4944ee67
Merge pull request #87042 from Mickeon/documentation-EditorExportPlatform-misc
...
Add miscellaneous documentation to some classes
2024-04-08 11:19:33 +02:00
melquiadess
739190ca2b
Add POST_NOTIFICATIONS permission to the list of permissions available in the Export dialog
2024-04-08 09:45:16 +01:00
Rémi Verschelde
3a73c04af6
Merge pull request #88840 from m4gr3d/update_android_export_advanced_options
...
Update the list of advanced export options for the Android platform
2024-04-05 12:15:48 +02:00
DmitriySalnikov
b73e740786
Add renaming of PDB files to avoid blocking them
2024-04-05 00:14:23 +03:00
melquiadess
f09d033156
Improve performance by extracting windowManager and getRotatedValues()
...
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.
2024-04-04 14:17:28 +01:00
Rémi Verschelde
82dd9b9916
Merge pull request #90147 from melquiadess/remove-redundant-semicolons
...
Android: Remove redundant semicolons from Kotlin/gradle files
2024-04-04 14:37:31 +02:00
Rémi Verschelde
c7606354c6
Merge pull request #90146 from melquiadess/extract-command-line-file-parsing-and-add-unit-tests
...
Android: Extract parsing command line file to a separate class + add unit tests
2024-04-04 14:37:28 +02:00
melquiadess
839600b744
Extract parsing command line file to a separate class + add unit tests
2024-04-04 10:18:57 +01:00
melquiadess
73908bbce2
Remove redundant semicolons from Kotlin/gradle files
2024-04-02 23:31:34 +01:00
melquiadess
70ea3e22a6
Use ?. (and ?.let) safe operators instead of !!
...
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 '?.'
2024-03-28 23:36:38 +00:00
bruvzg
dc01658ee9
[DisplayServer] Add separate feature flags for different native dialog types.
2024-03-26 15:18:06 +02:00
Alexander Hartmann
1a68f1425d
Fix EXIT_SUCCESS
on Android
2024-03-25 17:50:02 +01:00
Rémi Verschelde
ccb1cb4845
Merge pull request #89703 from V-Sekai/android-fix
...
Android: Fix UnsupportedOperationException remove from non-ArrayList
2024-03-25 15:25:50 +01:00
Lyuma
3262363664
android: Fix UnsupportedOperationException remove from non-ArrayList
2024-03-25 00:04:28 -07:00
beicause
428fa0dfa7
Fix gdextensionlibs.json storage path in Android gradle build
...
It should relative to gradle build directory
2024-03-17 01:11:36 +08:00
Rémi Verschelde
0475011c66
Merge pull request #82084 from ogapo/pr/pck-cache-merge
...
Merge `uid_cache.bin` and `global_script_class_cache.cfg` after mounting PCKs
2024-03-11 14:01:16 +01:00
Fredia Huya-Kouadio
900fc2a35a
Add PermissionsUtil#requestPermissions(...)
to provide the ability to request multiple permissions at a time
...
Fix https://github.com/GodotVR/godot_openxr_vendors/issues/101
2024-03-07 11:23:21 -08:00
David Nikdel
5e6adb4a2d
Merge uid_cache.bin and global_script_class_cache.cfg after mounting PCKs
...
fixes godotengine#82061
fixes godotengine#61556
Also, distinguish between main pack and DLC packs.
It's desirable to downloaded content to be as small as possible. This change avoids bloating non-main pack files with new versions of resources that are all read on startup and never used again. They have no effect if loaded after startup.
- project.godot/project.binary file
- extension_list.cfg
- app icon and boot_splash
- .ico and .icns files (these can still be opted in for DLC by listing them explicitly in the include filter)
2024-03-06 12:14:21 -05:00
Rémi Verschelde
13954fc33e
Merge pull request #87452 from bruvzg/native_menu
...
Move `global_menu_*` methods to a separate `NativeMenu` class.
2024-03-06 13:16:52 +01:00
Fredia Huya-Kouadio
90b43648c4
Update the Android export validation logic to account for the custom gradle android source template
...
Follow-up to https://github.com/godotengine/godot/pull/88297 to address the following issues:
- Ensure that the custom gradle android source template is valid. Show a warning if it's not
- Don't show an error when the official export templates are not installed but a custom android source template is specified
2024-03-05 01:32:14 -08:00
bruvzg
c65a667924
Move global_menu_*
methods to a separate NativeMenu
class.
2024-03-04 23:41:41 +02:00
Rémi Verschelde
3a08c646ee
Pre-commit: Update to clang-format 17.0.6 and black 24.2.0
2024-02-28 14:25:35 +01:00
Rémi Verschelde
b849d34012
Don't attempt shutting down adb on exit if not started
...
Fixes #88864 .
2024-02-26 13:37:06 +01:00
Rémi Verschelde
e7bf883068
Merge pull request #88611 from Alex2782/force_device_cpu_architecture
...
Display a warning if device CPU architecture is not active in the export preset.
2024-02-26 10:48:49 +01:00
Fredia Huya-Kouadio
68a1632938
Update the list of advanced export options for the Android platform
2024-02-25 13:40:33 -08:00
A Thousand Ships
9e6158d687
[Docs] Fix some experimental/deprecated hints
2024-02-23 19:48:53 +01:00
Alexander Hartmann
293c34a2d2
Display a warning if device CPU architecture is not active in the export preset.
2024-02-23 01:37:32 +01:00
Alexander Hartmann
e17cecf54a
Fix Compatibility Rendering (GLES3) on old and low budget devices.
...
Co-Authored-By: joined72 <19651914+joined72@users.noreply.github.com>
2024-02-22 00:24:08 +01:00
bruvzg
fc49964de4
Fix crash on documentation generation on macOS.
2024-02-19 13:42:27 +02:00
Rémi Verschelde
ec0adfd23e
Merge pull request #88419 from m4gr3d/add_export_preset_advanced_options_toggle
...
Add an `Advanced Options` toggle to the editor export preset
2024-02-19 00:08:22 +01:00
Rémi Verschelde
033821c595
Merge pull request #88245 from shana/simplify-mono-support-detection
...
C#: Let platforms signal if they support the mono module or not
2024-02-19 00:08:07 +01:00
Fredia Huya-Kouadio
6ef31541bf
Add an Advanced Options
toggle to the editor export preset
2024-02-18 10:43:58 -08:00
Rémi Verschelde
e697774f61
Merge pull request #87823 from KoBeWi/ban_adb
...
Don't invoke adb with no runnable Android preset
2024-02-17 15:54:49 +01:00
Rémi Verschelde
01323cd687
Merge pull request #88385 from m4gr3d/enable_legacy_packaging_main
...
Add export setting to specify whether the native libraries should be compressed for the gradle build
2024-02-17 00:26:42 +01:00
Rémi Verschelde
07095d2b19
Merge pull request #88382 from m4gr3d/enable_debug_symbols_android_studio
...
Always enable debug symbols when developing with Android Studio
2024-02-17 00:24:07 +01:00
Rémi Verschelde
66b33c15e4
Merge pull request #88297 from dsnopek/android-configure-gradle-path
...
Android: Allow using alternative Gradle build directory
2024-02-17 00:23:32 +01:00
David Snopek
a37ad265dc
Android: Allow using alternative Gradle build directory
2024-02-16 15:20:47 -06:00
Fredia Huya-Kouadio
a69a585c91
Add export setting to specify whether the native libraries should be compressed for the gradle build
2024-02-15 18:04:55 -08:00
Fredia Huya-Kouadio
af7569d604
Always enable debug symbols when developing with Android Studio
2024-02-15 17:03:28 -08:00
kobewi
343bfb112f
Don't invoke adb with no runnable Android preset
2024-02-15 22:37:32 +01:00
Rémi Verschelde
fba467c5b7
Merge pull request #88351 from BZ1234567890/issue-87059-master
...
[Android 14] Fix GodotEditText white box showing during editor load
2024-02-15 15:45:23 +01:00
Rémi Verschelde
ef5d6ccfb7
Merge pull request #86966 from Muller-Castro/value2ref-core
...
Add const lvalue ref to `core/*` container parameters
2024-02-15 15:44:43 +01:00
BZ1234567890
04798d6352
[Android 14] Fix GodotEditText white box showing during editor load
2024-02-15 01:06:18 +01:00
Thaddeus Crews
633dcf6dfd
SCons: "Environment" to "SConsEnvironment"
2024-02-14 09:26:47 -06:00
Muller-Castro
a8bc9f3e78
Add const lvalue ref to core/* container parameters
2024-02-14 11:20:36 -03:00
Rémi Verschelde
3a2fb42838
Merge pull request #85100 from ztc0611/fix-ios-focus-mainloop-notifs
...
Enhance mobile suspend MainLoop notifications
2024-02-14 14:07:54 +01:00
Rémi Verschelde
e5a3fd1e53
Merge pull request #88304 from m4gr3d/fix_gradle_build_for_non_ascii_path_main
...
Fix gradle build errors when the build path contains non-ASCII characters
2024-02-13 23:43:59 +01:00
Rémi Verschelde
afc49e52e4
Merge pull request #88130 from AlekseyKapustyanenko/Rotary_Input
...
Add rotary input support for Android platform
2024-02-13 23:43:33 +01:00
Rémi Verschelde
b6dee8850b
Merge pull request #87384 from bruvzg/sys_base_color
...
Add method to get "base" system UI color and system theme change callback.
2024-02-13 23:43:21 +01:00
Rémi Verschelde
68c583d30c
Merge pull request #86619 from Alex2782/fix_flag_decimal
...
Fix virtual keyboard for decimal values on Android
2024-02-13 23:43:11 +01:00
Fredia Huya-Kouadio
f1887a30f3
Fix gradle build errors when the build path contains non-ASCII characters
2024-02-13 14:31:08 -08:00
Andreia Gaita
21e524a798
C#: Let platforms signal if they support it or not
...
Instead of hardcoding platform names that support C#, let platforms
set a flag indicating if they support it. All public platforms
except web already support it, and it's a pain to maintain a patch
for this list just to add additional names of proprietary console
platforms.
This makes adding new platforms or variants or existing platforms
much easier, as the platform can signal what it supports/doesn't
support directly, and we can avoid harcoding platform names.
2024-02-13 22:48:43 +01:00
Alexander Hartmann
6f91c00056
Fix virtual keyboard for decimal values on Android
2024-02-13 22:20:47 +01:00
ALEKSEY KAPUSTYANENKO
d5c2a641f0
Add rotary input support. Fix documentation
2024-02-13 21:12:59 +04:00
bruvzg
ee53ae28df
Add method to get "base" system UI color (macOS/Windows) and system theme change callback.
2024-02-13 18:38:53 +02:00
bruvzg
94238d0462
[iOS/macOS] Add option to automatically build (and sign / archive) bundles.
2024-02-13 16:36:41 +02:00
Dario
73eff10c76
Finish splitting functionality of the Vulkan and D3D12 backends into RenderingDeviceDriver.
2024-02-12 10:02:18 -03:00
Rémi Verschelde
74b03edf1e
Merge pull request #82800 from Sauermann/fix-screen-mousemotion
...
Add screen-related attributes to mouse input events
2024-02-09 18:08:58 +01:00
Rémi Verschelde
67234eafc1
Merge pull request #88024 from Calinou/doc-android-package-unique-name
...
Improve documentation on Android package unique name
2024-02-07 11:05:10 +01:00
Rémi Verschelde
4f478a55cc
Merge pull request #86843 from RandomShaper/fix_null_ptr
...
Avoid several null-dereferences of ApiContextRD
2024-02-07 10:58:01 +01:00
Pedro J. Estébanez
d5a5dd52e8
Avoid several null-dereferences of ApiContextRD
2024-02-06 19:55:01 +01:00
Hugo Locurcio
111908c4ed
Improve documentation on Android package unique name
...
- Document `$genname` behavior.
- Update to match actual validation and Google Play guidelines.
2024-02-06 18:20:39 +01:00
Markus Sauermann
2235a1cbd0
Add screen-related attributes to mouse input events
2024-02-05 23:30:15 +01:00
Zach Coleman
fc7a63cbf3
Enhance mobile suspend MainLoop Notifications
2024-02-04 21:10:06 -05:00
Rémi Verschelde
51991e2014
Merge pull request #84674 from m4gr3d/add_flag_to_run_scons_from_gradle
...
Add parameter to allow generation of the Godot native shared libraries from gradle
2024-01-29 23:24:05 +01:00
Mel Collins
8406e60522
Add InputEventKey.location to tell left from right
...
This adds a new enum `KeyLocation` and associated property
`InputEventKey.location`, which indicates the left/right location of key
events which may come from one of two physical keys, eg. Shift, Ctrl.
It also adds simulation of missing Shift KEYUP events for Windows.
When multiple Shifts are held down at the same time, Windows natively
only sends a KEYUP for the last one to be released.
2024-01-26 14:42:28 +01:00
Fredia Huya-Kouadio
e04a38775b
Update Android dependencies for the project
...
- 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
2024-01-18 10:35:32 -08:00