Skip to content

Conversation

@sharifhh
Copy link

@sharifhh sharifhh commented Nov 23, 2025

Note

Add AAB build support and propagate build type through artifact discovery, caching, naming, and messaging.

  • Action (action.yml):
    • Add aab input to toggle Android App Bundle builds.
    • Set BUILD_TYPE env (aab/apk) and pass --aab to rock build:android when enabled.
    • Generalize artifact discovery to pick *.aab or *.apk accordingly.
    • Include build type in cache traits and artifact naming for listing, uploading, and re-sign flows.
    • Rename APK-specific steps/messages to generic “Binary”; update PR comment title accordingly.
  • Docs (README.md):
    • Document aab usage and input in examples and Inputs table.

Written by Cursor Bugbot for commit b680fac. This will update automatically on new commits. Configure here.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

This PR is being reviewed by Cursor Bugbot

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

Bug: Artifact cache doesn't distinguish AAB from APK

The ARTIFACT_TRAITS used for caching only includes variant and optionally PR number, but doesn't include the aab input. This causes the system to return a cached APK when an AAB is requested (or vice versa) if they share the same variant, since the artifact lookup can't distinguish between the two build types.

action.yml#L139-L141

android/action.yml

Lines 139 to 141 in c80cb68

run: |
ARTIFACT_TRAITS="${{ inputs.variant }},${{ github.event.pull_request.number}}"
echo "ARTIFACT_TRAITS=$ARTIFACT_TRAITS" >> $GITHUB_ENV

action.yml#L153-L155

android/action.yml

Lines 153 to 155 in c80cb68

run: |
ARTIFACT_TRAITS="${{ inputs.variant }}"
echo "ARTIFACT_TRAITS=$ARTIFACT_TRAITS" >> $GITHUB_ENV

action.yml#L283-L284

android/action.yml

Lines 283 to 284 in c80cb68

fi
ARTIFACT_TRAITS="${{ inputs.variant }},${IDENTIFIER}"

Fix in Cursor Fix in Web


@sharifhh sharifhh changed the title Support AAB Support AAB + Less Keystore variables Nov 24, 2025
@thymikee
Copy link
Contributor

Thanks for the contribution! Removing keystore-store-file is a breaking change that's not necessary to support AAB signing. I don't think we need any of these "less keystone variables" stuff in this PR, please remove it.

@sharifhh sharifhh changed the title Support AAB + Less Keystore variables Support AAB Nov 24, 2025
@sharifhh
Copy link
Author

@thymikee can we merge please?

if: ${{ github.event_name == 'pull_request' && inputs.re-sign == 'true' }}
run: |
ARTIFACT_TRAITS="${{ inputs.variant }},${{ github.event.pull_request.number}}"
ARTIFACT_TRAITS="${{ inputs.variant }},${{ env.BUILD_TYPE }},${{ github.event.pull_request.number}}"
Copy link
Contributor

Choose a reason for hiding this comment

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

this will break existing remote caching. Let's remove that and for now you'll need to differentiate another way between APK and AAB artifacts (e.g. by setting up an env variable and adding that to fingerprint config: https://www.rockjs.dev/docs/configuration#fingerprint-configuration)

if: ${{ !env.ARTIFACT_NAME }}
run: |
ARTIFACT_TRAITS="${{ inputs.variant }}"
ARTIFACT_TRAITS="${{ inputs.variant }},${{ env.BUILD_TYPE }}"
Copy link
Contributor

Choose a reason for hiding this comment

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

same as above

APK_PATH=$(find $ANDROID_SOURCE_DIR/$APP_NAME/build/outputs -name '*.apk' | head -1 )
echo APK_PATH $APK_PATH
echo "ARTIFACT_PATH=$APK_PATH" >> $GITHUB_ENV
BINARY_PATH=$(find $ANDROID_SOURCE_DIR/$APP_NAME/build/outputs -name '*.${{ inputs.aab == 'true' && 'aab' || 'apk' }}' | head -1 )
Copy link
Contributor

Choose a reason for hiding this comment

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

let's create BINARY_EXT variable and use that instead of ${{ inputs.aab == 'true' && 'aab' || 'apk' }}

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.

2 participants