Skip to content

feat(gradle-plugin): generate ProGuard/R8 -assumevalues rules for Android/JVM #16

@kirich1409

Description

@kirich1409

Summary

For each @LocalFlag-annotated ConfigParam with defaultValue = false, generate a ProGuard rule that tells R8 the flag is always disabled, enabling dead branch elimination.

Generated output (proguard-featured.pro)

-assumevalues class dev.androidbroadcast.featured.ConfigValues {
    # Flags frozen at release build time
}

The exact rule shape depends on the final API design for isEnabled — this issue should be implemented after #14.

Acceptance criteria

  • Rules file generated during release build task
  • File auto-added to Android module's ProGuard configuration
  • R8 in a test app eliminates dead code guarded by a @LocalFlag with defaultValue = false
  • No rules generated for @RemoteFlag or unannotated flags
  • Integration test verifying dead code elimination

Metadata

Metadata

Assignees

No one assigned

    Labels

    androidAndroid-specific workgradle-pluginfeatured-gradle-plugin work

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions