Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: view+module native templates #562

Merged
merged 31 commits into from
Jun 20, 2024
Merged

feat: view+module native templates #562

merged 31 commits into from
Jun 20, 2024

Conversation

atlj
Copy link
Collaborator

@atlj atlj commented Jun 11, 2024

Summary

This adds new templates that use Kotlin and Objective-C. The templates each have a native view and a native module included.

Other Changes / Side Effects

  1. With 993d5cd, the new arch and mixed arch views will no longer have the View suffix in their codegen names. This doesn't break codegen as the name field is arbitrary as it isn't stated otherwise in the new arch working group documents. One important matter to remember here is to make sure we pass the RN prefix since headers can conflict.
  2. No more Java templates! I've removed them all for the sake of Kotlin.
  3. I've removed templates like view-new (new arch-only view template) since we now have view+module templates and it would be hard to maintain the old model.
  4. I kept module-legacy, module-mixed, and module-new since they are used by cpp.
  5. I kept module-legacy, and view-legacy since they are used by Swift.

Test plan

  1. Go to packages/create-react-native-library.
  2. Call yarn prepare to build the CLI.
  3. Run ./bin/create-react-native-library to run the CLI you built.
  4. Fill in the name, email, etc., and make sure to select Fabric view and Turbo module with backward compat.
  5. Go to the library you created and make sure to build the following:
    a. Android with old architecture
    b. iOS with old architecture
    c. Android with new architecture
    d. iOS with new architecture

@atlj atlj requested a review from satya164 June 11, 2024 10:16
@atlj atlj force-pushed the @atlj/golden-template branch from 993d5cd to 5e20c86 Compare June 11, 2024 11:22
@atlj atlj changed the title feat: kotlin-objc view+module native template feat: view+module native templates Jun 13, 2024
@satya164 satya164 merged commit a75cf32 into main Jun 20, 2024
18 checks passed
@satya164 satya164 deleted the @atlj/golden-template branch June 20, 2024 10:15
satya164 added a commit that referenced this pull request Jul 2, 2024
satya164 added a commit that referenced this pull request Jul 2, 2024
atlj added a commit that referenced this pull request Jul 19, 2024
This adds new templates that use `Kotlin` and `Objective-C`. The
templates each have a native view and a native module included.

1. With 993d5cd, the new arch and mixed
arch views will no longer have the `View` suffix in their codegen names.
This doesn't break codegen as the name field is arbitrary as it isn't
stated otherwise [in the new arch working group
documents](https://github.com/reactwg/react-native-new-architecture/blob/main/docs/enable-libraries-prerequisites.md#configure-codegen).
One important matter to remember here is to make sure we pass the `RN`
prefix since headers can conflict.
2. No more Java templates! I've removed them all for the sake of Kotlin.
3. I've removed templates like view-new (new arch-only view template)
since we now have view+module templates and it would be hard to maintain
the old model.
4. I kept `module-legacy`, `module-mixed`, and `module-new` since they
are used by cpp.
5. I kept `module-legacy`, and `view-legacy` since they are used by
Swift.

1. Go to `packages/create-react-native-library`.
7. Call `yarn prepare` to build the CLI.
8. Run `./bin/create-react-native-library` to run the CLI you built.
9. Fill in the name, email, etc., and make sure to select ` Fabric view
and Turbo module with backward compat`.
10. Go to the library you created and make sure to build the following:
    a. Android with old architecture
    b. iOS with old architecture
    c. Android with new architecture
    d. iOS with new architecture
atlj added a commit that referenced this pull request Sep 17, 2024
This adds new templates that use `Kotlin` and `Objective-C`. The
templates each have a native view and a native module included.

1. With 993d5cd, the new arch and mixed
arch views will no longer have the `View` suffix in their codegen names.
This doesn't break codegen as the name field is arbitrary as it isn't
stated otherwise [in the new arch working group
documents](https://github.com/reactwg/react-native-new-architecture/blob/main/docs/enable-libraries-prerequisites.md#configure-codegen).
One important matter to remember here is to make sure we pass the `RN`
prefix since headers can conflict.
2. No more Java templates! I've removed them all for the sake of Kotlin.
3. I've removed templates like view-new (new arch-only view template)
since we now have view+module templates and it would be hard to maintain
the old model.
4. I kept `module-legacy`, `module-mixed`, and `module-new` since they
are used by cpp.
5. I kept `module-legacy`, and `view-legacy` since they are used by
Swift.

1. Go to `packages/create-react-native-library`.
7. Call `yarn prepare` to build the CLI.
8. Run `./bin/create-react-native-library` to run the CLI you built.
9. Fill in the name, email, etc., and make sure to select ` Fabric view
and Turbo module with backward compat`.
10. Go to the library you created and make sure to build the following:
    a. Android with old architecture
    b. iOS with old architecture
    c. Android with new architecture
    d. iOS with new architecture
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants