Skip to content

test(gradle-plugin): integration tests for ProGuard rule generation and R8 DCE #28

Description

@kirich1409

Summary

Verify that the Gradle plugin correctly generates ProGuard rules and that R8 actually eliminates dead code in the output APK/JAR.

Test cases

  1. @LocalFlag with defaultValue = false → rule generated, dead branch removed from release APK
  2. @LocalFlag with defaultValue = true → rule generated, dead branch of the else removed
  3. @RemoteFlag → no rule generated, code present in both debug and release
  4. Unannotated flag → no rule generated
  5. Multi-module: flags from 3 modules all generate rules correctly

Acceptance criteria

  • Tests run as part of ./gradlew :featured-gradle-plugin:test
  • Use TestKit (Gradle TestKit) for plugin integration tests
  • APK diff validates dead code elimination

Metadata

Metadata

Assignees

No one assigned

    Labels

    androidAndroid-specific workgradle-pluginfeatured-gradle-plugin worktestingTests and coverage

    Type

    No type

    Fields

    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