init_dependency_root(): Moved to android_build_helper.sh
ANDROID_DEPENDENCIES_DIR: added to specify a storage for dependencies
when downloaded automatically.
ANDROID_BUILD_DIR: Changed the default in ci_build.sh.
ci_build.sh configures these 2 variables to no more use /tmp by default (
except for Android NDK), but a local clone subfolder.
This helps to find downloaded dependencies and generated binaries.
This avoid to have user permission conflicts, or conflicts with 2
different clones of LIBZMQ (for instance).
* Problem: Android NDK 22 download broken since support of NDK 23.
Due to the PR to support NDK 23.
With NDK 23, the archive file name has changed.
This change is handled by the PR to support NDK23, but now, only 23 and after
are supported.
Also, NDK 23 support introduced a 2nd occurence of the variable
HOST_PLATFORM, with another value. One occurence being exported,
this may confuse next developpers (and it actually confused me).
Solution: Code review
1st occurence is simply dropped, and the algorithm around is changed so that
there is no need of a 'host_platform' kind of stuff.
2nd occurrence is renamed to ANDROID_BUILD_PLATFORM.
Note that 'HOST' is replaced by 'BUILD', as this is the common naming
when talking about the build/compilation machine, when cross compiling.
A dedicated function is created in the helpers, to actually download
the NDK. As this function is made 'public', more checks are performed.
Note:
To be reported in CZMQ & ZYRE, via ZPROJECT, where NDK is downloaded
in 2 different files.
* Problem: Android build environment variables need clarifications.
Reason: All are spread and initialized throughout the code.
Solution: Declare, initialize and document environment variables on top of build.sh.
Side effect: This participates to documentation.
Seen when someone has to relaunch `ci_build.sh` manually, for troubleshooting,
or experiment(s), ci_build.sh stops as libraries are already built.
Solution: Clean more temporary/build folders before build.
Note:
To be reported in ZYRE/CZMQ via ZProject.
When called from ZYRE/CZMQ, it's difficult to identify which build script is
being executed
Solution: Modify each `echo` trace to show the project name and Android architecture in progress.
Note:
To be reported in ZYRE/CZMQ via ZProject.
Solution: Use `set -e`
Note:
To be reported in ZPROJECT, when generating the same for CZMQ & ZYRE.
Note:
`make clean` may fail when Makefile is not yet generated
(case of 1st call of build.sh after git clone).
Additionnaly, cleaned the dependency folder
(report of ZPROJECT generated scripts).
Solution: Modify the build scripts so the user can specify the platform
for which to build, e.g. `./build.sh arm`. This approach originally
significantly reduces the parameters which have to be set before running
the script.
Further the build process is documented in a README now.
Solution: Migrate build scripts from Android NDK r11c to r20.
- Standalone toolchain
- Migration from GCC to Clang
- Migration from libgnustl to libc++
- Dropped support for API level below 16 (Android 4.1), previously it was API level 9 (Android 2.3)
- Dropped support for mips architecture
- The build script now start the build of all 4 Android architectures (arm, arm64, x86, x86_64)