Skip to content

Commit

Permalink
feat: Expo 52
Browse files Browse the repository at this point in the history
WIP
  • Loading branch information
alexrisch committed Dec 2, 2024
1 parent 3acfa56 commit 25a588f
Show file tree
Hide file tree
Showing 19 changed files with 2,024 additions and 2,100 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
node_modules/
.expo/
dist/
expo-env.d.ts
npm-debug.*
*.jks
*.p8
Expand Down
3 changes: 3 additions & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,9 @@ android {
}
}

androidResources {
ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:!CVS:!thumbs.db:!picasa.ini:!*~'
}
}

// Apply static values from `gradle.properties` to the `android.packagingOptions`
Expand Down
10 changes: 1 addition & 9 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,12 @@
<data android:scheme="oneinch" android:host="*"/>
</intent>
</queries>
<application android:name=".MainApplication" android:allowBackup="true" android:icon="@mipmap/ic_launcher_preview" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_preview_round" android:theme="@style/BootTheme" android:usesCleartextTraffic="true">
<application android:name=".MainApplication" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" android:allowBackup="true" android:theme="@style/AppTheme" android:supportsRtl="true">
<meta-data android:name="expo.modules.updates.ENABLED" android:value="true"/>
<meta-data android:name="expo.modules.updates.EXPO_RUNTIME_VERSION" android:value="@string/expo_runtime_version"/>
<meta-data android:name="expo.modules.updates.EXPO_UPDATES_CHECK_ON_LAUNCH" android:value="ALWAYS"/>
<meta-data android:name="expo.modules.updates.EXPO_UPDATES_LAUNCH_WAIT_MS" android:value="0"/>
<meta-data android:name="expo.modules.updates.EXPO_UPDATE_URL" android:value="https://u.expo.dev/49a65fae-3895-4487-8e8a-5bd8bee3a401"/>
<!-- <meta-data android:name="expo.modules.notifications.default_notification_icon" android:resource="@drawable/ic_default_expo_notifications"/>-->
<!-- <meta-data android:name="expo.modules.notifications.default_notification_color" android:resource="@color/notification_icon_color"/>-->
<meta-data android:name="io.sentry.dsn" android:value="https://fb7c7cbf876644b68a05db08623c8369@o4504757119680512.ingest.sentry.io/4504757120729088"/>
<meta-data android:name="io.sentry.traces.user-interaction.enable" android:value="false"/>
<meta-data android:name="io.sentry.attach-screenshot" android:value="false"/>
Expand Down Expand Up @@ -95,11 +93,5 @@
<data android:host="dev.converse.xyz" android:pathPrefix="/desktopconnect" android:scheme="https"/>
</intent-filter>
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false"/>
<!-- <service android:name=".PushNotificationsService" android:enabled="true" android:exported="false">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT"/>
</intent-filter>
</service> -->
</application>
</manifest>
6 changes: 4 additions & 2 deletions android/app/src/main/java/com/converse/MainApplication.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import com.facebook.react.ReactPackage
import com.facebook.react.ReactHost
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
import com.facebook.react.defaults.DefaultReactNativeHost
import com.facebook.react.soloader.OpenSourceMergedSoMapping
import com.facebook.soloader.SoLoader

