Migrate com.facebook.proguard.annotations.KeepGettersAndSetters to Kotlin (#47703)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47703

As per title.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D66094514

fbshipit-source-id: 85d6cceaba7445f624461a880c2bc9c05b440f53
This commit is contained in:
Fabrizio Cucci
2024-11-19 06:06:00 -08:00
committed by Facebook GitHub Bot
parent 4da6ed5caf
commit bdf01be654
2 changed files with 24 additions and 27 deletions
@@ -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.
*
* <p>This is useful for classes that are controlled by animator-like classes that control various
* properties with reflection.
*
* <p><b>NOTE:</b> This is <em>not</em> 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 {}
@@ -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