CI / build (push) Canceled after 0s
Signing config and version metadata come from the environment, so no keystore or credentials live in the repo. signingConfig resolves to null when unset rather than falling back to the debug key, so a local release build comes out unsigned instead of undistributable-but-looking-fine. versionCode is derived from the git tag to keep it monotonic and aligned with the version users see. CI asserts Play Services and Firebase stay out of the dependency tree, which the spec requires but nothing else enforces. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
40 lines
1.2 KiB
YAML
40 lines
1.2 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
pull_request:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-java@v4
|
|
with:
|
|
distribution: temurin
|
|
java-version: '17'
|
|
|
|
- uses: android-actions/setup-android@v3
|
|
|
|
- uses: actions/cache@v4
|
|
with:
|
|
path: ~/.gradle/caches
|
|
key: gradle-${{ hashFiles('**/*.gradle.kts', 'gradle/wrapper/gradle-wrapper.properties') }}
|
|
restore-keys: gradle-
|
|
|
|
- run: ./gradlew assembleDebug --no-daemon
|
|
|
|
# Hard constraint from android-client-spec.md §7: nothing Google-
|
|
# dependent, including transitive pulls. Cheap to assert here, and far
|
|
# easier than noticing a library dragged it in three months from now.
|
|
- name: Assert no Play Services or Firebase
|
|
run: |
|
|
if ./gradlew :app:dependencies --configuration releaseRuntimeClasspath --no-daemon \
|
|
| grep -iE 'play-services|firebase|com\.google\.android\.gms'; then
|
|
echo "::error::Play Services/Firebase found in the dependency tree"
|
|
exit 1
|
|
fi
|
|
echo "Dependency tree is clean."
|