GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(android): --gradleFlavor to build a product flavor by farfromrefug · Pull Request #6133 · NativeScript/nativescript-cli

Conversation

@farfromrefug

@farfromrefug farfromrefug commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

What

An app that declares product flavors in its gradle configuration has no way to tell the CLI which one to build. The task name is built as:

const baseTaskName = buildData.androidBundle ? "bundle" : "assemble";

so the CLI always asks for assembleDebug/assembleRelease — which gradle rejects once flavors exist, because there is no flavourless variant to assemble.

--gradleFlavor foo inserts the flavor into the task name:

ns build android --gradleFlavor foo --release   # assembleFooRelease
ns run android --gradleFlavor foo               # assembleFooDebug
ns build android --gradleFlavor foo --aab       # bundleFooRelease

The flavor is capitalized to match gradle's task naming, and a flavor that is already capitalized is left alone.

Build output

No special handling needed. A flavored build lands in build/outputs/apk/<flavor>/<buildType> with a name like app-foo-debug.apk. getAllAppPackages already falls back to a recursive walk of the output directory, and the android getValidBuildOutputData regex is

(<packageName>|app)-.*-(Debug|Release)(-unsigned)?\.apk

which matches the flavored name as is.

Tests

npm test — 1860 passing. Added cases in test/services/android/gradle-build-args-service.ts for the debug, release, app bundle and already-capitalized forms.

Notes

From https://github.com/Akylas/nativescript-cli. Independent of #6129, #6130, #6131 and #6132, though it adds an option next to gradlePath in lib/options.ts like some of those do — expect a small textual conflict depending on merge order.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@farfromrefug @claude
feat(android): --gradleFlavor to build a product flavor
c6a6a97
An app that declares product flavors in its gradle configuration could not
tell the CLI which one to build - it always ran `assembleDebug` /
`assembleRelease`, which fails outright once flavors exist.

`--gradleFlavor foo` inserts the flavor into the task name, so the CLI
runs `assembleFooDebug`, `assembleFooRelease`, `bundleFooDebug` or
`bundleFooRelease`. The flavor is capitalized to match the gradle task
naming.

The build output does not need any special handling: gradle writes a
flavored build to `build/outputs/apk/<flavor>/<buildType>`, which the
existing recursive package lookup and its `-.*-(Debug|Release)` regex
already cover.

Co-Authored-By: Claude Opus 5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@farfromrefug, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 31 minutes

Limit details: You’ve used all 4 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: de8058c1-0846-40f0-b866-df5a97e3ea66

📥 Commits

Reviewing files that changed from the base of the PR and between 2f9f2e0 and c6a6a97.

📒 Files selected for processing (9)
  • docs/man_pages/project/testing/build-android.md
  • docs/man_pages/project/testing/debug-android.md
  • docs/man_pages/project/testing/run-android.md
  • lib/data/build-data.ts
  • lib/declarations.d.ts
  • lib/definitions/build.d.ts
  • lib/options.ts
  • lib/services/android/gradle-build-args-service.ts
  • test/services/android/gradle-build-args-service.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
  • X
  • Mastodon
  • Reddit
  • LinkedIn

Comment @coderabbitai help to get the list of available commands.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

NathanWalker
NathanWalker approved these changes Aug 19, 2026
View reviewed changes
@NathanWalker
NathanWalker merged commit 0c9860c into NativeScript:main Aug 19, 2026
12 checks passed

Uh oh!

There was an error while loading. Please reload this page.

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

Reviewers

@NathanWalker NathanWalker NathanWalker approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@farfromrefug @NathanWalker
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.