Add DoNotStripAny
Summary: This diff adds an annotation that also prevents stripping methods, fields and static blocks. This is necessary for D23373168 to be OSS'd Reviewed By: SidharthGuglani Differential Revision: D23395925 fbshipit-source-id: 8456234cb75b15ae87580835e76f8e251ba09a9b
This commit is contained in:
committed by
Facebook GitHub Bot
parent
e1c9d8800e
commit
e0ae96368c
@@ -0,0 +1,24 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.facebook.proguard.annotations;
|
||||||
|
|
||||||
|
import java.lang.annotation.ElementType;
|
||||||
|
import java.lang.annotation.Retention;
|
||||||
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
|
import static java.lang.annotation.RetentionPolicy.CLASS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add this annotation to a class to instruct Proguard to not strip it or any of its fields or
|
||||||
|
* methods out.
|
||||||
|
*
|
||||||
|
* <p>This is useful for methods called via reflection that could appear as unused to Proguard.
|
||||||
|
*/
|
||||||
|
@Target({ElementType.TYPE})
|
||||||
|
@Retention(CLASS)
|
||||||
|
public @interface DoNotStripAny {}
|
Reference in New Issue
Block a user