Remove vendored proguard annotation (#26069)
Summary: There have been multiple complaints about combining RN with various other FB libraries, including Litho and Flipper, because of bundled dependencies that can't be deduplicated by Gradle. This is one of three current conflicts: 1) Proguard annotations (this PR) 2) Yoga 3) fbjni While the Yoga group name doesn't make a massive amount of sense it was the easiest existing package to use and since we don't have a better namespace for this, we might as well use this. A similar change to Litho is landing right now. ## Changelog [Android] [Changed] - Use centralized package for DoNotStrip annotation Pull Request resolved: https://github.com/facebook/react-native/pull/26069 Test Plan: ``` yarn ./gradlew :RNTester:android:app:assembleDebug ``` Reviewed By: cpojer Differential Revision: D16827430 Pulled By: passy fbshipit-source-id: 87542b5422fee598d8e635651441f0ecd42eb9d7
This commit is contained in:
Родитель
a206e91907
Коммит
35fc0add2d
|
@ -356,6 +356,7 @@ android {
|
|||
|
||||
dependencies {
|
||||
api("com.facebook.infer.annotation:infer-annotation:0.11.2")
|
||||
api("com.facebook.yoga:proguard-annotations:1.14.1")
|
||||
api("javax.inject:javax.inject:1")
|
||||
api("androidx.appcompat:appcompat:1.0.2")
|
||||
api("com.facebook.fresco:fresco:${FRESCO_VERSION}")
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* <p>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 static java.lang.annotation.RetentionPolicy.CLASS;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Add this annotation to a class, method, or field to instruct Proguard to not strip it out.
|
||||
*
|
||||
* <p>This is useful for methods called via reflection that could appear as unused to Proguard.
|
||||
*/
|
||||
@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.CONSTRUCTOR})
|
||||
@Retention(CLASS)
|
||||
public @interface DoNotStrip {}
|
Загрузка…
Ссылка в новой задаче