-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Add contacts import nitro module #54459
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
base: main
Are you sure you want to change the base?
Changes from all commits
bf0ca57
7a548c8
6f1e3da
7abab7e
434a9f9
e704e6b
fce6f6b
9f0acad
1d85e9a
7c8fc7f
924ce0e
9be4449
40ab11f
524fdec
4ad7f0b
be5e87a
d54e954
27c0243
ab4e4b5
3ed4384
3a7122d
15c0c9c
0841825
087cfaa
45be028
ac69b81
6179f6d
defe8e9
22bb0fa
3bd8809
fbdba00
2010959
2caedc0
73e62fd
320b3d9
68c1f72
e1b14b0
ee672e4
a4b5bd5
3422a85
8862d5b
c68a372
c27b93c
f8646ff
37cdd4b
bd9c456
f873d1d
75ebc09
ffceb88
e9274cd
dcaa5a0
d86b2f8
c8cd538
dd0a20c
95faeb2
c827792
e776c07
ec4dec3
1940b44
5a30f42
6583a01
85a5f81
1ff99a0
833f23a
280d84d
956c5b2
0d620a1
2beeb99
74f1e9b
8e9e278
af5fcc6
fc36ad1
5582bd8
57075c8
6f35f2f
282e1fb
ae612f4
b76ca89
d324b2b
51b73aa
12dc207
db4ec02
cc41133
d9ac1de
1c88d2f
67a2f58
a3b4dd9
7109612
fd60fe8
dc0456d
185d343
a9fbdda
869d344
31453c8
96979b8
188133a
d716be3
892e195
5d6be4b
ad585cb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# OSX | ||
# | ||
.DS_Store | ||
|
||
# XDE | ||
.expo/ | ||
|
||
# VSCode | ||
.vscode/ | ||
jsconfig.json | ||
|
||
# Xcode | ||
# | ||
build/ | ||
*.pbxuser | ||
!default.pbxuser | ||
*.mode1v3 | ||
!default.mode1v3 | ||
*.mode2v3 | ||
!default.mode2v3 | ||
*.perspectivev3 | ||
!default.perspectivev3 | ||
xcuserdata | ||
*.xccheckout | ||
*.moved-aside | ||
DerivedData | ||
*.hmap | ||
*.ipa | ||
*.xcuserstate | ||
project.xcworkspace | ||
|
||
# Android/IJ | ||
# | ||
.classpath | ||
.cxx | ||
.gradle | ||
.idea | ||
.project | ||
.settings | ||
local.properties | ||
android.iml | ||
|
||
# Cocoapods | ||
# | ||
example/ios/Pods | ||
|
||
# Ruby | ||
example/vendor/ | ||
|
||
# node.js | ||
# | ||
node_modules/ | ||
npm-debug.log | ||
yarn-debug.log | ||
yarn-error.log | ||
|
||
# BUCK | ||
buck-out/ | ||
\.buckd/ | ||
android/app/libs | ||
android/keystores/debug.keystore | ||
|
||
# Expo | ||
.expo/ | ||
|
||
# Turborepo | ||
.turbo/ | ||
|
||
# generated by bob | ||
lib/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
require "json" | ||
|
||
package = JSON.parse(File.read(File.join(__dir__, "package.json"))) | ||
|
||
Pod::Spec.new do |s| | ||
s.name = "ExpensifyNitroUtils" | ||
s.version = package["version"] | ||
s.summary = package["description"] | ||
s.homepage = package["homepage"] | ||
s.license = package["license"] | ||
s.authors = package["author"] | ||
|
||
s.platforms = { :ios => min_ios_version_supported } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is min_ios_version_supported defined automatically somewhere? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If it's not defined there it will pick up version form root podfile |
||
s.source = { :git => "https://github.com/mrousavy/nitro.git", :tag => "#{s.version}" } | ||
|
||
s.source_files = [ | ||
# Implementation (Swift) | ||
"ios/**/*.{swift}", | ||
# Autolinking/Registration (Objective-C++) | ||
"ios/**/*.{m,mm}", | ||
# Implementation (C++ objects) | ||
"cpp/**/*.{hpp,cpp}", | ||
] | ||
|
||
load 'nitrogen/generated/ios/ExpensifyNitroUtils+autolinking.rb' | ||
add_nitrogen_files(s) | ||
|
||
install_modules_dependencies(s) | ||
end |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
project(ExpensifyNitroUtils) | ||
cmake_minimum_required(VERSION 3.9.0) | ||
|
||
set (PACKAGE_NAME ExpensifyNitroUtils) | ||
set (CMAKE_VERBOSE_MAKEFILE ON) | ||
set (CMAKE_CXX_STANDARD 20) | ||
roryabraham marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
# Define C++ library and add all sources | ||
add_library(${PACKAGE_NAME} SHARED | ||
src/main/cpp/cpp-adapter.cpp | ||
) | ||
|
||
# Add Nitrogen specs :) | ||
include(${CMAKE_SOURCE_DIR}/../nitrogen/generated/android/ExpensifyNitroUtils+autolinking.cmake) | ||
|
||
# Set up local includes | ||
include_directories( | ||
"src/main/cpp" | ||
"../cpp" | ||
) | ||
|
||
find_library(LOG_LIB log) | ||
|
||
# Link all libraries together | ||
target_link_libraries( | ||
${PACKAGE_NAME} | ||
${LOG_LIB} | ||
android # <-- Android core | ||
) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
buildscript { | ||
repositories { | ||
google() | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
classpath "com.android.tools.build:gradle:7.2.1" | ||
} | ||
} | ||
|
||
def reactNativeArchitectures() { | ||
def value = rootProject.getProperties().get("reactNativeArchitectures") | ||
return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"] | ||
} | ||
|
||
def isNewArchitectureEnabled() { | ||
return rootProject.hasProperty("newArchEnabled") && rootProject.getProperty("newArchEnabled") == "true" | ||
} | ||
|
||
apply plugin: "com.android.library" | ||
apply plugin: 'org.jetbrains.kotlin.android' | ||
apply from: '../nitrogen/generated/android/ExpensifyNitroUtils+autolinking.gradle' | ||
|
||
if (isNewArchitectureEnabled()) { | ||
apply plugin: "com.facebook.react" | ||
} | ||
|
||
def getExtOrDefault(name) { | ||
return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties["ExpensifyNitroUtils_" + name] | ||
} | ||
|
||
def getExtOrIntegerDefault(name) { | ||
return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties["ExpensifyNitroUtils_" + name]).toInteger() | ||
} | ||
|
||
android { | ||
namespace "com.margelo.nitro.utils" | ||
ndkVersion getExtOrDefault("ndkVersion") | ||
compileSdkVersion getExtOrIntegerDefault("compileSdkVersion") | ||
|
||
defaultConfig { | ||
minSdkVersion getExtOrIntegerDefault("minSdkVersion") | ||
targetSdkVersion getExtOrIntegerDefault("targetSdkVersion") | ||
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString() | ||
|
||
externalNativeBuild { | ||
cmake { | ||
cppFlags "-O2 -frtti -fexceptions -Wall -fstack-protector-all" | ||
arguments "-DANDROID_STL=c++_shared" | ||
abiFilters (*reactNativeArchitectures()) | ||
} | ||
} | ||
} | ||
|
||
externalNativeBuild { | ||
cmake { | ||
path "CMakeLists.txt" | ||
} | ||
} | ||
|
||
packagingOptions { | ||
excludes = [ | ||
"META-INF", | ||
"META-INF/**", | ||
"**/libc++_shared.so", | ||
"**/libfbjni.so", | ||
"**/libjsi.so", | ||
"**/libfolly_json.so", | ||
"**/libfolly_runtime.so", | ||
"**/libglog.so", | ||
"**/libhermes.so", | ||
"**/libhermes-executor-debug.so", | ||
"**/libhermes_executor.so", | ||
"**/libreactnativejni.so", | ||
"**/libturbomodulejsijni.so", | ||
"**/libreact_nativemodule_core.so", | ||
"**/libjscexecutor.so" | ||
] | ||
} | ||
|
||
buildFeatures { | ||
buildConfig true | ||
prefab true | ||
} | ||
|
||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
} | ||
} | ||
|
||
lintOptions { | ||
disable "GradleCompatible" | ||
} | ||
|
||
compileOptions { | ||
sourceCompatibility JavaVersion.VERSION_17 | ||
targetCompatibility JavaVersion.VERSION_17 | ||
} | ||
|
||
sourceSets { | ||
main { | ||
if (isNewArchitectureEnabled()) { | ||
java.srcDirs += [ | ||
// React Codegen files | ||
"${project.buildDir}/generated/source/codegen/java" | ||
] | ||
} | ||
} | ||
} | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
google() | ||
} | ||
|
||
|
||
dependencies { | ||
// For < 0.71, this will be from the local maven repo | ||
// For > 0.71, this will be replaced by `com.facebook.react:react-android:$version` by react gradle plugin | ||
//noinspection GradleDynamicVersion | ||
implementation "com.facebook.react:react-native:+" | ||
|
||
// Add a dependency on NitroModules | ||
implementation project(":react-native-nitro-modules") | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally very difficult to review changes in this file, but can you try just removing all the changes in this file, then surgically add back only the ones that are strictly necessary here? Looking at some of the changes, it looks like you might've checked "automatically manage signing" or whatever that checkbox is in XCode. That can help you get a passing build without setting up the manual provisioning profile, but might break prod builds and we don't want to commit the change.