Copilot: Update instructions, place NDK in /tmp

IS_COPILOT=true isn't persistent, so copilot is instructed to set this var for every gradle build on the command line itself by the "copilot-instructions.md" file.
This commit is contained in:
Catfriend1 2025-07-14 04:07:18 +02:00
parent cc4f0a07c6
commit 3b1e46a455
2 changed files with 13 additions and 11 deletions

View File

@ -1,12 +1,14 @@
## Copilot Coding Agent Configuration
If running in coding agent (padawan) mode on GitHub, make sure to use the
`report_progress` tool to push commits to the remote repository. Do not attempt
to use git push as you do not have write access to the repository directly.
We use Java 21 (eclipse-temurin:21-jdk-jammy) to build the app via gradle.
Only use the "debug" flavor of the app when you make builds.
You cannot build "release" as the signing keys are not part of the repository.
If you do gradle tasks, you need to prefix them by the following env var to decrease build time. If you forget to set the env var "IS_COPILOT" to "true", the gradle buildNative task will execute which is not required for your work.
```bash
IS_COPILOT=true
```
Example: "IS_COPILOT=true gradle assembleDebug"
Only use the "debug" flavor of the app when you make gradle builds.
You cannot gradle build "release" as the signing keys are not part of the repository.
Do not try to upgrade the kotlin version in "gradle/libs.versions.toml", it will throw a lot of warnings and errors.

View File

@ -18,7 +18,7 @@ jobs:
contents: read
env:
IS_COPILOT: true
COPILOT_BUILDTOOLS_DIR: /tmp/copilot-build-tools
steps:
- name: Checkout code including submodules
@ -49,10 +49,10 @@ jobs:
ANDROID_NDK_VERSION=r28
ANDROID_NDK_ZIP="android-ndk-${ANDROID_NDK_VERSION}-linux.zip"
ANDROID_NDK_URL="https://dl.google.com/android/repository/${ANDROID_NDK_ZIP}"
wget -q "$ANDROID_NDK_URL"
unzip -q "$ANDROID_NDK_ZIP" -d $HOME
echo "ANDROID_NDK_HOME=$HOME/android-ndk-${ANDROID_NDK_VERSION}" >> $GITHUB_ENV
echo "$HOME/android-ndk-${ANDROID_NDK_VERSION}" >> $GITHUB_PATH
mkdir -p "$COPILOT_BUILDTOOLS_DIR"
wget -q "$ANDROID_NDK_URL" -O "$COPILOT_BUILDTOOLS_DIR/$ANDROID_NDK_ZIP"
unzip -q "$COPILOT_BUILDTOOLS_DIR/$ANDROID_NDK_ZIP" -d "$COPILOT_BUILDTOOLS_DIR"
echo "ANDROID_NDK_HOME=$COPILOT_BUILDTOOLS_DIR/android-ndk-${ANDROID_NDK_VERSION}" >> $GITHUB_ENV
- name: Cache Gradle packages
uses: actions/cache@v3