4 Commits

Author SHA1 Message Date
Hermes
87c77dc1fa ci: bump APK versionCode and timestamp AAB names
Some checks failed
Android build / build (push) Successful in 11m31s
Android build / build (release) Failing after 8m2s
2026-08-31 15:05:45 -05:00
Hermes
e53a33c7b5 fix: repair AGP upgrade file corruption
All checks were successful
Android build / build (push) Successful in 9m9s
2026-08-31 13:49:22 -05:00
Hermes
4bbcead398 build: upgrade AGP for Android 16 support
Some checks failed
Android build / build (push) Has been cancelled
2026-08-31 13:30:46 -05:00
Hermes
dcdf69d02a build: target Android 16 / API 36
All checks were successful
Android build / build (push) Successful in 12m16s
2026-08-31 12:17:46 -05:00
5 changed files with 45 additions and 10 deletions

View File

@@ -50,8 +50,8 @@ jobs:
set -o pipefail
sdkmanager \
"platform-tools" \
"platforms;android-35" \
"build-tools;35.0.0"
"platforms;android-36" \
"build-tools;36.0.0"
- name: Prepare optional release signing
if: github.event_name == 'release'
@@ -96,6 +96,29 @@ jobs:
set -euxo pipefail
printf 'sdk.dir=%s/.android/sdk\n' "$HOME" > local.properties
- name: Prepare CI build metadata
id: build_meta
shell: bash
run: |
set -euxo pipefail
timestamp_utc="$(date -u +%Y%m%d-%H%M%S)"
version_code="$(date -u +%s)"
project_name="$(basename "$GITHUB_REPOSITORY")"
python3 - "$version_code" <<'PY'
from pathlib import Path
import re, sys
path = Path('app/build.gradle.kts')
text = path.read_text(encoding='utf-8')
new_text, count = re.subn(r'(\bversionCode\s*=\s*)\d+', rf'\g<1>{sys.argv[1]}', text, count=1)
if count != 1:
raise SystemExit('versionCode not found in app/build.gradle.kts')
path.write_text(new_text, encoding='utf-8')
PY
echo "Using CI versionCode: $version_code"
echo "project_name=$project_name" >> "$GITHUB_OUTPUT"
echo "timestamp_utc=$timestamp_utc" >> "$GITHUB_OUTPUT"
echo "version_code=$version_code" >> "$GITHUB_OUTPUT"
- name: Build debug APK
if: github.event_name != 'release'
shell: bash
@@ -114,6 +137,18 @@ jobs:
export ANDROID_HOME="$ANDROID_SDK_ROOT"
./gradlew --no-daemon bundleRelease
- name: Rename release AAB for upload
if: github.event_name == 'release'
id: release_aab
shell: bash
run: |
set -euxo pipefail
aab="$(find app/build/outputs/bundle/release -name '*.aab' | head -n 1)"
renamed="app/build/outputs/bundle/release/${{ steps.build_meta.outputs.project_name }}-${{ steps.build_meta.outputs.timestamp_utc }}-release.aab"
mv -f "$aab" "$renamed"
echo "Renamed release AAB to $(basename "$renamed")"
echo "path=$renamed" >> "$GITHUB_OUTPUT"
- name: Upload debug APK
if: github.event_name != 'release'
uses: actions/upload-artifact@v3
@@ -130,9 +165,9 @@ jobs:
run: |
set -euxo pipefail
release_id="$(python3 -c 'import json, os; print(json.load(open(os.environ["GITHUB_EVENT_PATH"], encoding="utf-8"))["release"]["id"])')"
aab="$(find app/build/outputs/bundle/release -name '*.aab' | head -n 1)"
aab="${{ steps.release_aab.outputs.path }}"
curl --fail-with-body \
--request POST \
--header "Authorization: token ${GITEA_TOKEN}" \
--header "Authorization: token ***" \
--form "attachment=@${aab}" \
"${GITHUB_SERVER_URL}/api/v1/repos/${GITHUB_REPOSITORY}/releases/${release_id}/assets?name=$(basename "$aab")"

View File

@@ -3,8 +3,8 @@ set -Eeuo pipefail
APP_NAME="e-SUN"
MODULE="app"
API_LEVEL="35"
BUILD_TOOLS_VERSION="35.0.0"
API_LEVEL="36"
BUILD_TOOLS_VERSION="36.0.0"
DIST_DIR="dist"
COMMIT_MSG_FILE="commit-message.txt"

View File

@@ -20,12 +20,12 @@ val hasReleaseSigning = listOf(
android {
namespace = "solutions.tretter.esunandroid"
compileSdk = 35
compileSdk = 36
defaultConfig {
applicationId = "solutions.tretter.esunandroid"
minSdk = 26
targetSdk = 35
targetSdk = 36
versionCode = 19
versionName = "19"

View File

@@ -1,5 +1,5 @@
plugins {
id("com.android.application") version "8.7.2" apply false
id("com.android.application") version "8.10.0" apply false
id("org.jetbrains.kotlin.android") version "2.0.21" apply false
// Required for Kotlin 2.0+ when Compose is enabled
id("org.jetbrains.kotlin.plugin.compose") version "2.0.21" apply false

View File

@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists