Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
alexsegura committed Feb 23, 2024
1 parent 7c10ccd commit 0a5d99a
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 26 deletions.
17 changes: 9 additions & 8 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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'
Expand Down Expand Up @@ -74,3 +73,5 @@ subprojects {
}
}
}

apply plugin: "com.facebook.react.rootproject"
3 changes: 0 additions & 3 deletions android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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 <task> -PreactNativeArchitectures=x86_64
Expand Down
Binary file modified android/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
15 changes: 10 additions & 5 deletions android/gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
presets: [
'module:metro-react-native-babel-preset',
'module:@react-native/babel-preset'
],
plugins: [
'react-native-reanimated/plugin',
Expand Down
5 changes: 5 additions & 0 deletions ios/CoopCycle/AppDelegate.mm
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ - (void)userNotificationCenter:(UNUserNotificationCenter *)center
}

- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
{
return [self getBundleURL];
}

- (NSURL *)getBundleURL
{
#if DEBUG
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
Expand Down
7 changes: 0 additions & 7 deletions ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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|
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"extends": "@tsconfig/react-native/tsconfig.json"
"extends": "@react-native/typescript-config/tsconfig.json"
}

0 comments on commit 0a5d99a

Please sign in to comment.