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

[WIP] Update deps - RN0.73 #1820

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<PROJECT_ROOT>/react-native-copy
<PROJECT_ROOT>/src/**/*.ts
.*/node_modules/react\-native/.*
.*/node_modules/@react\-native/.*
.*/node_modules/fbjs/**
.*/node_modules/resolve/test/resolver/**

Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ gem 'pry'

# Cocoapods 1.15 introduced a bug which break the build. (RN 0.72) We will remove the upper
# bound in the template on Cocoapods with next React Native release.
gem 'cocoapods', '1.15.2'
gem 'cocoapods', '>= 1.13', '< 1.15'
gem 'activesupport', '>= 6.1.7.3', '< 7.1.0' # temporary?

# NOTE: TEMPORARY, for darwin-arm64 compatibility
Expand Down
18 changes: 9 additions & 9 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ GEM
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
algoliasearch (1.27.5)
httpclient (~> 2.8, >= 2.8.3)
json (>= 1.5.1)
atomos (0.1.3)
base64 (0.2.0)
claide (1.1.0)
cocoapods (1.15.2)
cocoapods (1.14.3)
addressable (~> 2.8)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.15.2)
cocoapods-core (= 1.14.3)
cocoapods-deintegrate (>= 1.0.3, < 2.0)
cocoapods-downloader (>= 2.1, < 3.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
Expand All @@ -44,7 +44,7 @@ GEM
nap (~> 1.0)
ruby-macho (>= 2.3.0, < 3.0)
xcodeproj (>= 1.23.0, < 2.0)
cocoapods-core (1.15.2)
cocoapods-core (1.14.3)
activesupport (>= 5.0, < 8)
addressable (~> 2.8)
algoliasearch (~> 1.0)
Expand Down Expand Up @@ -86,28 +86,28 @@ GEM
coderay (~> 1.1)
method_source (~> 1.0)
public_suffix (4.0.7)
rexml (3.2.9)
rexml (3.3.4)
strscan
ruby-macho (2.5.1)
strscan (3.1.0)
typhoeus (1.4.1)
ethon (>= 0.9.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
xcodeproj (1.24.0)
xcodeproj (1.25.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
rexml (~> 3.2.4)
rexml (>= 3.3.2, < 4.0)

PLATFORMS
ruby

DEPENDENCIES
activesupport (>= 6.1.7.3, < 7.1.0)
cocoapods (= 1.15.2)
cocoapods (>= 1.13, < 1.15)
ethon!
ffi (> 1.14.2)
pry
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
| ⚛️ | **Optimized for React.** Easily plug data into components |
| 🧰 | **Framework-agnostic.** Use JS API to plug into other UI frameworks |
| ⏱ | **Fast.** And getting faster with every release! |
| ✅ | **Proven.** Powers [Nozbe Teams](https://nozbe.com/teams) since 2017 (and [many others](#who-uses-watermelondb)) |
| ✅ | **Proven.** Powers [Nozbe](https://nozbe.com/teams) since 2017 (and [many others](#who-uses-watermelondb)) |
| ✨ | **Reactive.** (Optional) [RxJS](https://github.com/ReactiveX/rxjs) API |
| 🔗 | **Relational.** Built on rock-solid [SQLite](https://www.sqlite.org) foundation |
| ⚠️ | **Static typing** with [Flow](https://flow.org) or [TypeScript](https://typescriptlang.org) |
Expand Down
1 change: 1 addition & 0 deletions native/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ ios/.xcode.env.local
**/Pods/hermes-engine
**/Pods/libevent
**/Pods/Sentry
**/Pods/hermes-engine-artifacts

