diff --git a/android/build.gradle b/android/build.gradle index 46cfd6eb1d..e30b49d652 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,16 +1,14 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. - buildscript { ext { - buildToolsVersion = "33.0.0" + buildToolsVersion = "34.0.0" minSdkVersion = 21 - compileSdkVersion = 33 - targetSdkVersion = 33 - // We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP. - ndkVersion = "23.1.7779620" + compileSdkVersion = 34 + targetSdkVersion = 34 + ndkVersion = "25.1.8937393" + kotlinVersion = "1.8.10" + playServicesVersion = "18.2.0" timberVersion = "4.7.1" - kotlinVersion = "1.8.10" androidXCore = "1.0.2" // https://github.com/react-native-maps/react-native-maps/issues/4842 googlePlayServicesLocationVersion = "21.0.1" @@ -25,6 +23,7 @@ buildscript { dependencies { classpath("com.android.tools.build:gradle") classpath("com.facebook.react:react-native-gradle-plugin") + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin") classpath("com.google.gms:google-services:4.4.0") classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.9' @@ -74,3 +73,5 @@ subprojects { } } } + +apply plugin: "com.facebook.react.rootproject" diff --git a/android/gradle.properties b/android/gradle.properties index f6f462e0f0..0e9b37d4b8 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -24,9 +24,6 @@ android.useAndroidX=true # Automatically convert third-party libraries to use AndroidX android.enableJetifier=true -# Version of flipper SDK to use with React Native -FLIPPER_VERSION=0.182.0 - # Use this property to specify which architecture you want to build. # You can also override it from the CLI using # ./gradlew -PreactNativeArchitectures=x86_64 diff --git a/android/gradle/wrapper/gradle-wrapper.jar b/android/gradle/wrapper/gradle-wrapper.jar index 943f0cbfa7..7f93135c49 100644 Binary files a/android/gradle/wrapper/gradle-wrapper.jar and b/android/gradle/wrapper/gradle-wrapper.jar differ diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index 59214fe311..86572cdd2f 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -1,7 +1,8 @@ #Tue Apr 10 02:41:28 CEST 2018 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/android/gradlew b/android/gradlew index 79a61d421c..0adc8e1a53 100755 --- a/android/gradlew +++ b/android/gradlew @@ -83,10 +83,8 @@ done # This is normally unused # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -# 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"' +# 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 # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -133,10 +131,13 @@ location of your Java installation." fi else JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." + fi fi # Increase the maximum file descriptors if we can. @@ -197,6 +198,10 @@ 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"' + # Collect all arguments for the java command; # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of # shell script including quotes and variable substitutions, so put them in diff --git a/babel.config.js b/babel.config.js index fa281db5fa..c88798e148 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,6 +1,6 @@ module.exports = { presets: [ - 'module:metro-react-native-babel-preset', + 'module:@react-native/babel-preset' ], plugins: [ 'react-native-reanimated/plugin', diff --git a/ios/CoopCycle/AppDelegate.mm b/ios/CoopCycle/AppDelegate.mm index 59268f7369..6fdb4d294d 100644 --- a/ios/CoopCycle/AppDelegate.mm +++ b/ios/CoopCycle/AppDelegate.mm @@ -70,6 +70,11 @@ - (void)userNotificationCenter:(UNUserNotificationCenter *)center } - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge +{ + return [self getBundleURL]; +} + +- (NSURL *)getBundleURL { #if DEBUG return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"]; diff --git a/ios/Podfile b/ios/Podfile index 364ecbb038..d02098a0a3 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -49,18 +49,12 @@ target 'CoopCycle' do end config = use_native_modules! - # Flags change depending on the env values. - flags = get_default_flags() - pod 'MercadoPagoSDK', :build_type => :dynamic_framework, :modular_headers => true, :path => "./MercadoPagoSDK" pod 'GoogleSignIn', '~> 6.0.2' use_react_native!( :path => config[:reactNativePath], - # Hermes is now enabled by default. Disable by setting this flag to false. - :hermes_enabled => flags[:hermes_enabled], - :fabric_enabled => flags[:fabric_enabled], # Enables Flipper. # # Note that if you have use_frameworks! enabled, Flipper will not work and @@ -82,7 +76,6 @@ target 'CoopCycle' do config[:reactNativePath], :mac_catalyst_enabled => false ) - __apply_Xcode_12_5_M1_post_install_workaround(installer) # Mixing Swift and Objective-C in a react-native project may be problematic. # Workaround: https://github.com/facebookarchive/react-native-fbsdk/issues/755#issuecomment-787488994 installer.aggregate_targets.first.user_project.native_targets.each do |target| diff --git a/tsconfig.json b/tsconfig.json index 45a6c70722..304ab4e2d8 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,3 +1,3 @@ { - "extends": "@tsconfig/react-native/tsconfig.json" + "extends": "@react-native/typescript-config/tsconfig.json" }