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

update to react native 76 #42

Merged
merged 12 commits into from
Nov 6, 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
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"plugins": ["@typescript-eslint", "jest"],
"extends": [
"@react-native",
"airbnb-typescript",
"airbnb/hooks",
"plugin:@typescript-eslint/recommended",
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: '16.18.0'
node-version: '20.11.0'
- name: Install modules
run: yarn
- name: Run lint
Expand Down
17 changes: 14 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ DerivedData
*.hmap
*.ipa
*.xcuserstate
ios/.xcode.env.local
**/.xcode.env.local

# Android/IntelliJ
#
Expand Down Expand Up @@ -68,7 +68,7 @@ buck-out/
*.jsbundle

# CocoaPods
/ios/Pods/
**/Pods/
/vendor/bundle/

#
Expand All @@ -77,4 +77,15 @@ buck-out/
.expo

# Temporary files created by Metro to check the health of the file watcher
.metro-health-check*
.metro-health-check*

# testing
/coverage

# Yarn
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
1 change: 0 additions & 1 deletion .node-version

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
diff --git a/node_modules/@helium/wallet-link/build/walletLink.js b/node_modules/@helium/wallet-link/build/walletLink.js
index 5378554..de9d701 100644
--- a/node_modules/@helium/wallet-link/build/walletLink.js
+++ b/node_modules/@helium/wallet-link/build/walletLink.js
diff --git a/build/walletLink.js b/build/walletLink.js
index 6cdd44e38a9be056c16b7c2fa11f89853bff0bcc..2f18781bf97c7a88d7b55bdb7379509f084e67fe 100644
--- a/build/walletLink.js
+++ b/build/walletLink.js
@@ -17,7 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
exports.createUpdateHotspotUrl = exports.createSignHotspotCallbackUrl = exports.createLinkWalletCallbackUrl = exports.createWalletLinkUrl = exports.parseWalletLinkToken = exports.verifyWalletLinkToken = exports.makeAppLinkAuthToken = void 0;
/* eslint-disable object-curly-newline */
Expand Down
48 changes: 48 additions & 0 deletions .yarn/patches/react-native-mail-npm-6.1.1-89ecd5901e.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
diff --git a/android/src/main/java/com/chirag/RNMail/RNMailModule.java b/android/src/main/java/com/chirag/RNMail/RNMailModule.java
index e93973e510890e9f866187dbc29d82f18d8fcb26..6f8836581fde3cc85010d09e57a9cee6a37347b4 100644
--- a/android/src/main/java/com/chirag/RNMail/RNMailModule.java
+++ b/android/src/main/java/com/chirag/RNMail/RNMailModule.java
@@ -127,33 +127,19 @@ public class RNMailModule extends ReactContextBaseJavaModule {
PackageManager manager = reactContext.getPackageManager();
List<ResolveInfo> list = manager.queryIntentActivities(i, 0);

- if (list == null || list.size() == 0) {
- callback.invoke("not_available");
- return;
- }
-
- if (list.size() == 1) {
- i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
- try {
- reactContext.startActivity(i);
- } catch (Exception ex) {
- callback.invoke("error");
- }
- } else {
- String chooserTitle = "Send Mail";
+ String chooserTitle = "Send Mail";

- if (options.hasKey("customChooserTitle") && !options.isNull("customChooserTitle")) {
- chooserTitle = options.getString("customChooserTitle");
- }
+ if (options.hasKey("customChooserTitle") && !options.isNull("customChooserTitle")) {
+ chooserTitle = options.getString("customChooserTitle");
+ }

- Intent chooser = Intent.createChooser(i, chooserTitle);
- chooser.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ Intent chooser = Intent.createChooser(i, chooserTitle);
+ chooser.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);

- try {
- reactContext.startActivity(chooser);
- } catch (Exception ex) {
- callback.invoke("error");
- }
+ try {
+ reactContext.startActivity(chooser);
+ } catch (Exception ex) {
+ callback.invoke("error");
}
}
}
20 changes: 20 additions & 0 deletions .yarn/patches/react-native-sodium-npm-0.4.0-0a9253b74e.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
diff --git a/android/build.gradle b/android/build.gradle
index 1f5e62fe7005912cff1068aff27842b69e592d99..8085d1fd1af867f59fef313d5255c66283e4a318 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -11,11 +11,11 @@ buildscript {
apply plugin: 'com.android.library'

android {
- compileSdkVersion 28
- buildToolsVersion "28.0.3"
+ compileSdkVersion 35
+ buildToolsVersion "35.0.0"
defaultConfig {
- minSdkVersion 16
- compileSdkVersion 28
+ minSdkVersion 24
+ compileSdkVersion 35
targetSdkVersion 28
versionCode 1
versionName "0.1"
934 changes: 934 additions & 0 deletions .yarn/releases/yarn-4.5.1.cjs

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.5.1.cjs
10 changes: 5 additions & 5 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
source 'https://rubygems.org'

# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
ruby '>= 2.6.10'
ruby ">= 2.6.10"

# Cocoapods 1.15 introduced a bug which break the build. We will remove the upper
# bound in the template on Cocoapods with next React Native release.
gem 'cocoapods', '>= 1.13', '< 1.15'
gem 'activesupport', '>= 6.1.7.3', '< 7.1.0'
# Exclude problematic versions of cocoapods and activesupport that causes build failures.
gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
gem 'xcodeproj', '< 1.26.0'
82 changes: 19 additions & 63 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,26 @@ buildscript {
}

apply plugin: "com.android.application"
apply plugin: "org.jetbrains.kotlin.android"
apply plugin: "com.facebook.react"
apply from: project(':react-native-config').projectDir.getPath() + "/dotenv.gradle"

import groovy.json.JsonSlurper
import com.android.build.OutputFile

/**
* This is the configuration block to customize your React Native Android app.
* By default you don't need to apply any configuration, just uncomment the lines you need.
*/
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
Expand Down Expand Up @@ -60,18 +60,10 @@ react {
//
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
// hermesFlags = ["-O", "-output-source-map"]
}


/**
* Set this to true to create two separate APKs instead of one:
* - An APK that only works on ARM devices
* - An APK that only works on x86 devices
* The advantage is the size of the APK is reduced by about 4MB.
* Upload all the APKs to the Play Store and people will download
* the correct one based on the CPU architecture of their device.
*/
def enableSeparateBuildPerCPUArchitecture = false
/* Autolinking */
autolinkLibrariesWithApp()
}

/**
* Set this to true to Run Proguard on Release builds to minify the Java bytecode.
Expand Down Expand Up @@ -126,13 +118,9 @@ def reactNativeArchitectures() {

android {
ndkVersion rootProject.ext.ndkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
compileSdkVersion rootProject.ext.compileSdkVersion

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

namespace "com.helium.wallet"
defaultConfig {
applicationId "com.helium.wallet"
Expand All @@ -141,14 +129,6 @@ android {
versionCode getVersionCode()
versionName getNpmVersion()
}
splits {
abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false // If true, also generate a universal APK
include (*reactNativeArchitectures())
}
}
buildTypes {
debug {
signingConfig signingConfigs.debug
Expand All @@ -158,22 +138,14 @@ android {
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}

// applicationVariants are e.g. debug, release
applicationVariants.all { variant ->
variant.outputs.each { output ->
// For each separate APK per architecture, set a unique version code as described here:
// https://developer.android.com/studio/build/configure-apk-splits.html
// Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc.
def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
def abi = output.getFilter(OutputFile.ABI)
if (abi != null) { // null for the universal-debug, universal-release variants
output.versionCodeOverride =
defaultConfig.versionCode * 1000 + versionCodes.get(abi)
}

packagingOptions {
jniLibs {
useLegacyPackaging (findProperty('expo.useLegacyPackaging')?.toBoolean() ?: false)
}
}
androidResources {
ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:!CVS:!thumbs.db:!picasa.ini:!*~'
}
}

dependencies {
Expand Down Expand Up @@ -208,25 +180,9 @@ dependencies {
// The version of react-native is set by the React Native Gradle Plugin
implementation("com.facebook.react:react-android")

implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.0.0")

debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}")
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
exclude group:'com.squareup.okhttp3', module:'okhttp'
}

debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}")
if (hermesEnabled.toBoolean()) {
implementation("com.facebook.react:hermes-android")
} else {
implementation jscFlavor
}

configurations.all {
resolutionStrategy { force 'androidx.work:work-runtime:2.6.0' }
}
}


apply from: new File(["node", "--print", "require.resolve('@react-native-community/cli-platform-android/package.json')"].execute(null, rootDir).text.trim(), "../native_modules.gradle");
applyNativeModulesAppBuildGradle(project)
6 changes: 1 addition & 5 deletions android/app/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>

<application
android:usesCleartextTraffic="true"
tools:targetApi="28"
tools:ignore="GoogleAppIndexingWarning">
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false" />
</application>
tools:ignore="GoogleAppIndexingWarning"/>
</manifest>

This file was deleted.

Loading
Loading