Skip to content
Merged

WIP: 650 #28095

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
5ab9ed9
WIP
chrisnojima Oct 16, 2024
3db47eb
WIP: expo 51 (#26844)
chrisnojima Oct 16, 2024
d55cbf7
WIP
chrisnojima Oct 16, 2024
c243617
WIP
chrisnojima Oct 16, 2024
e6ab260
WIP
chrisnojima Oct 16, 2024
721dbf8
WIP
chrisnojima Oct 16, 2024
d34cfe1
WIP
chrisnojima Oct 16, 2024
c9eadbd
WIP
chrisnojima Oct 16, 2024
694fa90
WIP
chrisnojima Oct 16, 2024
ab95672
WIP
chrisnojima Oct 17, 2024
166e97c
WIP
chrisnojima Oct 17, 2024
a84dec3
WIP
chrisnojima Oct 17, 2024
a3d617e
WIP
chrisnojima Oct 17, 2024
f8c87f0
WIP
chrisnojima Oct 17, 2024
961baff
WIP
chrisnojima Oct 17, 2024
c2edb82
WIP
chrisnojima Oct 17, 2024
4cb9af3
WIP
chrisnojima Oct 17, 2024
02b8b14
WIP
chrisnojima Oct 17, 2024
5d6db06
WIP
chrisnojima Oct 18, 2024
152a099
WIP
chrisnojima Oct 21, 2024
350590d
WIP
chrisnojima Oct 22, 2024
e1c57f5
WIP
chrisnojima Oct 22, 2024
8c93779
WIP
chrisnojima Oct 22, 2024
a8031ee
WIP
chrisnojima Oct 22, 2024
34b8db9
WIP
chrisnojima Oct 22, 2024
48ad4f6
WIP
chrisnojima Oct 23, 2024
2dd6402
WIP
chrisnojima Oct 23, 2024
b89fe66
WIP
chrisnojima Oct 23, 2024
41ac9b6
WIP
chrisnojima Oct 24, 2024
a0ea4af
WIP
chrisnojima Oct 24, 2024
c428838
WIP
chrisnojima Oct 24, 2024
e1439c4
WIP
chrisnojima Oct 25, 2024
d38f2df
WIP
chrisnojima Oct 25, 2024
6759ac5
WIP
chrisnojima Oct 25, 2024
1f3b9bb
WIP
chrisnojima Oct 25, 2024
02beee6
WIP
chrisnojima Oct 28, 2024
623e52d
WIP
chrisnojima Oct 28, 2024
e2a3512
WIP
chrisnojima Oct 28, 2024
ffa1e4c
WIP
chrisnojima Oct 29, 2024
604b93c
WIP
chrisnojima Nov 1, 2024
b54b91a
WIP
chrisnojima Nov 1, 2024
de4904b
WIP
chrisnojima Nov 1, 2024
c31c789
WIP
chrisnojima Nov 1, 2024
96a7a33
WIP
chrisnojima Nov 1, 2024
6a5e797
WIP
chrisnojima Nov 4, 2024
5c0d445
WIP
chrisnojima Nov 5, 2024
94fe8b9
WIP
chrisnojima Nov 5, 2024
a91d355
WIP
chrisnojima Nov 12, 2024
46f6fae
WIP
chrisnojima Nov 12, 2024
118eb92
WIP
chrisnojima Nov 12, 2024
3f0716c
show jump to recent based on recent
chrisnojima Nov 14, 2024
03aa0f7
WIP
chrisnojima Nov 14, 2024
a39210d
WIP
chrisnojima Nov 14, 2024
5731c13
WIP
chrisnojima Nov 14, 2024
c943f12
WIP
chrisnojima Nov 14, 2024
28dca53
WIP
chrisnojima Nov 14, 2024
3d7cd1a
WIP
chrisnojima Nov 14, 2024
37376f4
WIP
chrisnojima Nov 15, 2024
8f6e1ed
WIP: RN 76 (#28126) squashdown
chrisnojima Apr 21, 2025
71018f8
WIP
chrisnojima Apr 21, 2025
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
  •  
  •  
  •  
9 changes: 9 additions & 0 deletions go/libkb/appstate.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"
"sync"
"time"
"runtime"

"github.com/keybase/client/go/protocol/keybase1"
"github.com/keybase/go-framed-msgpack-rpc/rpc"
Expand All @@ -23,6 +24,14 @@ type MobileAppState struct {
}

func NewMobileAppState(g *GlobalContext) *MobileAppState {
if runtime.GOOS == "android" {
// start as background
return &MobileAppState{
Contextified: NewContextified(g),
state: keybase1.MobileAppState_BACKGROUND,
mtime: nil,
}
}
return &MobileAppState{
Contextified: NewContextified(g),
state: keybase1.MobileAppState_FOREGROUND,
Expand Down
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>()
Loading