import expo.modules.ApplicationLifecycleDispatcher
Expand All @@ -21,9 +22,10 @@ class MainApplication : Application(), ReactApplication {
this,
object : DefaultReactNativeHost(this) {
override fun getPackages(): List<ReactPackage> {
val packages = PackageList(this).packages
// Packages that cannot be autolinked yet can be added manually here, for example:
// packages.add(new MyReactNativePackage());
return PackageList(this).packages
return packages
}

override fun getJSMainModuleName(): String = ".expo/.virtual-metro-entry"
Expand All @@ -40,7 +42,7 @@ class MainApplication : Application(), ReactApplication {

override fun onCreate() {
super.onCreate()
SoLoader.init(this, false)
SoLoader.init(this, OpenSourceMergedSoMapping)
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
// If you opted-in for the New Architecture, we load the native entry point for this app.
load()
Expand Down
10 changes: 5 additions & 5 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

buildscript {
ext {
buildToolsVersion = findProperty('android.buildToolsVersion') ?: '34.0.0'
minSdkVersion = Integer.parseInt(findProperty('android.minSdkVersion') ?: '23')
compileSdkVersion = 34
targetSdkVersion = 34
kotlinVersion = "1.9.23"
buildToolsVersion = findProperty('android.buildToolsVersion') ?: '35.0.0'
minSdkVersion = Integer.parseInt(findProperty('android.minSdkVersion') ?: '24')
compileSdkVersion = Integer.parseInt(findProperty('android.compileSdkVersion') ?: '35')
targetSdkVersion = Integer.parseInt(findProperty('android.targetSdkVersion') ?: '34')
kotlinVersion = "1.9.24"

ndkVersion = "26.1.10909125"
}
Expand Down
3 changes: 0 additions & 3 deletions android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ org.gradle.jvmargs=-Xmx4608m -XX:MaxMetaspaceSize=2g
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true

# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true

android.enablePngCrunchInReleaseBuilds=true

# Use this property to specify which architecture you want to build.
Expand Down
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
7 changes: 5 additions & 2 deletions android/gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

##############################################################################
#
Expand Down Expand Up @@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand All @@ -82,7 +84,8 @@ done

# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit

# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
Expand Down
2 changes: 2 additions & 0 deletions android/gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem

@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
Expand Down
19 changes: 0 additions & 19 deletions android/react-settings-plugin/build.gradle.kts

This file was deleted.

This file was deleted.

7 changes: 3 additions & 4 deletions android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ pluginManagement {
plugins { id("com.facebook.react.settings") }

extensions.configure(com.facebook.react.ReactSettingsExtension) { ex ->
if (System.getenv('EXPO_UNSTABLE_CORE_AUTOLINKING') == '1') {
println('\u001B[32mUsing expo-modules-autolinking as core autolinking source\u001B[0m')
if (System.getenv('EXPO_USE_COMMUNITY_AUTOLINKING') == '1') {
ex.autolinkLibrariesFromCommand()
} else {
def command = [
'node',
'--no-warnings',
Expand All @@ -18,8 +19,6 @@ extensions.configure(com.facebook.react.ReactSettingsExtension) { ex ->
'android'
].toList()
ex.autolinkLibrariesFromCommand(command)
} else {
ex.autolinkLibrariesFromCommand()
}
}

Expand Down
114 changes: 57 additions & 57 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,58 +1,58 @@
module.exports = {
presets: [
[
"babel-preset-expo",
// Prevents unnecessary babel transform BigInt to number for Hermes.
{ unstable_transformProfile: "hermes-stable" },
],
],
plugins: [
["@babel/plugin-proposal-decorators", { version: "legacy" }],
"@babel/plugin-proposal-export-namespace-from",
"@babel/plugin-transform-flow-strip-types", // For privy (phone country selector)
["@babel/plugin-transform-class-properties", { loose: true }], // For privy
["@babel/plugin-transform-private-methods", { loose: true }], // For privy
[
"module-resolver",
{
alias: {
"fast-text-encoding": "text-encoding",
// crypto: "react-native-quick-crypto",
"react-native-sqlite-storage": "@op-engineering/op-sqlite",
crypto: "crypto-browserify",
// This entrypoint mapping is done in @xmtp/user-preferences-bindings-wasm's "exports" in package.json
// but we don't want to enable unstable_enablePackageExports for now in metro.config.js
"@xmtp/user-preferences-bindings-wasm/web":
"@xmtp/user-preferences-bindings-wasm/dist/web/user_preferences_bindings_wasm",
"react-native-webview": "react-native-webview/src/index.ts",
// module.exports = {
// presets: [
// [
// "babel-preset-expo",
// // Prevents unnecessary babel transform BigInt to number for Hermes.
// { unstable_transformProfile: "hermes-stable" },
// ],
// ],
// plugins: [
// ["@babel/plugin-proposal-decorators", { version: "legacy" }],
// "@babel/plugin-proposal-export-namespace-from",
// "@babel/plugin-transform-flow-strip-types", // For privy (phone country selector)
// ["@babel/plugin-transform-class-properties", { loose: true }], // For privy
// ["@babel/plugin-transform-private-methods", { loose: true }], // For privy
// [
// "module-resolver",
// {
// alias: {
// "fast-text-encoding": "text-encoding",
// // crypto: "react-native-quick-crypto",
// "react-native-sqlite-storage": "@op-engineering/op-sqlite",
// crypto: "crypto-browserify",
// // This entrypoint mapping is done in @xmtp/user-preferences-bindings-wasm's "exports" in package.json
// // but we don't want to enable unstable_enablePackageExports for now in metro.config.js
// "@xmtp/user-preferences-bindings-wasm/web":
// "@xmtp/user-preferences-bindings-wasm/dist/web/user_preferences_bindings_wasm",
// "react-native-webview": "react-native-webview/src/index.ts",

// Folder aliases
'@': './',
"@components": "./components",
"@config": "./config",
"@containers": "./containers",
"@data": "./data",
"@hooks": "./hooks",
"@i18n": "./i18n",
"@queries": "./queries",
"@screens": "./screens",
"@styles": "./styles",
"@utils": "./utils",
"@theme": "./theme",
"@assets": "./assets",
"@design-system": "./design-system",
"@navigation": "./navigation",
"@features": "./features",
"@shared": "./features/shared",
"@search": "./features/search",
},
},
],
"react-native-reanimated/plugin",
],
env: {
production: {
plugins: ["transform-remove-console", "react-native-paper/babel"],
},
},
};
// // Folder aliases
// '@': './',
// "@components": "./components",
// "@config": "./config",
// "@containers": "./containers",
// "@data": "./data",
// "@hooks": "./hooks",
// "@i18n": "./i18n",
// "@queries": "./queries",
// "@screens": "./screens",
// "@styles": "./styles",
// "@utils": "./utils",
// "@theme": "./theme",
// "@assets": "./assets",
// "@design-system": "./design-system",
// "@navigation": "./navigation",
// "@features": "./features",
// "@shared": "./features/shared",
// "@search": "./features/search",
// },
// },
// ],
// "react-native-reanimated/plugin",
// ],
// env: {
// production: {
// plugins: ["transform-remove-console", "react-native-paper/babel"],
// },
// },
// };
8 changes: 4 additions & 4 deletions ios/Converse.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@
"FB_SONARKIT_ENABLED=1",
);
INFOPLIST_FILE = Converse/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -656,7 +656,7 @@
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = Q6W2FLK8DM;
INFOPLIST_FILE = Converse/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -701,7 +701,7 @@
INFOPLIST_FILE = ConverseNotificationExtension/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = ConverseNotificationExtension;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -746,7 +746,7 @@
INFOPLIST_FILE = ConverseNotificationExtension/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = ConverseNotificationExtension;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down
2 changes: 2 additions & 0 deletions ios/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ GEM
escape (0.0.4)
ethon (0.16.0)
ffi (>= 1.15.0)
ffi (1.17.0)
ffi (1.17.0-arm64-darwin)
fourflusher (2.3.1)
fuzzy_match (2.0.4)
Expand Down Expand Up @@ -97,6 +98,7 @@ PLATFORMS
arm64-darwin-22
arm64-darwin-23
arm64-darwin-24
ruby

DEPENDENCIES
activesupport (>= 6.1.7.3, < 7.1.0)
Expand Down
Loading

0 comments on commit 25a588f

Please sign in to comment.