Skip to content

Commit 4ebe3d0

Browse files
authored
Feature/rn 0.83 upgrade (#400)
* initial draft Configuration passes * support for 16KB Page size for Android 15+ * upgrade * corrections up until BLE * resolved more errors after upgrade * apple tested
1 parent 4504921 commit 4ebe3d0

File tree

69 files changed

+14934
-11859
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+14934
-11859
lines changed

.claude/settings.local.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"WebSearch",
5+
"Bash(grep:*)",
6+
"Bash(git checkout:*)",
7+
"Bash(xargs:*)",
8+
"Bash(npx nx run:*)",
9+
"Bash(npm view:*)",
10+
"Bash(npx tsc:*)",
11+
"Bash(npx babel:*)"
12+
]
13+
}
14+
}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,3 +315,6 @@ Pods
315315

316316
.history
317317
/.yarn
318+
/apps/box/android/app/.cxx
319+
/apps/box/android/.kotlin
320+
apps/box/ios/.xcode.env.local

apps/box/.babelrc

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
11
{
22
"presets": [
3-
[
4-
"module:metro-react-native-babel-preset",
5-
{ "useTransformReactJSXExperimental": true }
6-
]
3+
["module:@react-native/babel-preset", { "useTransformReactJSXExperimental": true }]
74
],
85
"plugins": [
6+
"@babel/plugin-transform-export-namespace-from",
7+
"@babel/plugin-transform-class-static-block",
98
[
109
"@babel/plugin-transform-react-jsx",
1110
{
1211
"runtime": "automatic"
1312
}
1413
],
15-
"@babel/plugin-transform-class-static-block",
16-
"react-native-reanimated/plugin",
17-
["@babel/plugin-proposal-export-namespace-from"]
14+
"react-native-reanimated/plugin"
1815
]
1916
}

apps/box/android/app/build.gradle

Lines changed: 19 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
apply plugin: "com.android.application"
2+
apply plugin: "org.jetbrains.kotlin.android"
23
apply plugin: "com.facebook.react"
34
apply plugin: 'com.google.gms.google-services'
45
apply plugin: 'com.google.firebase.crashlytics'
@@ -51,6 +52,8 @@ react {
5152
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
5253
// hermesFlags = ["-O", "-output-source-map"]
5354
entryFile = file("../../src/main.tsx")
55+
56+
autolinkLibrariesWithApp()
5457
}
5558

5659
/**
@@ -62,30 +65,30 @@ def enableProguardInReleaseBuilds = false
6265
* The preferred build flavor of JavaScriptCore (JSC)
6366
*
6467
* For example, to use the international variant, you can use:
65-
* `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
68+
* `def jscFlavor = 'io.github.nicutor:jsc-android-intl:+'`
6669
*
6770
* The international variant includes ICU i18n library and necessary data
6871
* allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
6972
* give correct results when using with locales other than en-US. Note that
7073
* this variant is about 6MiB larger per architecture than default.
7174
*/
72-
def jscFlavor = 'org.webkit:android-jsc:+'
75+
def jscFlavor = 'io.github.nicutor:jsc-android:2026004.+'
7376

7477

