Skip to content

Commit

Permalink
Merge branch 'main' into @tomekzaw/worklets
Browse files Browse the repository at this point in the history
  • Loading branch information
tomekzaw committed Sep 9, 2024
2 parents 589478c + 54c59e0 commit a521066
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 17 deletions.
2 changes: 1 addition & 1 deletion RNLiveMarkdown.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Pod::Spec.new do |s|
s.license = package["license"]
s.authors = package["author"]

s.platforms = { :ios => "11.0" }
s.platforms = { :ios => "11.0", :visionos => "1.0" }
s.source = { :git => "https://github.com/expensify/react-native-live-markdown.git", :tag => "#{s.version}" }

s.source_files = "ios/**/*.{h,m,mm}", "cpp/**/*.{h,cpp}"
Expand Down
19 changes: 4 additions & 15 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,21 +52,10 @@ def resolveReactNativeDirectory() {
return file(reactNativeLocation)
}

// monorepo workaround
// react-native can be hoisted or in project's own node_modules
def reactNativeFromProjectNodeModules = file("${rootProject.projectDir}/../node_modules/react-native")
if (reactNativeFromProjectNodeModules.exists()) {
return reactNativeFromProjectNodeModules
}

def reactNativeFromLiveMarkdownMonorepo = file("${projectDir}/../../../node_modules/react-native")
if (reactNativeFromLiveMarkdownMonorepo.exists()) {
return reactNativeFromLiveMarkdownMonorepo
}

def reactNativeFromNodeModulesWithLiveMarkdown = file("${projectDir}/../../react-native")
if (reactNativeFromNodeModulesWithLiveMarkdown.exists()) {
return reactNativeFromNodeModulesWithLiveMarkdown
// Fallback to node resolver for custom directory structures like monorepos.
def reactNativePackage = file(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim())
if (reactNativePackage.exists()) {
return reactNativePackage.parentFile
}

throw new GradleException("[react-native-live-markdown] Unable to resolve react-native location in node_modules. Your app should define `REACT_NATIVE_NODE_MODULES_DIR` extension property in `app/build.gradle` with a path to react-native in node_modules.")
Expand Down
2 changes: 2 additions & 0 deletions ios/RCTMarkdownStyle.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#import <UIKit/UIKit.h>

#ifdef RCT_NEW_ARCH_ENABLED
#import <react/renderer/components/RNLiveMarkdownSpec/Props.h>
#endif /* RCT_NEW_ARCH_ENABLED */
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@expensify/react-native-live-markdown",
"version": "0.1.130",
"version": "0.1.132",
"description": "Drop-in replacement for React Native's TextInput component with Markdown formatting.",
"main": "lib/commonjs/index",
"module": "lib/module/index",
Expand Down

0 comments on commit a521066

Please sign in to comment.