Skip to content

Commit a802a1f

Browse files
chore: updated wagmi sample RN to 0.77 (#193)
1 parent 0479d70 commit a802a1f

24 files changed

+4146
-3053
lines changed

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ source "https://rubygems.org"
22

33
gem "fastlane"
44
gem "cocoapods", '1.15.2'
5+

dapps/W3MWagmi/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ local.properties
3232
*.hprof
3333
.cxx/
3434
*.keystore
35+
.kotlin/
3536

3637
# node.js
3738
#

dapps/W3MWagmi/Gemfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ source 'https://rubygems.org'
33
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
44
ruby ">= 2.6.10"
55

6-
# Cocoapods 1.15 introduced a bug which break the build. We will remove the upper
7-
# bound in the template on Cocoapods with next React Native release.
8-
gem 'cocoapods', '>= 1.13', '< 1.15'
9-
gem 'activesupport', '>= 6.1.7.5', '< 7.1.0'
6+
# Exclude problematic versions of cocoapods and activesupport that causes build failures.
7+
gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
8+
gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
9+
gem 'xcodeproj', '< 1.26.0'
10+
gem 'concurrent-ruby', '< 1.3.4'

dapps/W3MWagmi/android/app/build.gradle

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ apply from: project(':react-native-config').projectDir.getPath() + "/dotenv.grad
2525
*/
2626
react {
2727
/* Folders */
28-
// The root of your project, i.e. where "package.json" lives. Default is '..'
29-
// root = file("../")
30-
// The folder where the react-native NPM package is. Default is ../node_modules/react-native
31-
// reactNativeDir = file("../node_modules/react-native")
32-
// The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen
33-
// codegenDir = file("../node_modules/@react-native/codegen")
34-
// The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
35-
// cliFile = file("../node_modules/react-native/cli.js")
28+
// The root of your project, i.e. where "package.json" lives. Default is '../..'
29+
// root = file("../../")
30+
// The folder where the react-native NPM package is. Default is ../../node_modules/react-native
31+
// reactNativeDir = file("../../node_modules/react-native")
32+
// The folder where the react-native Codegen package is. Default is ../../node_modules/@react-native/codegen
33+
// codegenDir = file("../../node_modules/@react-native/codegen")
34+
// The cli.js file which is the React Native CLI entrypoint. Default is ../../node_modules/react-native/cli.js
35+
// cliFile = file("../../node_modules/react-native/cli.js")
3636

3737
/* Variants */
3838
// The list of variants to that are debuggable. For those we're going to
@@ -66,6 +66,10 @@ react {
6666
//
6767
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
6868
// hermesFlags = ["-O", "-output-source-map"]
69+
70+
/* Autolinking */
71+
autolinkLibrariesWithApp()
72+
6973
//
7074
// Added by install-expo-modules
7175
entryFile = file(["node", "-e", "require('expo/scripts/resolveAppEntry')", rootDir.getAbsoluteFile().getParentFile().getAbsolutePath(), "android", "absolute"].execute(null, rootDir).text.trim())
@@ -82,14 +86,14 @@ def enableProguardInReleaseBuilds = false
8286
* The preferred build flavor of JavaScriptCore (JSC)
8387
*
8488
* For example, to use the international variant, you can use:
85-
* `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
89+
* `def jscFlavor = io.github.react-native-community:jsc-android-intl:2026004.+`
8690
*
8791
* The international variant includes ICU i18n library and necessary data
8892
* allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
8993
* give correct results when using with locales other than en-US. Note that
9094
* this variant is about 6MiB larger per architecture than default.
9195
*/
92-
def jscFlavor = 'org.webkit:android-jsc:+'
96+
def jscFlavor = 'io.github.react-native-community:jsc-android:2026004.+'
9397

9498
android {
9599
ndkVersion rootProject.ext.ndkVersion
@@ -102,7 +106,7 @@ android {
102106
applicationId "com.walletconnect.web3modal.rnsample"
103107
minSdkVersion rootProject.ext.minSdkVersion
104108
targetSdkVersion rootProject.ext.targetSdkVersion
105-
versionCode 106
109+
versionCode 115
106110
versionName "1.1"
107111
resValue "string", "build_config_package", "com.w3mwagmi"
108112
}
@@ -177,5 +181,3 @@ dependencies {
177181
implementation jscFlavor
178182
}
179183
}
180-
181-
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)

dapps/W3MWagmi/android/app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@
5454
android:icon="@mipmap/ic_launcher"
5555
android:roundIcon="@mipmap/ic_launcher_round"
5656
android:allowBackup="false"
57-
android:theme="@style/AppTheme">
57+
android:theme="@style/AppTheme"
58+
android:supportsRtl="true">
5859
<activity
5960
android:name=".MainActivity"
6061
android:label="@string/app_name"

dapps/W3MWagmi/android/app/src/main/java/com/w3mwagmi/MainApplication.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import com.facebook.react.ReactPackage
1212
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
1313
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
1414
import com.facebook.react.defaults.DefaultReactNativeHost
15+
import com.facebook.react.soloader.OpenSourceMergedSoMapping
1516
import com.facebook.soloader.SoLoader
1617

1718
class MainApplication : Application(), ReactApplication {
@@ -37,7 +38,7 @@ class MainApplication : Application(), ReactApplication {
3738

3839
override fun onCreate() {
3940
super.onCreate()
40-
SoLoader.init(this, false)
41+
SoLoader.init(this, OpenSourceMergedSoMapping)
4142
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
4243
// If you opted-in for the New Architecture, we load the native entry point for this app.
4344
load()

dapps/W3MWagmi/android/build.gradle

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
buildscript {
22
ext {
3-
buildToolsVersion = "34.0.0"
4-
minSdkVersion = 23
5-
compileSdkVersion = 34
6-
targetSdkVersion = 34
7-
8-
ndkVersion = "26.1.10909125"
9-
kotlinVersion = "1.9.22"
3+
buildToolsVersion = "35.0.0"
4+
minSdkVersion = 24
5+
compileSdkVersion = 35
6+
targetSdkVersion = 35
7+
ndkVersion = "27.1.12297006"
8+
kotlinVersion = "2.0.21"
109
}
1110
repositories {
1211
google()
@@ -16,7 +15,7 @@ buildscript {
1615
classpath("com.android.tools.build:gradle")
1716
classpath("com.facebook.react:react-native-gradle-plugin")
1817
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")
19-
classpath("io.sentry:sentry-android-gradle-plugin:4.14.1")
18+
classpath("io.sentry:sentry-android-gradle-plugin:5.3.0")
2019
}
2120
}
2221

dapps/W3MWagmi/android/gradle.properties

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m
2121
# Android operating system, and which are packaged with your app's APK
2222
# https://developer.android.com/topic/libraries/support-library/androidx-rn
2323
android.useAndroidX=true
24-
# Automatically convert third-party libraries to use AndroidX
25-
android.enableJetifier=true
2624

2725
# Use this property to specify which architecture you want to build.
2826
# You can also override it from the CLI using
@@ -34,7 +32,7 @@ reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
3432
# your application. You should enable this flag either if you want
3533
# to write custom TurboModules/Fabric components OR use libraries that
3634
# are providing them.
37-
newArchEnabled=false
35+
newArchEnabled=true
3836

3937
# Use this property to enable or disable the Hermes JS engine.
4038
# If set to false, you will be using JSC instead.

dapps/W3MWagmi/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-all.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

dapps/W3MWagmi/android/gradlew

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ done
8484
# shellcheck disable=SC2034
8585
APP_BASE_NAME=${0##*/}
8686
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
87-
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
87+
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
8888

8989
# Use the maximum available, or set MAX_FD != -1 to use that value.
9090
MAX_FD=maximum

dapps/W3MWagmi/android/gradlew.bat

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
@rem See the License for the specific language governing permissions and
1414
@rem limitations under the License.
1515
@rem
16+
@rem SPDX-License-Identifier: Apache-2.0
17+
@rem
1618

1719
@if "%DEBUG%"=="" @echo off
1820
@rem ##########################################################################

dapps/W3MWagmi/android/settings.gradle

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
pluginManagement { includeBuild("../node_modules/@react-native/gradle-plugin") }
2+
plugins { id("com.facebook.react.settings") }
3+
extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() }
14
rootProject.name = 'W3MWagmi'
2-
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
35
include ':app'
46
includeBuild('../node_modules/@react-native/gradle-plugin')
57

dapps/W3MWagmi/app.json

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
11
{
2-
"name": "W3MWagmi"
3-
}
2+
"name": "W3MWagmi",
3+
"slug": "w3m-wagmi-react-native",
4+
"plugins": [
5+
[
6+
"@sentry/react-native/expo",
7+
{
8+
"url": "https://sentry.io/",
9+
"note": "Use SENTRY_AUTH_TOKEN env to authenticate with Sentry.",
10+
"project": "w3m-wagmi-react-native",
11+
"organization": "walletconnect"
12+
}
13+
]
14+
]
15+
}

dapps/W3MWagmi/ios/AppDelegate.swift

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
//
2+
// AppDelegate.swift
3+
// W3MWagmi
4+
//
5+
//
6+
7+
8+
import UIKit
9+
import React
10+
import React_RCTAppDelegate
11+
import ReactAppDependencyProvider
12+
13+
@main
14+
class AppDelegate: RCTAppDelegate {
15+
override func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
16+
self.moduleName = "W3MWagmi"
17+
self.dependencyProvider = RCTAppDependencyProvider()
18+
19+
// You can add your custom initial props in the dictionary below.
20+
// They will be passed down to the ViewController used by React Native.
21+
self.initialProps = [:]
22+
23+
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
24+
}
25+
26+
override func sourceURL(for bridge: RCTBridge) -> URL? {
27+
self.bundleURL()
28+
}
29+
30+
override func bundleURL() -> URL? {
31+
#if DEBUG
32+
RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index")
33+
#else
34+
Bundle.main.url(forResource: "main", withExtension: "jsbundle")
35+
#endif
36+
}
37+
}

dapps/W3MWagmi/ios/Podfile

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,6 @@ abstract_target 'App' do
4545
inherit! :complete
4646
end
4747

48-
target 'W3MWagmiTests' do
49-
inherit! :complete
50-
# Pods for testing
51-
end
52-
5348
post_install do |installer|
5449
# https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
5550
react_native_post_install(

0 commit comments

Comments
 (0)