8000 [eas-cli] Allow any suffix for gradle command build type by khamilowicz · Pull Request #3003 · expo/eas-cli · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[eas-cli] Allow any suffix for gradle command build type #3003

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

Conversation

khamilowicz
Copy link
Contributor
@khamilowicz khamilowicz commented Apr 28, 2025

Why

ENG-15618: Support different suffixes of custom gradle commands

Currently when user specifies a custom gradle command that does not end with *Release or *Debug the command is not parsed correctly. Build type and flavour are not parsed, which causes problems with setting code version and app version down the line.

How

  • Changed the regexp that parses gradle command to be more flexible, allowing any suffix that starts with a capital letter.

Test Plan

  • add a custom gradle command to eas.json, for example
 "development": {
      "android": {
        "gradleCommand": ":app:assembleAbcStaging"
      }
    },
  • add a buildType and packageFlavor to build.gradle file:
productFlavors {  
        abc { // New flavor
            versionCode 3
            versionName "abc"
        }
    }
buildTypes {
        staging {}
        debug {... }
        release {...}
}
  • start an android build from cli.
  • started build should not warn about invalid configuration
  • on website, build version should be set to the value assigned in flavour.

Copy link
linear bot commented Apr 28, 2025

@khamilowicz khamilowicz requested a review from sjchmiela April 28, 2025 14:59
Copy link

Subscribed to pull request

File Patterns Mentions
**/* @sjchmiela

Generated by CodeMention

Copy link
github-actions bot commented Apr 28, 2025

Size Change: +1.65 kB (0%)

Total Size: 53.4 MB

Filename Size Change
./packages/eas-cli/dist/eas-linux-x64.tar.gz 53.4 MB +1.65 kB (0%)

compressed-size-action

Copy link
codecov bot commented Apr 28, 2025

Codecov Report

Attention: Patch coverage is 77.77778% with 4 lines in your changes missing coverage. Please review.

Project coverage is 52.36%. Comparing base (817ed77) to head (df6d7fd).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
packages/eas-cli/src/build/android/build.ts 78.58% 2 Missing and 1 partial ⚠️
...ackages/eas-cli/src/project/android/gradleUtils.ts 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3003      +/-   ##
==========================================
+ Coverage   52.35%   52.36%   +0.02%     
==========================================
  Files         597      597              
  Lines       23750    23765      +15     
  Branches     4971     4975       +4     
==========================================
+ Hits        12431    12442      +11     
- Misses      10315    10318       +3     
- Partials     1004     1005       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor
@sjchmiela sjchmiela left a comment

Choose a reason for hiding this comment

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

While we're here, can we:

  • make sure we only lowercase the first letter of the build type?
  • instead of plain allowing build types other than "release" and "debug", can we print a warning if we see a non-standard build type (hidable with an env var)? This way if someone accidentally sets up buildCommand: "assembleRelease ", they'll see the problem more easily (trailing space)
  • add a link to Regex to https://developer.android.com/build/build-variants#build-types

@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-15618-support-different-suffixes-of-custom-gradle-commands branch 3 times, most recently from bbe8385 to 88be2a6 Compare April 29, 2025 14:42
@khamilowicz khamilowicz requested a review from sjchmiela April 29, 2025 14:46
@sebryu
Copy link
sebryu commented May 7, 2025

Hey @sjchmiela . Is there any chance to land it soon?
I can volunteer to resolve the conflicts after granting write permissions to repo or I can push a fork with resolved conflicts to speed this up.

@sjchmiela sjchmiela force-pushed the piotrekszeremeta/eng-15618-support-different-suffixes-of-custom-gradle-commands branch 2 times, most recently from 6f78a73 to d845380 Compare May 7, 2025 13:20
@sjchmiela sjchmiela force-pushed the piotrekszeremeta/eng-15618-support-different-suffixes-of-custom-gradle-commands branch from d845380 to f1b2bb3 Compare May 7, 2025 13:21
Copy link
github-actions bot commented May 7, 2025

✅ Thank you for adding the changelog entry!

Copy link
@sebryu sebryu left a comment

Choose a reason for hiding this comment

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

Looks great!

@sjchmiela sjchmiela merged commit f08965d into main May 7, 2025
10 checks passed
@sjchmiela sjchmiela deleted the piotrekszeremeta/eng-15618-support-different-suffixes-of-custom-gradle-commands branch May 7, 2025 13:33
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
0