name: Android Build on: push: branches: [ master, main, develop ] pull_request: branches: [ master, main ] workflow_dispatch: jobs: build: runs-on: ubuntu-latest timeout-minutes: 30 steps: - name: Checkout code uses: actions/checkout@v4 - name: Set up JDK 17 uses: actions/setup-java@v4 with: java-version: '17' distribution: 'temurin' cache: gradle - name: Grant execute permission for gradlew run: chmod +x gradlew - name: Cache Gradle packages uses: actions/cache@v3 with: path: | ~/.gradle/caches ~/.gradle/wrapper key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} restore-keys: | ${{ runner.os }}-gradle- - name: Build debug APK run: ./gradlew assembleDebug --stacktrace --no-daemon - name: Build release APK run: ./gradlew assembleRelease --stacktrace --no-daemon - name: Upload debug APK uses: actions/upload-artifact@v4 with: name: omnikey-debug path: app/build/outputs/apk/debug/*.apk retention-days: 30 - name: Upload release APK uses: actions/upload-artifact@v4 with: name: omnikey-release path: app/build/outputs/apk/release/*.apk retention-days: 90 - name: Run lint run: ./gradlew lint --no-daemon continue-on-error: true - name: Upload lint results uses: actions/upload-artifact@v4 if: always() with: name: lint-results path: app/build/reports/lint-results*.html retention-days: 30 - name: Build summary if: always() run: | echo "## Build Summary" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY echo "### APK Sizes" >> $GITHUB_STEP_SUMMARY if [ -f app/build/outputs/apk/debug/app-debug.apk ]; then DEBUG_SIZE=$(ls -lh app/build/outputs/apk/debug/app-debug.apk | awk '{print $5}') echo "- Debug APK: $DEBUG_SIZE" >> $GITHUB_STEP_SUMMARY fi if [ -f app/build/outputs/apk/release/app-release-unsigned.apk ]; then RELEASE_SIZE=$(ls -lh app/build/outputs/apk/release/app-release-unsigned.apk | awk '{print $5}') echo "- Release APK: $RELEASE_SIZE" >> $GITHUB_STEP_SUMMARY fi echo "" >> $GITHUB_STEP_SUMMARY echo "### Features" >> $GITHUB_STEP_SUMMARY echo "- ✅ 200+ keyboard features" >> $GITHUB_STEP_SUMMARY echo "- ✅ 11 specialized engines" >> $GITHUB_STEP_SUMMARY echo "- ✅ 50+ user preferences" >> $GITHUB_STEP_SUMMARY echo "- ✅ ML Kit integration" >> $GITHUB_STEP_SUMMARY echo "- ⚠️ UI layer not yet implemented" >> $GITHUB_STEP_SUMMARY