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: rn 73+expo 50 #26194

Closed
wants to merge 88 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
d303234
ios building with issues
chrisnojima Jan 23, 2024
cef1ef0
WIP
chrisnojima Jan 23, 2024
f5ba276
WIP
chrisnojima Jan 23, 2024
f523fc0
WIP
chrisnojima Jan 23, 2024
de44d7a
WIP
chrisnojima Jan 23, 2024
1c39570
WIP
chrisnojima Jan 23, 2024
67328c5
mm
chrisnojima Jan 23, 2024
1998e77
WIP
chrisnojima Jan 23, 2024
e8f1a29
WIP
chrisnojima Jan 23, 2024
5b719b8
WIP
chrisnojima Jan 24, 2024
9812d15
WIP
chrisnojima Jan 24, 2024
bfa2020
WIP
chrisnojima Jan 24, 2024
50fb8dd
WIP
chrisnojima Jan 24, 2024
cab9b97
WIP
chrisnojima Jan 24, 2024
bfbef93
WIP
chrisnojima Jan 24, 2024
040a284
WIP
chrisnojima Jan 24, 2024
14f07c8
WIP
chrisnojima Jan 24, 2024
c28f031
WIP
chrisnojima Jan 24, 2024
f8f1bb4
WIP
chrisnojima Jan 25, 2024
7d1baf8
WIP
chrisnojima Jan 25, 2024
4f57422
WIP
chrisnojima Jan 29, 2024
07e7e80
WIP
chrisnojima Jan 29, 2024
463bb5e
WIP
chrisnojima Jan 31, 2024
7ce94fe
WIP
chrisnojima Feb 1, 2024
148d155
WIP
chrisnojima Feb 7, 2024
6ed3f76
WIP
chrisnojima Feb 7, 2024
1ca8309
WIP
chrisnojima Feb 7, 2024
ce4bb58
WIP
chrisnojima Feb 7, 2024
c3c2712
WIP
chrisnojima Feb 7, 2024
6649a03
WIP
chrisnojima Feb 7, 2024
ef971dd
Merge remote-tracking branch 'origin/master' into nojima/HOTPOT-expo-50
chrisnojima Feb 12, 2024
f3c8bbd
WIP
chrisnojima Feb 12, 2024
e6ec088
WIP
chrisnojima Feb 13, 2024
d65cc7e
WIP
chrisnojima Feb 15, 2024
9ece67e
focus fix for fabric
chrisnojima Feb 15, 2024
2a4de44
Merge remote-tracking branch 'origin/master' into nojima/HOTPOT-expo-50
chrisnojima Feb 26, 2024
ab2f614
WIP
chrisnojima Feb 26, 2024
ed1ba05
Merge remote-tracking branch 'origin/master' into nojima/HOTPOT-expo-50
chrisnojima Feb 28, 2024
d6c1690
WIP
chrisnojima Feb 28, 2024
3e604b7
WIP
chrisnojima Mar 18, 2024
559f477
WIP
chrisnojima Mar 19, 2024
b9c8870
WIP
chrisnojima Mar 19, 2024
3acbab1
WIP
chrisnojima Mar 19, 2024
0e08458
WIP
chrisnojima Mar 19, 2024
677028f
WIP
chrisnojima Mar 20, 2024
02fa7b7
WIP
chrisnojima Mar 20, 2024
486d311
WIP
chrisnojima Mar 21, 2024
03a16e7
WIP
chrisnojima Mar 21, 2024
6cdc9da
WIP
chrisnojima Mar 21, 2024
d260e9c
WIP
chrisnojima Mar 21, 2024
3b2a2b6
WIP
chrisnojima Mar 26, 2024
0dd3630
Merge remote-tracking branch 'origin/master' into nojima/HOTPOT-expo-50
chrisnojima Mar 27, 2024
77ef2e0
WIP
chrisnojima Mar 27, 2024
ff2695a
WIP
chrisnojima Mar 28, 2024
3e0600b
WIP
chrisnojima Apr 1, 2024
eae5889
WIP
chrisnojima Apr 2, 2024
ac64437
Merge remote-tracking branch 'origin/master' into nojima/HOTPOT-expo-50
chrisnojima Apr 4, 2024
ff9732b
Merge remote-tracking branch 'origin/master' into nojima/HOTPOT-expo-50
chrisnojima Apr 5, 2024
e3a6a5d
WIP
chrisnojima Apr 5, 2024
bc59f2b
WIP
chrisnojima Apr 5, 2024
2ecdd0f
Merge remote-tracking branch 'origin/master' into nojima/HOTPOT-expo-50
chrisnojima Apr 9, 2024
9e16f4f
WIP
chrisnojima Apr 9, 2024
ce3e67c
WIP
chrisnojima Apr 9, 2024
a923a0a
Merge remote-tracking branch 'origin/master' into nojima/HOTPOT-expo-50
chrisnojima Apr 11, 2024
0b8c82d
Merge remote-tracking branch 'origin/master' into nojima/HOTPOT-expo-50
chrisnojima Apr 11, 2024
f76e288
WIP
chrisnojima Apr 11, 2024
ee7ffbb
WIP
chrisnojima Apr 11, 2024
317fab4
Merge remote-tracking branch 'origin/master' into nojima/HOTPOT-expo-50
chrisnojima Apr 12, 2024
0f94f3c
Merge remote-tracking branch 'origin/master' into nojima/HOTPOT-expo-50
chrisnojima Apr 15, 2024
c7f15ca
WIP
chrisnojima Apr 15, 2024
d5865a2
Merge remote-tracking branch 'origin/master' into nojima/HOTPOT-expo-50
chrisnojima Apr 17, 2024
7d8ea68
WIP
chrisnojima Apr 17, 2024
10f3d6a
WIP
chrisnojima Apr 18, 2024
5fcaf80
WIP
chrisnojima May 1, 2024
26bebfe
WIP
chrisnojima May 1, 2024
492ce36
WIP
chrisnojima May 1, 2024
a5239a6
WIP
chrisnojima May 1, 2024
abe26e0
WIP
chrisnojima May 1, 2024
b95e535
WIP
chrisnojima May 1, 2024
d5c8487
WIP
chrisnojima May 2, 2024
ce05088
WIP
chrisnojima May 2, 2024
bcfa3da
Merge remote-tracking branch 'origin/master' into nojima/HOTPOT-expo-50
chrisnojima May 8, 2024
c337f3d
WIP
chrisnojima May 8, 2024
c1310f5
WIP
chrisnojima May 9, 2024
255a282
Merge remote-tracking branch 'origin/master' into nojima/HOTPOT-expo-50
chrisnojima May 17, 2024
66a2f90
Merge remote-tracking branch 'origin/master' into nojima/HOTPOT-expo-50
chrisnojima May 20, 2024
e0d194d
WIP
chrisnojima May 20, 2024
1f57b34
Merge remote-tracking branch 'origin/master' into nojima/HOTPOT-expo-50
chrisnojima May 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion go/libkb/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
package libkb

