Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NO QA] Add YAPL build step to HybridApp builds #55426

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Julesssss
Copy link
Contributor

@Julesssss Julesssss commented Jan 17, 2025

Explanation of Change

Engineers building the Android HybridApp for the first time see a failure due to yapl code not being built. They they need to search slack and manually do this which is confusing and time-consuming. This change ensures it is done automatically.

Then I deleted step 3 from the HybridApp build instructions.

I should be able to remove the manual step in our build workflows too, but I'll do that separately.

Fixed Issues

#54877

Tests

A) Script

  • grunt build: shared should run when an Android build is started
  • Screenshot 2025-01-17 at 11 10 23

B) Build

  • Clone a fresh App repo
  • Clone the Mobile-Expensify submodule
  • Build the android app
    • cd app
    • git submodule update --init --progress --depth 100
    • npm i
    • npm run android
  • It should build, and the app should not crash on start!

@Julesssss Julesssss self-assigned this Jan 17, 2025
Copy link

melvin-bot bot commented Jan 17, 2025

npm has a package.json file and a package-lock.json file. It seems you updated one without the other, which is usually a sign of a mistake. If you are updating a package make sure that you update the version in package.json then run npm install

@Julesssss Julesssss changed the title Add YAPL build step to HybridApp android builds [NO QA] Add YAPL build step to HybridApp android builds Jan 17, 2025
@Julesssss Julesssss changed the title [NO QA] Add YAPL build step to HybridApp android builds [NO QA] Add YAPL build step to HybridApp builds Jan 17, 2025
@Julesssss Julesssss force-pushed the jules-addYAPLBuildStep branch from 674845c to 4a4faec Compare January 17, 2025 19:06
@Julesssss Julesssss requested review from AndrewGable and a team January 17, 2025 19:17
@melvin-bot melvin-bot bot requested review from ahmedGaber93 and removed request for a team January 17, 2025 19:17
@Julesssss Julesssss removed the request for review from ahmedGaber93 January 17, 2025 19:18
@Expensify Expensify deleted a comment from melvin-bot bot Jan 17, 2025
@Julesssss
Copy link
Contributor Author

I dm'd Mariusz for a review too. I'm not sure if a separate script is overkill or good practice for keeping these scripts tidy. Let me know what you think!

@Julesssss Julesssss marked this pull request as ready for review January 17, 2025 19:21
@Julesssss Julesssss requested a review from a team as a code owner January 17, 2025 19:21
@melvin-bot melvin-bot bot removed the request for review from a team January 17, 2025 19:21
Copy link

melvin-bot bot commented Jan 17, 2025

@ Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@Julesssss Julesssss requested a review from a team January 17, 2025 19:49
@melvin-bot melvin-bot bot removed the request for review from a team January 17, 2025 19:49
Copy link

melvin-bot bot commented Jan 17, 2025

@ Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@@ -15,7 +15,7 @@
"postinstall": "./scripts/postInstall.sh",
"clean": "./scripts/clean.sh",
"clean-standalone": "STANDALONE_NEW_DOT=true ./scripts/clean.sh",
"android": "./scripts/set-pusher-suffix.sh && ./scripts/run-build.sh --android",
"android": "./scripts/set-pusher-suffix.sh && cd Mobile-Expensify && npm run grunt:build:shared && cd .. && ./scripts/run-build.sh --android",
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't we need to run this on iOS too?

Copy link
Contributor Author

@Julesssss Julesssss Jan 17, 2025

Choose a reason for hiding this comment

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

I'm not sure. I saw this iOS build step which made me think no... and we only added the step to the Android workflows when our builds were crashing. Not 100% sure though

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this should be running via grunt, but for whatever reason it's not working and engineers miss the error.

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

@Julesssss Julesssss Jan 17, 2025

Choose a reason for hiding this comment

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

Oooh that would be better. Perhaps our current grade task name no longer matches this logic:

theTask.name.matches("(assemble|bundle).*(Debug|Adhoc|Release)")

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll look into this further when I have time next week

Copy link
Contributor

@staszekscp staszekscp Jan 20, 2025

Choose a reason for hiding this comment

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

I think that cleanest solution would be to indeed to include the task in the gradle script. Now I think there is a chance that the React Native CLI may interfere into the build phases, or indeed change it in some way so the buildGrunt doesn't trigger.

Maybe changing the pattern to (install|assemble|bundle).*(Debug|Adhoc|Release) would be enough?

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.

3 participants