From 68b58d45c54fcb9e4861491f19137f065c4035b9 Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Tue, 5 May 2026 20:57:54 -1000 Subject: fix(ci): write version to gradle.properties instead of -P flags MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Parentheses in the version name (e.g. "(abc1234 message)") caused gradlew's internal eval to fail with "Syntax error: ( unexpected" because gradlew is /bin/sh and parens have special meaning in eval. Writing the values directly to gradle.properties avoids shell interpretation entirely — Gradle reads it as a plain key=value file. Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/android.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to '.github') diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index b303eb6..7e68aed 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -27,11 +27,12 @@ jobs: run: | COMMIT_SHORT=$(git rev-parse --short HEAD) COMMIT_MSG=$(git log -1 --pretty=format:'%s' | cut -c1-60) - echo "BUILD_VERSION_CODE=${{ github.run_number }}" >> $GITHUB_ENV - echo "BUILD_VERSION_NAME=1.0.${{ github.run_number }} (${COMMIT_SHORT} ${COMMIT_MSG})" >> $GITHUB_ENV + VN="1.0.${{ github.run_number }} (${COMMIT_SHORT} ${COMMIT_MSG})" + printf '\nbuildVersionCode=${{ github.run_number }}\nbuildVersionName=%s\n' "$VN" >> android-app/gradle.properties + echo "BUILD_VERSION_NAME=${VN}" >> $GITHUB_ENV - name: Build with Gradle - run: ./gradlew assembleDebug -PbuildVersionCode="$BUILD_VERSION_CODE" -PbuildVersionName="$BUILD_VERSION_NAME" + run: ./gradlew assembleDebug working-directory: android-app - name: upload artifact to Firebase App Distribution -- cgit v1.2.3