godot/platform/android
Rémi Verschelde 39facb35a0 SCons: Unify tools/target build type configuration
Implements https://github.com/godotengine/godot-proposals/issues/3371.

New `target` presets
====================

The `tools` option is removed and `target` changes to use three new presets,
which match the builds users are familiar with. These targets control the
default optimization level and enable editor-specific and debugging code:

- `editor`: Replaces `tools=yes target=release_debug`.
  * Defines: `TOOLS_ENABLED`, `DEBUG_ENABLED`, `-O2`/`/O2`
- `template_debug`: Replaces `tools=no target=release_debug`.
  * Defines: `DEBUG_ENABLED`, `-O2`/`/O2`
- `template_release`: Replaces `tools=no target=release`.
  * Defines: `-O3`/`/O2`

New `dev_build` option
======================

The previous `target=debug` is now replaced by a separate `dev_build=yes`
option, which can be used in combination with either of the three targets,
and changes the following:

- `dev_build`: Defines `DEV_ENABLED`, disables optimization (`-O0`/`/0d`),
  enables generating debug symbols, does not define `NDEBUG` so `assert()`
  works in thirdparty libraries, adds a `.dev` suffix to the binary name.

Note: Unlike previously, `dev_build` defaults to off so that users who
compile Godot from source get an optimized and small build by default.
Engine contributors should now set `dev_build=yes` in their build scripts or
IDE configuration manually.

Changed binary names
====================

The name of generated binaries and object files are changed too, to follow
this format:

`godot.<platform>.<target>[.dev][.double].<arch>[.<extra_suffix>][.<ext>]`

For example:
- `godot.linuxbsd.editor.dev.arm64`
- `godot.windows.template_release.double.x86_64.mono.exe`

Be sure to update your links/scripts/IDE config accordingly.

More flexible `optimize` and `debug_symbols` options
====================================================

The optimization level and whether to generate debug symbols can be further
specified with the `optimize` and `debug_symbols` options. So the default
values listed above for the various `target` and `dev_build` combinations
are indicative and can be replaced when compiling, e.g.:

`scons p=linuxbsd target=template_debug dev_build=yes optimize=debug`
will make a "debug" export template with dev-only code enabled, `-Og`
optimization level for GCC/Clang, and debug symbols. Perfect for debugging
complex crashes at runtime in an exported project.
2022-09-26 16:31:46 +02:00
..
api Cleanup Android C++ code 2022-05-31 17:11:05 +01:00
export Split rendering driver project setting into renderer_name and rendering_driver. To differentiate between a driver (e.g. Vulkan or D3D12) and a renderer (e.g. clustered or mobile renderer). 2022-09-19 10:26:10 -07:00
java Split rendering driver project setting into renderer_name and rendering_driver. To differentiate between a driver (e.g. Vulkan or D3D12) and a renderer (e.g. clustered or mobile renderer). 2022-09-19 10:26:10 -07:00
plugin Cleanup Android C++ code 2022-05-31 17:11:05 +01:00
vulkan Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
android_input_handler.cpp Cleanup the Android input logic implementation 2022-09-07 13:30:10 -07:00
android_input_handler.h Cleanup the Android input logic implementation 2022-09-07 13:30:10 -07:00
android_keys_utils.cpp Fix incorrect Android scancodes 2022-07-13 16:24:01 +01:00
android_keys_utils.h Fix incorrect Android scancodes 2022-07-13 16:24:01 +01:00
audio_driver_opensl.cpp Cleanup Android C++ code 2022-05-31 17:11:05 +01:00
audio_driver_opensl.h Cleanup Android C++ code 2022-05-31 17:11:05 +01:00
detect.py SCons: Unify tools/target build type configuration 2022-09-26 16:31:46 +02:00
dir_access_jandroid.cpp Additional fixes to the Android get_current_dir() implementation. 2022-08-30 10:04:12 -07:00
dir_access_jandroid.h Additional fixes to the Android get_current_dir() implementation. 2022-08-30 10:04:12 -07:00
display_server_android.cpp Replace Array return types with TypedArray 2022-08-22 22:42:36 +02:00
display_server_android.h Replace Array return types with TypedArray 2022-08-22 22:42:36 +02:00
file_access_android.cpp Replace File/Directory with FileAccess/DirAccess 2022-09-19 11:03:31 +02:00
file_access_android.h Replace File/Directory with FileAccess/DirAccess 2022-09-19 11:03:31 +02:00
file_access_filesystem_jandroid.cpp Replace File/Directory with FileAccess/DirAccess 2022-09-19 11:03:31 +02:00
file_access_filesystem_jandroid.h Replace File/Directory with FileAccess/DirAccess 2022-09-19 11:03:31 +02:00
java_class_wrapper.cpp Cleanup Android C++ code 2022-05-31 17:11:05 +01:00
java_godot_io_wrapper.cpp Replace Array return types with TypedArray 2022-08-22 22:42:36 +02:00
java_godot_io_wrapper.h Style: Cleanup header guards for consistency 2022-09-26 13:51:17 +02:00
java_godot_lib_jni.cpp Merge pull request #65501 from m4gr3d/fix_invalid_project_manager_path_main 2022-09-08 09:19:25 +02:00
java_godot_lib_jni.h Merge pull request #65501 from m4gr3d/fix_invalid_project_manager_path_main 2022-09-08 09:19:25 +02:00
java_godot_view_wrapper.cpp Cleanup Android C++ code 2022-05-31 17:11:05 +01:00
java_godot_view_wrapper.h Code quality: Fix header guards consistency 2022-07-25 11:17:40 +02:00
java_godot_wrapper.cpp Fix issue causing the project manager to crash because of missing path argument 2022-09-07 14:21:34 -07:00
java_godot_wrapper.h Style: Cleanup header guards for consistency 2022-09-26 13:51:17 +02:00
jni_utils.cpp Cleanup Android C++ code 2022-05-31 17:11:05 +01:00
jni_utils.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
logo.png Add logo attribution for Android, HTML5 and Linux platform icons 2021-09-11 19:34:10 +02:00
net_socket_android.cpp Cleanup Android C++ code 2022-05-31 17:11:05 +01:00
net_socket_android.h Cleanup Android C++ code 2022-05-31 17:11:05 +01:00
os_android.cpp Add get_distribution_name() and get_version() to OS 2022-09-16 11:17:36 +02:00
os_android.h Add get_distribution_name() and get_version() to OS 2022-09-16 11:17:36 +02:00
platform_config.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
README.md Improve platform-specific READMEs to add useful links 2022-08-25 17:50:53 +02:00
run_icon.png
SCsub SCons: Unify tools/target build type configuration 2022-09-26 16:31:46 +02:00
string_android.h Cleanup Android C++ code 2022-05-31 17:11:05 +01:00
thread_jandroid.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
thread_jandroid.h Cleanup Android C++ code 2022-05-31 17:11:05 +01:00
tts_android.cpp Cleanup Android C++ code 2022-05-31 17:11:05 +01:00
tts_android.h Replace most uses of Map by HashMap 2022-05-16 10:37:48 +02:00

Android platform port

This folder contains the Java and C++ (JNI) code for the Android platform port, using Gradle as a build system.

Documentation

Artwork license

logo.png and run_icon.png are licensed under Creative Commons Attribution 3.0 Unported per the Android logo usage guidelines:

The Android robot is reproduced or modified from work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License.