Skip to content

Add Android build-type defaults for local flags - #317

Merged
kirich1409 merged 2 commits into
developfrom
fea-21-build-type-defaults
Nov 7, 2026
Merged

kirich1409 merged 2 commits into
developfrom
fea-21-build-type-defaults

Conversation

@kirich1409

@kirich1409 kirich1409 commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Closes #297

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Chore / refactor

Checklist

  • Tests added or updated
  • Docs updated (KDoc, README, CHANGELOG)
  • ./gradlew spotlessCheck passes
  • CHANGELOG.md updated

Notes for reviewers

A local flag keeps its default as the base default. defaultFor(buildType, value) sets a different declared default for one Android build type. A build type with no override uses the base. Android application and library compilations read build/generated/featured/buildType/<buildType> (generateConfigParamDebug, not the shared generateConfigParam task). JVM, KMP, the manifest, the registry, and iOS still use the base. R8 -assumevalues and -checkdiscard use the release effective default. A debug override is not that rule. Product flavors are not a selector.

default = true plus defaultFor("release", false) keeps iOS on true while Android release R8 assumes false.

No device run. This is a Gradle plugin change.

Checks run: :featured-gradle-plugin:test (including the Android TestKit fixtures; ANDROID_HOME was set, so they were not assumption skips), :featured-shrinker-tests:test, and spotlessCheck.

@kirich1409 kirich1409 changed the title State build-type defaults for local flags Add Android build-type defaults for local flags Nov 7, 2026
@kirich1409
kirich1409 marked this pull request as ready for review November 7, 2026 01:11
Copilot AI balanced review requested due to automatic review settings November 7, 2026 01:11

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

A local flag keeps one base default. defaultFor sets an Android
build-type default. Release R8 uses the release effective default.
A local flag keeps its base default. defaultFor sets a different default
for one Android build type, and that compilation sees it as
ConfigParam.defaultValue. R8 -assumevalues and -checkdiscard use the
release effective default. iOS and non-Android compilations stay on the base.
@kirich1409
kirich1409 force-pushed the fea-21-build-type-defaults branch from a868ca6 to be6c8ea Compare November 7, 2026 01:13
Copilot AI balanced review requested due to automatic review settings November 7, 2026 01:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@kirich1409
kirich1409 merged commit b319556 into develop Nov 7, 2026
9 checks passed
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