[FR] Add support for Jetpack Keep

Offen
#591 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 6 Tagen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
45/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
android, java
Bereich
build-system

Rechercherichtung

Start by reading the linked Jetpack Keep documentation and locating how rules_android handles bytecode annotations and generates ProGuard/R8 rules. Determine how the listed annotations map to conditional keep rules, then verify that the generated rules retain reflection or JNI targets only when their callers are reachable.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Add support in rules_android for the new Jetpack Keep (androidx.annotation.keep) library of annotations (@UsesReflectionToConstruct, @UsesReflectionToAccessMethod, @UsesReflectionToAccessField, @UnconditionallyKeep, etc.).

Jetpack Keep allows developers to declare reflection and JNI contracts directly on the calling or target code rather than maintaining detached ProGuard/R8 configuration files. At build time, these bytecode annotations are read and translated into conditional keep rules (-if <caller> -keep <target>) so R8 (or other ProGuard-compatible shrinkers) only retains the reflection targets when the calling code is reachable.

Vorherrschende Sprache
Java
Sterne
205
Forks
113
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus bazelbuild/rules_android

Alle Issues in bazelbuild/rules_android

Ähnliche Issues

Weitere Issues zu Java

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.