diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/proguard/annotations/KeepGettersAndSetters.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/proguard/annotations/KeepGettersAndSetters.java deleted file mode 100644 index a6d125a0b05..00000000000 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/proguard/annotations/KeepGettersAndSetters.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and 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 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, to keep all "void set*(***)" and get* methods. - * - *
This is useful for classes that are controlled by animator-like classes that control various - * properties with reflection. - * - *
NOTE: This is not needed for Views because their getters and setters are - * automatically kept by the default Android SDK ProGuard config. - */ -@Target({ElementType.TYPE}) -@Retention(CLASS) -public @interface KeepGettersAndSetters {} diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/proguard/annotations/KeepGettersAndSetters.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/proguard/annotations/KeepGettersAndSetters.kt new file mode 100644 index 00000000000..5e29591bcae --- /dev/null +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/proguard/annotations/KeepGettersAndSetters.kt @@ -0,0 +1,24 @@ +/* + * Copyright (c) Meta Platforms, Inc. and 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 kotlin.annotation.AnnotationRetention +import kotlin.annotation.AnnotationTarget + +/** + * Add this annotation to a class, to keep all "void set*(***)" and get* methods. + * + * This is useful for classes that are controlled by animator-like classes that control various + * properties with reflection. + * + * **NOTE:** This is *not* needed for Views because their getters and setters are automatically kept + * by the default Android SDK ProGuard config. + */ +@Target(AnnotationTarget.CLASS) +@Retention(AnnotationRetention.BINARY) +public annotation class KeepGettersAndSetters