1# Copyright 2023 The Chromium Authors 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4 5# Keeps for method level annotations. 6-keepclasseswithmembers,allowaccessmodification class ** { 7 @**org.jni_zero.AccessedByNative <fields>; 8} 9-keepclasseswithmembers,includedescriptorclasses,allowaccessmodification,allowoptimization class ** { 10 @**org.jni_zero.CalledByNative <methods>; 11} 12-keepclasseswithmembers,includedescriptorclasses,allowaccessmodification,allowoptimization class ** { 13 @**org.jni_zero.CalledByNativeUnchecked <methods>; 14} 15 16# Allow unused native methods to be removed, but prevent renaming on those that 17# are kept. 18# TODO(crbug.com/315973491): Restrict the broad scope of this rule. 19-keepclasseswithmembernames,includedescriptorclasses,allowaccessmodification class ** { 20 native <methods>; 21} 22 23# Used when multiplexing. We don't package our own @UsedByReflection, so using this instead. 24-keepclasseswithmembers class !cr_allowunused,**J.N { 25 public long *_HASH; 26} 27