diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/yoga/YogaExperimentalFeature.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/yoga/YogaExperimentalFeature.java deleted file mode 100644 index 32e643439e3..00000000000 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/yoga/YogaExperimentalFeature.java +++ /dev/null @@ -1,33 +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. - */ - -// @generated by enums.py - -package com.facebook.yoga; - -public enum YogaExperimentalFeature { - WEB_FLEX_BASIS(0), - FIX_FLEX_BASIS_FIT_CONTENT(1); - - private final int mIntValue; - - YogaExperimentalFeature(int intValue) { - mIntValue = intValue; - } - - public int intValue() { - return mIntValue; - } - - public static YogaExperimentalFeature fromInt(int value) { - switch (value) { - case 0: return WEB_FLEX_BASIS; - case 1: return FIX_FLEX_BASIS_FIT_CONTENT; - default: throw new IllegalArgumentException("Unknown enum value: " + value); - } - } -} diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/yoga/YogaExperimentalFeature.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/yoga/YogaExperimentalFeature.kt new file mode 100644 index 00000000000..aec70ac2469 --- /dev/null +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/yoga/YogaExperimentalFeature.kt @@ -0,0 +1,27 @@ +/* + * 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. + */ + +// @generated by enums.py + +package com.facebook.yoga + +public enum class YogaExperimentalFeature(public val intValue: Int) { + WEB_FLEX_BASIS(0), + FIX_FLEX_BASIS_FIT_CONTENT(1); + + public fun intValue(): Int = intValue + + public companion object { + @JvmStatic + public fun fromInt(value: Int): YogaExperimentalFeature = + when (value) { + 0 -> WEB_FLEX_BASIS + 1 -> FIX_FLEX_BASIS_FIT_CONTENT + else -> throw IllegalArgumentException("Unknown enum value: $value") + } + } +}