diff --git a/.gitignore b/.gitignore index 5fe41be..d356a39 100644 --- a/.gitignore +++ b/.gitignore @@ -59,8 +59,9 @@ buck-out/ # Bundle artifact *.jsbundle -# CocoaPods +# Ruby / CocoaPods /ios/Pods/ +/vendor/bundle/ # RN android release android/app/bin/ diff --git a/.prettierrc.js b/.prettierrc.js index 3f714ac..2b54074 100644 --- a/.prettierrc.js +++ b/.prettierrc.js @@ -1,4 +1,7 @@ module.exports = { + arrowParens: 'avoid', + bracketSameLine: true, + bracketSpacing: false, singleQuote: true, - semi: false, -} + trailingComma: 'all', +}; diff --git a/android/app/build.gradle b/android/app/build.gradle index aaecb89..268c688 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -134,8 +134,8 @@ android { applicationId "com.drip" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 25 - versionName "1.2311.14" + versionCode 27 + versionName "1.2402.15" ndk { abiFilters "armeabi-v7a", "x86", "arm64-v8a", "x86_64" } diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml index 2541280..1c0e59a 100644 --- a/android/app/src/debug/AndroidManifest.xml +++ b/android/app/src/debug/AndroidManifest.xml @@ -8,6 +8,6 @@ android:usesCleartextTraffic="true" tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning"> - + diff --git a/android/app/src/debug/java/com/drip/ReactNativeFlipper.java b/android/app/src/debug/java/com/drip/ReactNativeFlipper.java index 07e08af..60d95d0 100644 --- a/android/app/src/debug/java/com/drip/ReactNativeFlipper.java +++ b/android/app/src/debug/java/com/drip/ReactNativeFlipper.java @@ -1,10 +1,10 @@ /** - * Copyright (c) Facebook, Inc. and its affiliates. + * Copyright (c) Meta Platforms, Inc. and affiliates. * *