// Version is the current version (should be MAJOR.MINOR.PATCH)
const Version = "6.3.0"
const Version = "6.4.0"
87 changes: 34 additions & 53 deletions rnmodules/react-native-drop-view/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
buildscript {
// Buildscript is evaluated before everything else so we can't use getExtOrDefault
def kotlin_version = rootProject.ext.has("kotlinVersion") ? rootProject.ext.get("kotlinVersion") : project.properties["DropView_kotlinVersion"]

repositories {
google()
mavenCentral()
}

dependencies {
classpath "com.android.tools.build:gradle:7.2.1"
// noinspection DifferentKotlinGradleVersion
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

Expand All @@ -14,29 +19,7 @@ def isNewArchitectureEnabled() {
}

apply plugin: "com.android.library"

import groovy.json.JsonSlurper

// https://github.com/callstack/react-native-builder-bob/discussions/359
def registrationCompat = {
def reactNativeManifest = file("$projectDir/../node_modules/react-native/package.json").exists()
? file("$projectDir/../node_modules/react-native/package.json") // developer mode, to run example app
: file("$projectDir/../../react-native/package.json")
def reactNativeVersion = new JsonSlurper().parseText(reactNativeManifest.text).version as String
// Fabric was introduced at react-native@0.68, full CMake support were introduced at react-native@0.71
// Use Android.mk for compatibility with react-native@0.68/0.69
reactNativeVersion.matches('(0.68.*|0.69.*)')
}()

def codegenViewLibraryName = "DropViewView"
def codegenViewModuleName = {
// Autolink for Fabric uses codegenConfig.name in package.json since react-native@0.70
// Use codegenViewLibraryName for compatibility with react-native@0.68/0.69
def libraryManifestJson = new JsonSlurper().parseText(file("$projectDir/../package.json").text)
registrationCompat ? codegenViewLibraryName : libraryManifestJson.codegenConfig.name
}()

def appProject = rootProject.allprojects.find { it.plugins.hasPlugin('com.android.application') }
apply plugin: "kotlin-android"

if (isNewArchitectureEnabled()) {
apply plugin: "com.facebook.react"
Expand All @@ -50,42 +33,39 @@ def getExtOrIntegerDefault(name) {
return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties["DropView_" + name]).toInteger()
}

def supportsNamespace() {
def parsed = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')
def major = parsed[0].toInteger()
def minor = parsed[1].toInteger()

// Namespace support was added in 7.3.0
return (major == 7 && minor >= 3) || major >= 8
}

android {
ndkVersion getExtOrDefault("ndkVersion")
if (supportsNamespace()) {
namespace "io.keybase.dropview"

sourceSets {
main {
manifest.srcFile "src/main/AndroidManifestNew.xml"
}
}
}

compileSdkVersion getExtOrIntegerDefault("compileSdkVersion")

defaultConfig {
minSdkVersion getExtOrIntegerDefault("minSdkVersion")
targetSdkVersion getExtOrIntegerDefault("targetSdkVersion")
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
buildConfigField "String", "CODEGEN_MODULE_REGISTRATION", (isNewArchitectureEnabled() && registrationCompat ? "\"${codegenViewModuleName}_registration\"" : "null")
if (isNewArchitectureEnabled() && registrationCompat) {
def reactAndroidProject = project(':ReactAndroid')
externalNativeBuild {
ndkBuild {
arguments "APP_PLATFORM=android-21",
"APP_STL=c++_shared",
"NDK_TOOLCHAIN_VERSION=clang",
"GENERATED_SRC_DIR=$buildDir/generated/source", // for react_codegen_* in this library's codegen/jni
"PROJECT_BUILD_DIR=${appProject.buildDir}", // for REACT_NDK_EXPORT_DIR in ReactAndroid's Android-prebuilt.mk
"REACT_ANDROID_DIR=${reactAndroidProject.projectDir}",
"REACT_ANDROID_BUILD_DIR=${reactAndroidProject.buildDir}",
"CODEGEN_MODULE_NAME=$codegenViewModuleName"
cFlags "-Wall", "-Werror", "-fexceptions", "-frtti", "-DWITH_INSPECTOR=1"
cppFlags "-std=c++17"
targets "${codegenViewModuleName}_registration"
}
}
}

}
if (isNewArchitectureEnabled() && registrationCompat) {
// We configure the NDK build only if you decide to opt-in for the New Architecture.
externalNativeBuild {
ndkBuild {
path "Android.mk"
}
}

buildFeatures {
buildConfig true
}

buildTypes {
release {
minifyEnabled false
Expand Down Expand Up @@ -121,19 +101,20 @@ repositories {
google()
}

def kotlin_version = getExtOrDefault("kotlinVersion")

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:+"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
}

if (isNewArchitectureEnabled()) {
react {
jsRootDir = file("../src/")

libraryName = codegenViewLibraryName
codegenJavaPackageName = "com.dropview"
libraryName = "DropViewView"
codegenJavaPackageName = "io.keybase.dropview"
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.reactnativedropview

import android.content.Context
import android.util.AttributeSet
import android.widget.FrameLayout
import androidx.annotation.Nullable

class DropViewView @JvmOverloads constructor(
context: Context,
@Nullable attrs: AttributeSet? = null,
defStyleAttr: Int = 0
) : FrameLayout(context, attrs, defStyleAttr)

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package com.reactnativedropview

import com.facebook.react.module.annotations.ReactModule
import com.facebook.react.bridge.ReactApplicationContext
import com.facebook.react.uimanager.ThemedReactContext
import com.facebook.react.uimanager.annotations.ReactProp

@ReactModule(name = DropViewViewManager.NAME)
class DropViewViewManager :
DropViewViewManagerSpec<DropViewView>() {
override fun getName(): String {
return NAME
}

public override fun createViewInstance(context: ThemedReactContext): DropViewView {
return DropViewView(context)
}

companion object {
const val NAME = "DropViewView"
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package com.reactnativedropview

import com.facebook.react.ReactPackage
import com.facebook.react.bridge.NativeModule
import com.facebook.react.bridge.ReactApplicationContext
import com.facebook.react.uimanager.ViewManager
import java.util.ArrayList

class DropViewViewPackage : ReactPackage {
override fun createViewManagers(reactContext: ReactApplicationContext): List<ViewManager<*, *>> {
val viewManagers: MutableList<ViewManager<*, *>> = ArrayList()
viewManagers.add(DropViewViewManager())
return viewManagers
}

override fun createNativeModules(reactContext: ReactApplicationContext): List<NativeModule> {
return emptyList()
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package com.reactnativedropview

import android.view.View
import android.widget.FrameLayout
import com.facebook.react.uimanager.ViewManagerDelegate
import com.facebook.react.viewmanagers.DropViewViewManagerDelegate
import com.facebook.react.viewmanagers.DropViewViewManagerInterface
import com.facebook.react.uimanager.ViewGroupManager
import com.facebook.soloader.SoLoader

abstract class DropViewViewManagerSpec<T : FrameLayout> : ViewGroupManager<T>(), DropViewViewManagerInterface<T> {
private val mDelegate: ViewManagerDelegate<T>

init {
mDelegate = DropViewViewManagerDelegate(this)
}

override fun getDelegate(): ViewManagerDelegate<T>? {
return mDelegate
}

}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.reactnativedropview

import android.view.View
import com.facebook.react.uimanager.ViewGroupManager
import android.widget.FrameLayout

abstract class DropViewViewManagerSpec<T : FrameLayout> : ViewGroupManager<T>()
27 changes: 19 additions & 8 deletions rnmodules/react-native-drop-view/ios/DropViewView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,14 @@ + (ComponentDescriptorProvider)componentDescriptorProvider
return concreteComponentDescriptorProvider<DropViewViewComponentDescriptor>();
}

- (instancetype)initWithFrame:(CGRect)frame
- (instancetype)init
{
if (self = [super initWithFrame:frame]) {
if (self = [super init]) {
#ifdef RCT_NEW_ARCH_ENABLED
static const auto defaultProps = std::make_shared<const DropViewViewProps>();
_props = defaultProps;

DropView *dv = [[DropView alloc] init];
_view = dv;

self.contentView = _view;
#endif
}

return self;
}

Expand All @@ -48,5 +44,20 @@ - (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const &
return DropViewView.class;
}

- (void)layoutSubviews
{
[super layoutSubviews];
}

- (void)mountChildComponentView:(UIView<RCTComponentViewProtocol> *)childComponentView index:(NSInteger)index
{
[super mountChildComponentView:childComponentView index:index];
}

- (UIView *)view
{
return [[DropView alloc] init];
}

@end
#endif