7578
android {
7679
ndkVersion rootProject.ext.ndkVersion
7780

78-
compileSdkVersion rootProject.ext.compileSdkVersion
81+
compileSdk rootProject.ext.compileSdkVersion
7982

8083
namespace "land.fx.blox"
84+
8185
defaultConfig {
8286
applicationId "land.fx.blox"
8387
minSdkVersion rootProject.ext.minSdkVersion
8488
targetSdkVersion rootProject.ext.targetSdkVersion
85-
versionCode 248
86-
versionName "2.2.3"
87-
// buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
88-
89+
versionCode 249
90+
versionName "2.2.4"
91+
8992
testBuildType System.getProperty('testBuildType', 'debug')
9093
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
9194
}
@@ -98,12 +101,10 @@ android {
98101
keyPassword 'android'
99102
}
100103
}
101-
packagingOptions {
102-
pickFirst 'lib/arm64-v8a/liblog.so'
103-
pickFirst 'lib/armeabi-v7a/liblog.so'
104-
pickFirst 'lib/x86/liblog.so'
105-
pickFirst 'lib/x86_64/liblog.so'
106-
// Add other libraries here if necessary
104+
packaging {
105+
jniLibs {
106+
pickFirsts += ['lib/arm64-v8a/liblog.so', 'lib/armeabi-v7a/liblog.so', 'lib/x86/liblog.so', 'lib/x86_64/liblog.so']
107+
}
107108
}
108109
buildTypes {
109110
debug {
@@ -115,9 +116,9 @@ android {
115116
signingConfig signingConfigs.debug
116117
minifyEnabled enableProguardInReleaseBuilds
117118
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
118-
119+
119120
proguardFile "${rootProject.projectDir}/../node_modules/detox/android/detox/proguard-rules-app.pro"
120-
121+
121122
/* Add the firebaseCrashlytics extension (by default,
122123
* it's disabled to improve build speeds) and set
123124
* nativeSymbolUploadEnabled to true along with a pointer to native libs. */
@@ -138,27 +139,14 @@ dependencies {
138139
implementation fileTree(dir: "libs", include: ["*.jar"])
139140

140141
androidTestImplementation('com.wix:detox:+')
141-
implementation 'androidx.appcompat:appcompat:1.1.0'
142-
143-
// if (isNewArchitectureEnabled()) {
144-
// implementation project(":ReactAndroid")
145-
// } else {
146-
implementation 'com.facebook.react:react-native:+'
147-
// }
148-
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
149-
150-
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}")
151-
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
152-
exclude group:'com.squareup.okhttp3', module:'okhttp'
153-
}
142+
implementation 'androidx.appcompat:appcompat:1.6.1'
143+
144+
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
154145

155-
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}")
156146
if (hermesEnabled.toBoolean()) {
157147
implementation("com.facebook.react:hermes-android")
158148
} else {
159149
implementation jscFlavor
160150
}
161151
androidTestImplementation('com.wix:detox:+')
162152
}
163-
164-
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)

apps/box/android/app/src/debug/AndroidManifest.xml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@
77
<application
88
android:usesCleartextTraffic="true"
99
tools:targetApi="28"
10-
tools:ignore="GoogleAppIndexingWarning"
11-
tools:replace="android:allowBackup"
12-
android:allowBackup="false"
13-
android:networkSecurityConfig="@xml/network_security_config">
14-
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false" />
10+
tools:ignore="GoogleAppIndexingWarning">
1511
</application>
1612
</manifest>

apps/box/android/app/src/debug/java/com/box/ReactNativeFlipper.java

Lines changed: 0 additions & 77 deletions
This file was deleted.

apps/box/android/app/src/main/AndroidManifest.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@
1010
android:usesPermissionFlags="neverForLocation" />
1111
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT"/>
1212
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
13-
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
13+
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
14+
<!-- Network permissions for mDNS/Zeroconf discovery -->
15+
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
16+
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
17+
<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE"/>
1418

1519
<!-- Add these WiFi-specific permissions -->
1620
<uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT"

apps/box/android/app/src/main/java/land/fx/blox/MainActivity.java

Lines changed: 0 additions & 46 deletions
This file was deleted.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
package land.fx.blox
2+
3+
import android.content.Intent
4+
import android.net.Uri
5+
import android.os.Bundle
6+
import com.facebook.react.ReactActivity
7+
import com.facebook.react.ReactActivityDelegate
8+
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
9+
import com.facebook.react.defaults.DefaultReactActivityDelegate
10+
import expo.modules.ReactActivityDelegateWrapper
11+
12+
class MainActivity : ReactActivity() {
13+
14+
/**
15+
* Returns the name of the main component registered from JavaScript. This is used to schedule
16+
* rendering of the component.
17+
*/
18+
override fun getMainComponentName(): String = "Box"
19+
20+
/**
21+
* Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate]
22+
* which allows you to enable New Architecture with a single boolean flags [fabricEnabled]
23+
*/
24+
override fun createReactActivityDelegate(): ReactActivityDelegate =
25+
ReactActivityDelegateWrapper(
26+
this,
27+
BuildConfig.IS_NEW_ARCHITECTURE_ENABLED,
28+
DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled)
29+
)
30+
31+
override fun onCreate(savedInstanceState: Bundle?) {
32+
super.onCreate(savedInstanceState)
33+
val intent: Intent = intent
34+
val action: String? = intent.action
35+
val data: Uri? = intent.data
36+
// Handle the data (URL) here if necessary
37+
}
38+
}

0 commit comments

Comments
 (0)