This source code is licensed under the MIT license found in the LICENSE file in the root * directory of this source tree. */ -package com.rndiffapp; +package com.drip; import android.content.Context; import com.facebook.flipper.android.AndroidFlipperClient; import com.facebook.flipper.android.utils.FlipperUtils; @@ -18,6 +18,7 @@ import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor; import com.facebook.flipper.plugins.network.NetworkFlipperPlugin; import com.facebook.flipper.plugins.react.ReactFlipperPlugin; import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin; +import com.facebook.react.ReactInstanceEventListener; import com.facebook.react.ReactInstanceManager; import com.facebook.react.bridge.ReactContext; import com.facebook.react.modules.network.NetworkingModule; @@ -46,7 +47,7 @@ public class ReactNativeFlipper { ReactContext reactContext = reactInstanceManager.getCurrentReactContext(); if (reactContext == null) { reactInstanceManager.addReactInstanceEventListener( - new ReactInstanceManager.ReactInstanceEventListener() { + new ReactInstanceEventListener() { @Override public void onReactContextInitialized(ReactContext reactContext) { reactInstanceManager.removeReactInstanceEventListener(this); diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index d514aab..bccc393 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -57,12 +57,12 @@ + android:screenOrientation="sensorPortrait" + android:exported="true"> diff --git a/android/app/src/main/java/com/drip/MainActivity.java b/android/app/src/main/java/com/drip/MainActivity.java index 2de6d9e..c15e17a 100644 --- a/android/app/src/main/java/com/drip/MainActivity.java +++ b/android/app/src/main/java/com/drip/MainActivity.java @@ -1,6 +1,8 @@ package com.drip; import com.facebook.react.ReactActivity; +import com.facebook.react.ReactActivityDelegate; +import com.facebook.react.ReactRootView; public class MainActivity extends ReactActivity { @@ -12,4 +14,27 @@ public class MainActivity extends ReactActivity { protected String getMainComponentName() { return "drip"; } + + /** + * Returns the instance of the {@link ReactActivityDelegate}. There the RootView is created and + * you can specify the rendered you wish to use (Fabric or the older renderer). + */ + @Override + protected ReactActivityDelegate createReactActivityDelegate() { + return new MainActivityDelegate(this, getMainComponentName()); + } + + public static class MainActivityDelegate extends ReactActivityDelegate { + public MainActivityDelegate(ReactActivity activity, String mainComponentName) { + super(activity, mainComponentName); + } + + @Override + protected ReactRootView createRootView() { + ReactRootView reactRootView = new ReactRootView(getContext()); + // If you opted-in for the New Architecture, we enable the Fabric Renderer. + return reactRootView; + } + } } + diff --git a/android/app/src/main/java/com/drip/MainApplication.java b/android/app/src/main/java/com/drip/MainApplication.java index 00a9ee9..9e7717d 100644 --- a/android/app/src/main/java/com/drip/MainApplication.java +++ b/android/app/src/main/java/com/drip/MainApplication.java @@ -8,6 +8,7 @@ import com.facebook.react.ReactInstanceManager; import cl.json.ShareApplication; import com.facebook.react.ReactNativeHost; import com.facebook.react.ReactPackage; +import com.facebook.react.config.ReactFeatureFlags; import com.facebook.soloader.SoLoader; import java.lang.reflect.InvocationTargetException; import java.util.List; @@ -62,7 +63,7 @@ public class MainApplication extends Application implements ReactApplication, Sh We use reflection here to pick up the class that initializes Flipper, since Flipper library is not available in release mode */ - Class aClass = Class.forName("com.rndiffapp.ReactNativeFlipper"); + Class aClass = Class.forName("com.drip.ReactNativeFlipper"); aClass .getMethod("initializeFlipper", Context.class, ReactInstanceManager.class) .invoke(null, context, reactInstanceManager); diff --git a/android/build.gradle b/android/build.gradle index 23498c3..dc78ab3 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,3 +1,5 @@ +import org.apache.tools.ant.taskdefs.condition.Os + // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { @@ -7,8 +9,9 @@ buildscript { } ext.kotlinVersion = '1.3.40' dependencies { - classpath('com.android.tools.build:gradle:7.0.3') - + classpath('com.android.tools.build:gradle:7.0.4') + classpath("com.facebook.react:react-native-gradle-plugin") + classpath("de.undercouch:gradle-download-task:4.1.2") // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion") @@ -50,5 +53,12 @@ ext { minSdkVersion = 21 compileSdkVersion = 33 targetSdkVersion = 33 - ndkVersion = "21.4.7075529" + + if (System.properties['os.arch'] == "aarch64") { + // For M1 Users we need to use the NDK 24 which added support for aarch64 + ndkVersion = "24.0.8215888" + } else { + // Otherwise we default to the side-by-side NDK version from AGP. + ndkVersion = "21.4.7075529" + } } diff --git a/android/gradle.properties b/android/gradle.properties index e966148..fa4feae 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -9,8 +9,8 @@ # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. -# Default value: -Xmx1024m -XX:MaxPermSize=256m -# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 +# Default value: -Xmx512m -XX:MaxMetaspaceSize=256m +org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit @@ -25,7 +25,16 @@ android.useAndroidX=true android.enableJetifier=true # Version of flipper SDK to use with React Native -FLIPPER_VERSION=0.99.0 +FLIPPER_VERSION=0.125.0 -# https://github.com/facebook/react-native/issues/30729 -org.gradle.jvmargs=-Xmx4g \ No newline at end of file +# Use this property to specify which architecture you want to build. +# You can also override it from the CLI using +# ./gradlew -PreactNativeArchitectures=x86_64 +reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64 + +# Use this property to enable support to the new architecture. +# This will allow you to use TurboModules and the Fabric render in +# your application. You should enable this flag either if you want +# to write custom TurboModules/Fabric components OR use libraries that +# are providing them. +newArchEnabled=false diff --git a/android/gradle/wrapper/gradle-wrapper.jar b/android/gradle/wrapper/gradle-wrapper.jar index e708b1c..7454180 100644 Binary files a/android/gradle/wrapper/gradle-wrapper.jar and b/android/gradle/wrapper/gradle-wrapper.jar differ diff --git a/package.json b/package.json index 6bb4ee5..876c7a4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "drip.", - "version": "1.2401.17", + "version": "1.2402.15", "contributors": [ "Julia Friesel ", "Marie Kochsiek",