Skip to content

Migrate YogaNodeJNIBase.java to Kotlin (#56780)#56780

Open
cortinico wants to merge 9 commits into
facebook:mainfrom
cortinico:export-D104666335
Open

Migrate YogaNodeJNIBase.java to Kotlin (#56780)#56780
cortinico wants to merge 9 commits into
facebook:mainfrom
cortinico:export-D104666335

Conversation

@cortinico
Copy link
Copy Markdown
Contributor

@cortinico cortinico commented May 12, 2026

Summary:
X-link: facebook/yoga#1939

Migrate YogaNodeJNIBase.java to YogaNodeJNIBase.kt, the last hand-written Java source file in the Yoga core library. This required converting all function overrides to Kotlin property overrides where the abstract YogaNode class declares them as val/var properties. Also changed nativePointer visibility in YogaConfigJNIBase from protected to internal to maintain same-module access that Java protected provided via package access.

Changelog:
[Internal] -

Differential Revision: D104666335

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label May 12, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented May 12, 2026

@cortinico has exported this pull request. If you are a Meta employee, you can view the originating Diff in D104666335.

cortinico added 8 commits May 12, 2026 05:42
Summary: Migrate YogaJustify.java to YogaJustify.kt by adding Justify to KOTLIN_ENUM_NAMES in enums.py and regenerating.

Differential Revision: D104666331
Summary: Migrate YogaLogLevel.java to YogaLogLevel.kt by adding LogLevel to KOTLIN_ENUM_NAMES in enums.py and regenerating. Also adds DO_NOT_STRIP support to the Kotlin codegen path to preserve the DoNotStrip annotation.

Differential Revision: D104666343
Summary: Migrate YogaMeasureMode.java to YogaMeasureMode.kt by adding MeasureMode to KOTLIN_ENUM_NAMES in enums.py and regenerating.

Differential Revision: D104666333
Summary: Migrate YogaNodeType.java to YogaNodeType.kt by adding NodeType to KOTLIN_ENUM_NAMES in enums.py and regenerating.

Differential Revision: D104666338
Summary: Migrate YogaOverflow.java to YogaOverflow.kt by adding Overflow to KOTLIN_ENUM_NAMES in enums.py and regenerating.

Differential Revision: D104666340
Summary: Migrate YogaPositionType.java to YogaPositionType.kt by adding PositionType to KOTLIN_ENUM_NAMES in enums.py and regenerating.

Differential Revision: D104666349
Summary: Migrate YogaUnit.java to YogaUnit.kt by adding Unit to KOTLIN_ENUM_NAMES in enums.py and regenerating.

Differential Revision: D104666347
Summary: Migrate YogaWrap.java to YogaWrap.kt by adding Wrap to KOTLIN_ENUM_NAMES in enums.py and regenerating. All enums are now migrated to Kotlin — KOTLIN_ENUM_NAMES now contains all enum names.

Differential Revision: D104666339
@cortinico cortinico force-pushed the export-D104666335 branch from 336f7ed to 9a09f36 Compare May 12, 2026 12:51
cortinico added a commit to cortinico/yoga that referenced this pull request May 12, 2026
Summary:
X-link: facebook/react-native#56780

Migrate YogaNodeJNIBase.java to YogaNodeJNIBase.kt, the last hand-written Java source file in the Yoga core library. This required converting all function overrides to Kotlin property overrides where the abstract YogaNode class declares them as val/var properties. Also changed nativePointer visibility in YogaConfigJNIBase from protected to internal to maintain same-module access that Java protected provided via package access.

Changelog:
[Internal] -

Differential Revision: D104666335
Summary:
X-link: facebook/yoga#1939

Pull Request resolved: facebook#56780

Migrate YogaNodeJNIBase.java to YogaNodeJNIBase.kt, the last hand-written Java source file in the Yoga core library. This required converting all function overrides to Kotlin property overrides where the abstract YogaNode class declares them as val/var properties. Also changed nativePointer visibility in YogaConfigJNIBase from protected to internal to maintain same-module access that Java protected provided via package access.

Changelog:
[Internal] -

Differential Revision: D104666335
@meta-codesync meta-codesync Bot changed the title Migrate YogaNodeJNIBase.java to Kotlin Migrate YogaNodeJNIBase.java to Kotlin (#56780) May 12, 2026
@cortinico cortinico force-pushed the export-D104666335 branch from 9a09f36 to 59ea139 Compare May 12, 2026 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant