Skip to content

Conversation

@camrun91
Copy link
Collaborator

Description

We had broken example app builds. This adds the tests to build the Android app.

Type of Change

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation update
  • refactor: Code refactoring (no functional changes)
  • perf: Performance improvement
  • test: Test additions or updates
  • build: Build system or dependency changes
  • ci: CI configuration changes
  • chore: Other changes (maintenance, etc.)

Checklist

  • My code follows the project's code style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • All commit messages follow conventional commits format
  • I have updated the appropriate section in documentation (if needed)

@camrun91
Copy link
Collaborator Author

I believe that the current failure on the added test is legit and shows the failures I was seeing before my changes in the other PR.

@camrun91 camrun91 marked this pull request as ready for review January 29, 2026 21:12
@chatgpt-codex-connector
Copy link

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@greptile-apps
Copy link

greptile-apps bot commented Jan 29, 2026

Greptile Overview

Greptile Summary

Added a new GitHub Actions workflow to automatically test Android example app builds on pull requests. The workflow sets up Node.js 20 and Java 17, installs dependencies for both the root project and example app, uses Expo's prebuild to generate the native Android project, and then builds the debug APK using Gradle.

Key Changes:

  • Workflow triggers on PRs to main branch
  • Installs root and example app dependencies separately
  • Uses npx expo prebuild --clean --platform android to generate native Android files
  • Builds using ./gradlew assembleDebug --no-daemon directly instead of npm run android

Suggestions:

  • Add explicit permissions: contents: read for security best practices
  • Consider caching Gradle dependencies to speed up subsequent builds
  • Add a timeout to prevent jobs from running indefinitely
  • Consider uploading the built APK as an artifact for debugging

Confidence Score: 4/5

  • This PR is safe to merge with minimal risk - it adds CI testing without affecting runtime code
  • The workflow is well-structured and follows good practices. The build steps are logical and should work correctly. Minor improvements suggested around caching, permissions, and timeouts, but none are blockers
  • No files require special attention - the single workflow file is straightforward

Important Files Changed

Filename Overview
.github/workflows/android_example_test_build.yml Added new GitHub Actions workflow to test Android example app builds on PRs, fixing previously broken builds

Sequence Diagram

sequenceDiagram
    participant PR as Pull Request
    participant GHA as GitHub Actions
    participant Node as Node.js Environment
    participant Expo as Expo CLI
    participant Gradle as Gradle Build System

    PR->>GHA: Trigger on PR to main
    GHA->>GHA: Checkout repository
    GHA->>Node: Setup Node.js 20 with npm cache
    GHA->>GHA: Setup Java 17 (Temurin)
    GHA->>Node: Install root dependencies (npm ci)
    GHA->>Node: Install example app dependencies (npm ci)
    Node->>Expo: Run expo prebuild --clean --platform android
    Expo->>Expo: Generate Android native project
    Expo->>Gradle: Create gradlew and Android build files
    GHA->>Gradle: Execute ./gradlew assembleDebug --no-daemon
    Gradle->>Gradle: Build Android APK
    Gradle->>GHA: Return build result
    GHA->>PR: Report success/failure
Loading

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 file reviewed, 3 comments

Edit Code Review Agent Settings | Greptile

Comment on lines +21 to +25
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding Gradle dependency caching to speed up builds:

      - name: Setup Gradle cache
        uses: actions/cache@v4
        with:
          path: |
            ~/.gradle/caches
            ~/.gradle/wrapper
          key: ${{ runner.os }}-gradle-${{ hashFiles('example/android/gradle/wrapper/gradle-wrapper.properties') }}
          restore-keys: |
            ${{ runner.os }}-gradle-

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/android_example_test_build.yml
Line: 21:25

Comment:
Consider adding Gradle dependency caching to speed up builds:
```
      - name: Setup Gradle cache
        uses: actions/cache@v4
        with:
          path: |
            ~/.gradle/caches
            ~/.gradle/wrapper
          key: ${{ runner.os }}-gradle-${{ hashFiles('example/android/gradle/wrapper/gradle-wrapper.properties') }}
          restore-keys: |
            ${{ runner.os }}-gradle-
```

<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>

How can I resolve this? If you propose a fix, please make it concise.

camrun91 and others added 2 commits January 29, 2026 15:19
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Signed-off-by: Cameron Llewellyn <cameron.b.llewellyn@gmail.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Signed-off-by: Cameron Llewellyn <cameron.b.llewellyn@gmail.com>
Copy link
Collaborator

@bmanquen bmanquen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am learning about android and iOS so take my comments with a grain of salt.

@bmanquen
Copy link
Collaborator

Also I think we can probably test the android and ios builds in one github workflow file as long as they are in different jobs.


- name: Build Android app
working-directory: example/android
run: ./gradlew assembleDebug --no-daemon
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works! You could also set the working-directory to example and run npm run android.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I did that in CI it failed because there was no simulator device.

working-directory: example
run: npm ci

- name: Prebuild Expo app
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, this could also (similar to iOS) be simplified to 1 command: npm run android. It will handle prebuild (creating the Android native directory) and building the app.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will try this again but I think doing this it was having issues with building since no simulator exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants