Initial Kotlin setup and migrate YogaConstants #1829

Closed
mateoguzmana wants to merge 2 commits from feat/initial-setup-for-kotlin into main
mateoguzmana commented 2025-08-02 05:35:21 -07:00 (Migrated from github.com)

As part of the ongoing effort to migrate the React Native codebase to Kotlin, this PR introduces the initial setup required for Kotlin support in Yoga.

  • Added initial basic Kotlin configuration to the project.
  • Migrated YogaConstants as an initial file to try out the first migration steps.

Test plan:

  • Tested the migrated class directly against facebook/react-native, see the PR here.
  • Run: ./gradlew :yoga:assembleDebug & ./gradlew :yoga:compileDebugSources

I am not able to run the Java tests in this repo (even before the initial Kotlin setup) – not sure if I am missing something there but any pointers are welcome – it seems like there is some missing configuration. Currently trying with ./gradlew :yoga:test

As part of the ongoing effort to migrate the React Native codebase to Kotlin, this PR introduces the initial setup required for Kotlin support in Yoga. - Added initial basic Kotlin configuration to the project. - Migrated `YogaConstants` as an initial file to try out the first migration steps. **Test plan:** - Tested the migrated class directly against facebook/react-native, see the PR [here](https://github.com/facebook/react-native/pull/52998). - Run: `./gradlew :yoga:assembleDebug` & `./gradlew :yoga:compileDebugSources` I am not able to run the Java tests in this repo (even before the initial Kotlin setup) – not sure if I am missing something there but any pointers are welcome – it seems like there is some missing configuration. Currently trying with `./gradlew :yoga:test`
cortinico (Migrated from github.com) reviewed 2025-08-02 05:35:21 -07:00
vercel[bot] commented 2025-08-02 05:35:25 -07:00 (Migrated from github.com)

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
yoga-website Ready (Inspect) Visit Preview 💬 Add feedback Aug 4, 2025 3:46pm
[vc]: #I3uaz2oXiMyFH0vs4zSyDeFMAv04IBmLvFDM40gHhj8=:eyJpc01vbm9yZXBvIjp0cnVlLCJ0eXBlIjoiZ2l0aHViIiwicHJvamVjdHMiOlt7Im5hbWUiOiJ5b2dhLXdlYnNpdGUiLCJyb290RGlyZWN0b3J5Ijoid2Vic2l0ZSIsImluc3BlY3RvclVybCI6Imh0dHBzOi8vdmVyY2VsLmNvbS9mYm9wZW5zb3VyY2UveW9nYS13ZWJzaXRlL0VBenJHYXVDbXgxR0J1bUVkZEQ2Y2NielNTelYiLCJwcmV2aWV3VXJsIjoieW9nYS13ZWJzaXRlLWdpdC1mb3JrLW1hdGVvZ3V6bWFuYS1mZWF0LWluaS0yMGFhNzQtZmJvcGVuc291cmNlLnZlcmNlbC5hcHAiLCJuZXh0Q29tbWl0U3RhdHVzIjoiREVQTE9ZRUQiLCJsaXZlRmVlZGJhY2siOnsicmVzb2x2ZWQiOjAsInVucmVzb2x2ZWQiOjAsInRvdGFsIjowLCJsaW5rIjoieW9nYS13ZWJzaXRlLWdpdC1mb3JrLW1hdGVvZ3V6bWFuYS1mZWF0LWluaS0yMGFhNzQtZmJvcGVuc291cmNlLnZlcmNlbC5hcHAifX1dfQ== **The latest updates on your projects**. Learn more about [Vercel for Git ↗︎](https://vercel.link/github-learn-more) | Name | Status | Preview | Comments | Updated (UTC) | | :--- | :----- | :------ | :------- | :------ | | **yoga-website** | ✅ Ready ([Inspect](https://vercel.com/fbopensource/yoga-website/EAzrGauCmx1GBumEddD6ccbzSSzV)) | [Visit Preview](https://yoga-website-git-fork-mateoguzmana-feat-ini-20aa74-fbopensource.vercel.app) | 💬 [**Add feedback**](https://vercel.live/open-feedback/yoga-website-git-fork-mateoguzmana-feat-ini-20aa74-fbopensource.vercel.app?via=pr-comment-feedback-link) | Aug 4, 2025 3:46pm |
facebook-github-bot commented 2025-08-04 01:34:19 -07:00 (Migrated from github.com)

@rshest has imported this pull request. If you are a Meta employee, you can view this in D79545992.

@rshest has imported this pull request. If you are a Meta employee, you can view this in [D79545992](https://www.internalfb.com/diff/D79545992?dst_version_fbid=786678813781237).
cortinico (Migrated from github.com) requested changes 2025-08-04 02:39:42 -07:00
@@ -9,6 +9,7 @@ plugins {
id("com.android.library") version "8.7.1" apply false
cortinico (Migrated from github.com) commented 2025-08-04 02:39:37 -07:00

Can you use the same Kotlin version we use inside react-native here (2.1.20)?

Can you use the same Kotlin version we use inside react-native here (2.1.20)?
facebook-github-bot commented 2025-08-04 02:49:57 -07:00 (Migrated from github.com)

@rshest has imported this pull request. If you are a Meta employee, you can view this in D79545992.

@rshest has imported this pull request. If you are a Meta employee, you can view this in [D79545992](https://www.internalfb.com/diff/D79545992?dst_version_fbid=794013729720025).
mateoguzmana (Migrated from github.com) reviewed 2025-08-04 09:10:40 -07:00
@@ -9,6 +9,7 @@ plugins {
id("com.android.library") version "8.7.1" apply false
mateoguzmana (Migrated from github.com) commented 2025-08-04 09:10:40 -07:00

Changed it in a4286e3233

Changed it in a4286e3233e491175fa8d0599880dca97c05fe4a
facebook-github-bot commented 2025-08-07 08:20:58 -07:00 (Migrated from github.com)

@rshest merged this pull request in facebook/yoga@8bf7a34d02.

@rshest merged this pull request in facebook/yoga@8bf7a34d021d20f923e635276ebbd72d850245d4.

Pull request closed

Sign in to join this conversation.
No description provided.