Skip to content

fix: resolve potential build issues with RN 0.72 #841

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

Merged
merged 2 commits into from
Jun 6, 2023
Merged

fix: resolve potential build issues with RN 0.72 #841

merged 2 commits into from
Jun 6, 2023

Conversation

AlexanderEggers
Copy link
Contributor

@AlexanderEggers AlexanderEggers commented Jun 1, 2023

Starting with RN 0.72 the JVM target will be enforced across all packages. Unfortunately in my case instead of enforcing JVM 11, I am going to have to enforce JVM 17 because that's the java version I have locally installed.

The RN team introduced a fix which updates the sourceCompatibility and targetCompatibility in all projects to make that compatible. kotlinOptions.jvmTarget is by default set by the JVM version that is installed on the machine - in my case 17. At the moment, the RN fix is not updating the kotlinOptions.jvmTarget - I hope that will still make it as part of the 0.72.0 stable relaese. Generally the JVM target of java and kotlin needs to match. If the RN team does not decide to update their fix, then I would need to patch this library manually to fix build errors on RN 0.72.

I believe dropping the suggested lines will have no impact on this project but will ensure other people with my same use-case are not running into any issues.

@oscb
Copy link
Contributor

oscb commented Jun 2, 2023

Hi @AlexanderEggers

Thanks for raising this up. I think it all makes sense. I truly don't think this should have any impact but we might have to manually test this change with 0.72 just to confirm before merging.

@AlexanderEggers
Copy link
Contributor Author

@oscb I don't think you will have to wait for 0.72 to land. IMO there should be no reason for you to define the kotlin jvm target and segment is actually only library I know of that defines this.

@oscb
Copy link
Contributor

oscb commented Jun 3, 2023

I meant just testing with the current version of RN.

Just a sanity check.

@oscb
Copy link
Contributor

oscb commented Jun 5, 2023

I removed it from the AdvertisingId plugin and updated your PR, I haven't been able to track down why this was added, it's been a while, but seems to be working properly so I'll merge when the build finishes.

@AlexanderEggers Thanks again!

@AlexanderEggers
Copy link
Contributor Author

Thanks for the update @oscb 👍

@oscb oscb merged commit d287304 into segmentio:master Jun 6, 2023
@AlexanderEggers AlexanderEggers deleted the patch-1 branch June 6, 2023 15:52
oscb pushed a commit that referenced this pull request Aug 21, 2023
## [@segment/analytics-react-native-v2.16.0](https://github.com/segmentio/analytics-react-native/compare/@segment/analytics-react-native-v2.15.0...@segment/analytics-react-native-v2.16.0) (2023-08-21)

### Features

* add saveDelay option for persistor ([#811](#811)) ([11d5e87](11d5e87))

### Bug Fixes

* package dependency fixes ([#869](#869)) ([08d415e](08d415e))
* resolve potential build issues with RN 0.72 ([#841](#841)) ([d287304](d287304))
@oscb
Copy link
Contributor

oscb commented Aug 21, 2023

🎉 This PR is included in version @segment/analytics-react-native-v2.16.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@oscb oscb added the released label Aug 21, 2023
oscb pushed a commit that referenced this pull request Aug 21, 2023
@oscb
Copy link
Contributor

oscb commented Aug 21, 2023

🎉 This PR is included in version @segment/analytics-react-native-plugin-advertising-id-v1.2.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants