Note: there is a bit of potential confusion about the difference between
/resources/builder.inc.sh (the full implementation for builder scripts),
and /resources/build/builder.inc.sh (the source script that builder
scripts should always use).
This allows us to make assumptions that will always be true for builder
scripts that may not be true for other scripts, such as setting base
folder.
Fixes#11324.
* Always `cd "$THIS_SCRIPT_PATH"`
* Remove unnecessary `cd` from all build.sh
* Remove unnecessary `set -eu` from all build.sh (and `# set -x`)
* Replace old build-utils.sh incantation in a few build.sh scripts
Fixes up scripts (except under /linux) to use `#!/usr/bin/env bash`
instead of `#!/bin/bash` or `#!/bin/sh` so that we don't end up with
the ancient version of bash supplied with macOS.
This became urgent with this PR, because of bash-4.xisms in
build-utils.sh, for example on line 572:
```
if [[ -v _builder_params[$e] ]]; then
```
While Android Studio Gradle plugin should automatically use a default version of build tools, we can specify it:
https://developer.android.com/studio/releases/build-tools
Attempting to resolve lint exceptions on the build agent.
When working on a new build script, I tripped over the `-?` question
mark help parameter here, as it needs to be escaped. Opted to fix all
the instances in our scripts, although AFAICT there would not have been
current bugs arising from this, as there were no conflicting one
character options lower in the case list.
Fixes#4019.
Rolls back #3009 and fixes base issue in alternative manner.
The core issue here was twofold:
1. We needed to set the window size to the whole screen in order for the
popups to visible and touchable. We implement this in
`onConfigureWindow`.
2. Once our window size is the whole screen, we need to tell the apps
which part of the window is our keyboard UI, in `onComputeInsets`.
This is the only part of the window which impacts the layout of the
underlying app. We had not set the `visibleTopInsets` property and
this caused the WeChat problems.
Finally, in order for this to work, we roll back the original fix
in #3009 as that one breaks the full-screen layout requirement.
Tested with a wide range of apps on Android 10, including WeChat and
Telegram. If @kienwt, @ericjding have capacity, would love to know if
this fix works for them also.
Note that this fix requires changes to consumers of Keyman Engine, so
sample and FV Keyboards updated accordingly.