Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
krizzu committed Apr 8, 2024
1 parent 86eb94f commit 322c03a
Show file tree
Hide file tree
Showing 8 changed files with 78 additions and 465 deletions.
2 changes: 1 addition & 1 deletion packages/default-storage/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "./tsconfig.build.json",
"extends": "../../.config/tsconfig.base.json",
"compilerOptions": {
"noEmit": true,
"types": [
Expand Down
78 changes: 0 additions & 78 deletions packages/sqlite-storage/.gitignore

This file was deleted.

34 changes: 17 additions & 17 deletions packages/sqlite-storage/RNAsyncStorageSQLite.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package = JSON.parse(File.read(File.join(__dir__, "package.json")))
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'

Pod::Spec.new do |s|
s.name = "RNAsyncStorageSQLite"
s.name = File.basename(__FILE__, '.podspec')
s.version = package["version"]
s.summary = package["description"]
s.homepage = package["homepage"]
Expand All @@ -21,21 +21,21 @@ Pod::Spec.new do |s|
if respond_to?(:install_modules_dependencies, true)
install_modules_dependencies(s)
else
s.dependency "React-Core"
s.dependency "React-Core"

# Don't install the dependencies when we run `pod install` in the old architecture.
if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
s.pod_target_xcconfig = {
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
"OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
}
s.dependency "React-Codegen"
s.dependency "RCT-Folly"
s.dependency "RCTRequired"
s.dependency "RCTTypeSafety"
s.dependency "ReactCommon/turbomodule/core"
end
end
# Don't install the dependencies when we run `pod install` in the old architecture.
if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
s.pod_target_xcconfig = {
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
"OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
}
s.dependency "React-Codegen"
s.dependency "RCT-Folly"
s.dependency "RCTRequired"
s.dependency "RCTTypeSafety"
s.dependency "ReactCommon/turbomodule/core"
end
end
end
12 changes: 10 additions & 2 deletions packages/sqlite-storage/example/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
buildscript {
def androidTestAppDir = "../../node_modules/react-native-test-app/android"
apply(from: "${androidTestAppDir}/dependencies.gradle")
apply(from: {
def searchDir = rootDir.toPath()
do {
def p = searchDir.resolve("node_modules/react-native-test-app/android/dependencies.gradle")
if (p.toFile().exists()) {
return p.toRealPath().toString()
}
} while (searchDir = searchDir.getParent())
throw new GradleException("Could not find `react-native-test-app`");
}())

repositories {
mavenCentral()
Expand Down
11 changes: 10 additions & 1 deletion packages/sqlite-storage/example/android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,14 @@ pluginManagement {

rootProject.name = "AsyncStorageSQLiteExample"

apply(from: "../../node_modules/react-native-test-app/test-app.gradle")
apply(from: {
def searchDir = rootDir.toPath()
do {
def p = searchDir.resolve("node_modules/react-native-test-app/test-app.gradle")
if (p.toFile().exists()) {
return p.toRealPath().toString()
}
} while (searchDir = searchDir.getParent())
throw new GradleException("Could not find `react-native-test-app`");
}())
applyTestAppSettings(settings)
9 changes: 6 additions & 3 deletions packages/sqlite-storage/example/ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
require_relative '../../node_modules/react-native-test-app/test_app'
ws_dir = Pathname.new(__dir__)
ws_dir = ws_dir.parent until
File.exist?("#{ws_dir}/node_modules/react-native-test-app/test_app.rb") ||
ws_dir.expand_path.to_s == '/'
require "#{ws_dir}/node_modules/react-native-test-app/test_app.rb"

workspace 'AsyncStorageSQLiteExample.xcworkspace'

options = {
:fabric_enabled => false,
:hermes_enabled => false,
:turbomodule_enabled => false,
:hermes_enabled => false
}

use_test_app! options do |target|
Expand Down
2 changes: 1 addition & 1 deletion packages/sqlite-storage/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "./tsconfig.build.json",
"extends": "../../.config/tsconfig.base.json",
"compilerOptions": {
"noEmit": true,
"paths": {
Expand Down
Loading

0 comments on commit 322c03a

Please sign in to comment.