Summary
Verify that the Gradle plugin correctly generates ProGuard rules and that R8 actually eliminates dead code in the output APK/JAR.
Test cases
@LocalFlag with defaultValue = false → rule generated, dead branch removed from release APK
@LocalFlag with defaultValue = true → rule generated, dead branch of the else removed
@RemoteFlag → no rule generated, code present in both debug and release
- Unannotated flag → no rule generated
- Multi-module: flags from 3 modules all generate rules correctly
Acceptance criteria
Summary
Verify that the Gradle plugin correctly generates ProGuard rules and that R8 actually eliminates dead code in the output APK/JAR.
Test cases
@LocalFlagwithdefaultValue = false→ rule generated, dead branch removed from release APK@LocalFlagwithdefaultValue = true→ rule generated, dead branch of theelseremoved@RemoteFlag→ no rule generated, code present in both debug and releaseAcceptance criteria
./gradlew :featured-gradle-plugin:testTestKit(Gradle TestKit) for plugin integration tests