# Android/IntelliJ
#
Expand Down
2 changes: 2 additions & 0 deletions native/android-jsi/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ android {
buildToolsVersion rootProject.hasProperty('buildToolsVersion') ? rootProject.buildToolsVersion : DEFAULT_BUILD_TOOLS_VERSION
ndkVersion rootProject.hasProperty('ndkVersion') ? rootProject.ndkVersion : DEFAULT_NDK_VERSION

namespace "com.nozbe.watermelondb.jsi"

defaultConfig {
minSdkVersion rootProject.hasProperty('minSdkVersion') ? rootProject.minSdkVersion : DEFAULT_MIN_SDK_VERSION
targetSdkVersion rootProject.hasProperty('targetSdkVersion') ? rootProject.targetSdkVersion : DEFAULT_TARGET_SDK_VERSION
Expand Down
2 changes: 1 addition & 1 deletion native/android-jsi/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.nozbe.watermelondb.jsi" />
<manifest />
2 changes: 2 additions & 0 deletions native/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ android {
compileSdkVersion getExtOrIntegerDefault('compileSdkVersion')
buildToolsVersion getExtOrDefault('buildToolsVersion')

namespace "com.nozbe.watermelondb"

defaultConfig {
minSdkVersion getExtOrIntegerDefault('minSdkVersion')
targetSdkVersion getExtOrIntegerDefault('targetSdkVersion')
Expand Down
2 changes: 2 additions & 0 deletions native/androidTest/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ android {
compileSdkVersion rootProject.compileSdkVersion
buildToolsVersion rootProject.buildToolsVersion

namespace "com.nozbe.watermelonTest"

defaultConfig {
applicationId "com.nozbe.watermelondb"
minSdkVersion rootProject.minSdkVersion
Expand Down
4 changes: 1 addition & 3 deletions native/androidTest/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.nozbe.watermelonTest">
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.INTERNET" />

Expand All @@ -21,7 +20,6 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false" />
</application>

</manifest>
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
package com.nozbe.watermelonTest

import com.facebook.react.ReactActivity
import com.facebook.react.ReactActivityDelegate
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
import com.facebook.react.defaults.DefaultReactActivityDelegate

import com.nozbe.watermelondb.jsi.WatermelonJSI

class MainActivity : ReactActivity() {
Expand All @@ -11,5 +15,6 @@ class MainActivity : ReactActivity() {
WatermelonJSI.onTrimMemory(level)
}

// TODO: add createReactActivityDelegate? https://raw.githubusercontent.com/react-native-community/rn-diff-purge/release/0.72.15/RnDiffApp/android/app/src/main/java/com/rndiffapp/MainActivity.java
override fun createReactActivityDelegate(): ReactActivityDelegate =
DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled)
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,23 @@ package com.nozbe.watermelonTest

import android.app.Application
import com.facebook.react.ReactApplication
import com.facebook.react.ReactHost
import com.facebook.react.ReactNativeHost
import com.facebook.react.ReactPackage
import com.facebook.react.bridge.JSIModule
import com.facebook.react.bridge.JSIModulePackage
import com.facebook.react.bridge.JSIModuleSpec
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
import com.facebook.react.defaults.DefaultReactNativeHost
import com.facebook.react.shell.MainReactPackage
import com.facebook.soloader.SoLoader
import com.nozbe.watermelondb.WatermelonDBPackage
import com.nozbe.watermelondb.jsi.WatermelonDBJSIPackage

class MainApplication : Application(), ReactApplication {

private val reactNativeHost = object : ReactNativeHost(this) {
override val reactNativeHost = object : DefaultReactNativeHost(this) {
override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG

override fun getPackages(): List<ReactPackage> =
Expand All @@ -41,5 +45,6 @@ class MainApplication : Application(), ReactApplication {
SoLoader.init(this, false)
}

override fun getReactNativeHost(): ReactNativeHost = reactNativeHost
override val reactHost: ReactHost
get() = getDefaultReactHost(this.applicationContext, reactNativeHost)
}
15 changes: 8 additions & 7 deletions native/androidTest/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,20 @@

buildscript {
project.ext {
buildToolsVersion = "33.0.0"
buildToolsVersion = "34.0.0"
minSdkVersion = 23
compileSdkVersion = 33
targetSdkVersion = 33
// We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP.
ndkVersion = "23.1.7779620"
kotlinVersion = '1.7.21'
compileSdkVersion = 34
targetSdkVersion = 34
ndkVersion = "25.1.8937393"
kotlinVersion = '1.8.0'
}

repositories {
google()
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle:7.3.1")
classpath("com.android.tools.build:gradle")
classpath("com.facebook.react:react-native-gradle-plugin")
// classpath("de.undercouch:gradle-download-task:5.0.1")
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
Expand All @@ -34,6 +33,8 @@ configurations.all {
}
}

apply plugin: "com.facebook.react.rootproject"

// allprojects {
// repositories {
// exclusiveContent {
Expand Down
3 changes: 2 additions & 1 deletion native/androidTest/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
9 changes: 4 additions & 5 deletions native/iosTest/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,6 @@ post_install do |installer|
'../../node_modules/react-native',
mac_catalyst_enabled: false,
)
# __apply_Xcode_12_5_M1_post_install_workaround(installer)

# wtf? https://github.com/facebook/react-native/issues/33178
system("sed -i -e $'s/_IPHONE_10_0/_IPHONE_17_0/' '#{installer.sandbox.root}/RCT-Folly/folly/portability/Time.h'") || raise

installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
Expand All @@ -77,7 +73,10 @@ post_install do |installer|
# you also have to be careful about PCHs
# sometimes you might have to manually add a system framework to project Link phase
# more info: https://pspdfkit.com/blog/2015/ccache-for-fun-and-profit/
config.build_settings['CC'] ||= ['$(SRCROOT)/../../../scripts/ccache-clang']

# TODO: Bring back CC
# config.build_settings['CC'] ||= ['$(SRCROOT)/../../../scripts/ccache-clang']

# case target.name
# when 'Nimble'
# config.build_settings['CLANG_ENABLE_MODULES'] ||= ['YES']
Expand Down
Loading
Loading