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

chore: upgrade to RN v0.75 #37

Merged
merged 6 commits into from
Aug 5, 2024
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/settings-plugin/src/main/kotlin/com/facebook/react/ReactSettingsExtension.kt b/settings-plugin/src/main/kotlin/com/facebook/react/ReactSettingsExtension.kt
index 6d4f60e6fb48cae86610b6f72e8f915738634669..43c6f0d1ef32ed79805cbd6210ed2c927a69a146 100644
--- a/settings-plugin/src/main/kotlin/com/facebook/react/ReactSettingsExtension.kt
+++ b/settings-plugin/src/main/kotlin/com/facebook/react/ReactSettingsExtension.kt
@@ -39,7 +39,7 @@ abstract class ReactSettingsExtension @Inject constructor(val settings: Settings
*/
@JvmOverloads
public fun autolinkLibrariesFromCommand(
- command: List<String> = listOf("npx", "@react-native-community/cli", "config"),
+ command: List<String> = listOf("npx", "-s", "@react-native-community/cli", "config"),
workingDirectory: File? = settings.layout.rootDirectory.dir("../").asFile,
lockFiles: FileCollection =
settings.layout.rootDirectory
18 changes: 0 additions & 18 deletions .yarn/patches/react-native-reanimated-npm-3.12.0-0eaba2f107.patch

This file was deleted.

21 changes: 11 additions & 10 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ apply plugin: "com.facebook.react"
*/
react {
/* Folders */
// The root of your project, i.e. where "package.json" lives. Default is '..'
// root = file("../")
// The folder where the react-native NPM package is. Default is ../node_modules/react-native
// reactNativeDir = file("../node-modules/react-native")
// The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen
// codegenDir = file("../node_modules/@react-native/codegen")
// The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
// cliFile = file("../node_modules/react-native/cli.js")
// The root of your project, i.e. where "package.json" lives. Default is '../..'
// root = file("../../")
// The folder where the react-native NPM package is. Default is ../../node_modules/react-native
// reactNativeDir = file("../../node_modules/react-native")
// The folder where the react-native Codegen package is. Default is ../../node_modules/@react-native/codegen
// codegenDir = file("../../node_modules/@react-native/codegen")
// The cli.js file which is the React Native CLI entrypoint. Default is ../../node_modules/react-native/cli.js
// cliFile = file("../../node_modules/react-native/cli.js")
/* Variants */
// The list of variants to that are debuggable. For those we're going to
// skip the bundling of the JS bundle and the assets. By default is just 'debug'.
Expand Down Expand Up @@ -46,6 +46,9 @@ react {
//
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
// hermesFlags = ["-O", "-output-source-map"]

/* Autolinking */
autolinkLibrariesWithApp()
}

project.ext.vectoricons = [
Expand Down Expand Up @@ -147,5 +150,3 @@ dependencies {
exclude group: 'com.google.android.gms'
}
}

apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
3 changes: 2 additions & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:allowBackup="false"
android:theme="@style/AppTheme">
android:theme="@style/AppTheme"
android:supportsRtl="true">
<activity
android:name=".MainActivity"
android:label="@string/app_name"
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
compileSdkVersion = 34
targetSdkVersion = 34
ndkVersion = "26.1.10909125"
kotlinVersion = "1.9.22"
kotlinVersion = "1.9.24"
}
repositories {
google()
Expand Down
2 changes: 0 additions & 2 deletions android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true

# Use this property to specify which architecture you want to build.
# You can also override it from the CLI using
Expand Down
Binary file modified android/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
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.6-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
3 changes: 2 additions & 1 deletion android/gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,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 Down Expand Up @@ -198,6 +198,7 @@ if "$cygwin" || "$msys" ; then
done
fi


# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

Expand Down
4 changes: 3 additions & 1 deletion android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
pluginManagement { includeBuild("../node_modules/@react-native/gradle-plugin") }
plugins { id("com.facebook.react.settings") }
extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() }
rootProject.name = 'Revvy'
includeBuild('../node_modules/@react-native/gradle-plugin')
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
include ':app'
2 changes: 2 additions & 0 deletions config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,7 @@ module.exports = {
// See: https://github.com/necolas/react-native-web/issues/349
__DEV__: JSON.stringify(true),
}),
new webpack.EnvironmentPlugin({ JEST_WORKER_ID: null }),
new webpack.DefinePlugin({ process: { env: {} } }),
],
};
38 changes: 20 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"web-release": "webpack --config config/webpack.config.js --mode=production"
},
"dependencies": {
"@gorhom/bottom-sheet": "^4.6.3",
"@gorhom/bottom-sheet": "^4.6.4",
"@notifee/react-native": "^7.8.2",
"@react-native-async-storage/async-storage": "^1.24.0",
"@react-native-clipboard/clipboard": "^1.14.1",
Expand All @@ -25,48 +25,47 @@
"@xmldom/xmldom": "^0.8.10",
"babel-plugin-module-resolver": "^5.0.2",
"date-fns": "^3.6.0",
"i18next": "^23.12.1",
"i18next": "^23.12.2",
"intl-pluralrules": "^2.0.1",
"markdown-it-regexp": "^0.4.0",
"mobx": "^6.13.0",
"mobx": "^6.13.1",
"mobx-react-lite": "^4.0.7",
"process": "^0.11.10",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-error-boundary": "^4.0.13",
"react-i18next": "^14.1.3",
"react-native": "^0.74.2",
"react-i18next": "^15.0.0",
"react-native": "^0.75.0-rc.6",
"react-native-device-info": "^11.1.0",
"react-native-document-picker": "^9.3.0",
"react-native-fast-image": "^8.6.3",
"react-native-gesture-handler": "^2.17.1",
"react-native-gesture-handler": "^2.18.1",
"react-native-get-random-values": "^1.11.0",
"react-native-image-zoom-viewer": "^3.0.1",
"react-native-markdown-display": "^7.0.2",
"react-native-reanimated": "patch:react-native-reanimated@npm%3A3.12.0#~/.yarn/patches/react-native-reanimated-npm-3.12.0-0eaba2f107.patch",
"react-native-reanimated": "^3.15.0-nightly-20240804-7df5fd57d",
"react-native-svg": "^15.4.0",
"react-native-vector-icons": "^10.1.0",
"react-native-web": "^0.19.12",
"reanimated-color-picker": "^3.0.4",
"revolt.js": "npm:@rexovolt/revolt.js@^6.3.0"
},
"devDependencies": {
"@babel/core": "^7.24.9",
"@babel/core": "^7.25.2",
"@babel/plugin-transform-export-namespace-from": "^7.24.7",
"@babel/preset-env": "^7.24.8",
"@babel/runtime": "^7.24.8",
"@react-native/babel-preset": "^0.74.85",
"@react-native/eslint-config": "^0.74.85",
"@react-native/metro-config": "^0.74.85",
"@react-native/typescript-config": "^0.74.85",
"@babel/preset-env": "^7.25.3",
"@babel/runtime": "^7.25.0",
"@react-native/babel-preset": "^0.75.0-rc.6",
"@react-native/eslint-config": "^0.75.0-rc.6",
"@react-native/metro-config": "^0.75.0-rc.6",
"@react-native/typescript-config": "^0.75.0-rc.6",
"@rnx-kit/metro-config": "^1.3.15",
"@rnx-kit/metro-plugin-cyclic-dependencies-detector": "^1.1.2",
"@rnx-kit/metro-plugin-duplicates-checker": "^2.1.3",
"@rnx-kit/metro-serializer": "^1.0.14",
"@svgr/webpack": "^8.1.0",
"@types/assert": "^1.5.10",
"@types/babel__core": "^7.20.5",
"@types/eslint": "^8.56.10",
"@types/eslint": "^8.56.11",
"@types/events": "^3.0.3",
"@types/metro-config": "^0.76.3",
"@types/react": "^18.3.3",
Expand All @@ -85,7 +84,7 @@
"react-devtools": "^5.3.1",
"react-native-svg-transformer": "^1.5.0",
"react-test-renderer": "^18.3.1",
"typescript": "^5.5.3",
"typescript": "^5.5.4",
"url-loader": "^4.1.1",
"webpack": "^5.93.0",
"webpack-cli": "^5.1.4",
Expand All @@ -94,5 +93,8 @@
"engines": {
"node": ">=18"
},
"packageManager": "[email protected]"
"packageManager": "[email protected]",
"resolutions": {
"@react-native/gradle-plugin@npm:0.75.0-rc.6": "patch:@react-native/gradle-plugin@npm%3A0.75.0-rc.6#~/.yarn/patches/@react-native-gradle-plugin-npm-0.75.0-rc.6-3d2b8a2db4.patch"
}
}
3 changes: 0 additions & 3 deletions src/components/sheets/ProfileSheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {observer} from 'mobx-react-lite';

import BottomSheetCore from '@gorhom/bottom-sheet';
import {useBackHandler} from '@react-native-community/hooks';
// import FastImage from 'react-native-fast-image';
import MaterialIcon from 'react-native-vector-icons/MaterialIcons';
import MaterialCommunityIcon from 'react-native-vector-icons/MaterialCommunityIcons';

Expand All @@ -30,8 +29,6 @@ import {BottomSheet} from '../common/BottomSheet';
import {MarkdownView} from '../common/MarkdownView';
import {UserList} from '../navigation/UserList';

// const Image = FastImage;

export const ProfileSheet = observer(() => {
const [user, setUser] = useState(null as User | null);
const [server, setServer] = useState(null as Server | null);
Expand Down
8 changes: 6 additions & 2 deletions src/crossplat/Image.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import FastImage from 'react-native-fast-image';
import {Image as CoreImage} from 'react-native';

export const Image = FastImage;
export const Image = CoreImage;

//import FastImage from 'react-native-fast-image';

//export const Image = FastImage;
Loading