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

[TAS-560] 🚀 Release v0.35.0 #400

Merged
merged 32 commits into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
51f82ff
⬆️ Bump react-native to 0.68.7
williamchong Jul 10, 2023
11c288a
⬆️ Bump babel to 7.22.x
williamchong Jul 10, 2023
bb78bb6
📌 Sync dependencies using align-deps
williamchong Jul 10, 2023
7772480
👽️ Patch gesture handler API 33 requirement
williamchong Jul 10, 2023
fc18701
⬆️ Bump react-native to 0.69.12
williamchong Jul 10, 2023
f409a43
📌 Sync dependencies using align-deps
williamchong Jul 10, 2023
0c8166c
👽️ Patch deprecated ViewPropType
williamchong Jul 10, 2023
b22df37
⬆️ Bump react-native-qrcode-svg to 6.2.0
williamchong Jul 10, 2023
724482d
👽️ Remove hack for patched metro issue
williamchong Jul 10, 2023
8e0fc54
⬆️ Bump react-native-authcore to fix webview issue
williamchong Jul 11, 2023
bd1ffeb
✅ Update test snapshot for RNSVG
williamchong Jul 11, 2023
71005d1
🏷️ Update react type definitions
williamchong Jul 12, 2023
27c321b
🏷️ Fix react 18 type errors
williamchong Jul 12, 2023
14a4d48
⬆️ Bump react-native to 0.70.12
williamchong Jul 10, 2023
020ecc0
📌 Sync dependencies using align-deps
williamchong Jul 10, 2023
1692542
✅ Update test snapshot for RCTSafeAreaView
williamchong Jul 11, 2023
931746c
🏷️ Update react native type definitions
williamchong Jul 12, 2023
9c6cfe8
🔀 Merge #391 into release/v0.35.0
nwingt Oct 10, 2023
bdd3f54
🚸 Skip session approval for in-app-browser
nwingt Oct 13, 2023
948d97e
🍱 Update entry slogan
nwingt Oct 13, 2023
3f786c9
🔀 Merge #398 into release/v0.35.0
nwingt Oct 13, 2023
5608530
🔀 Merge #399 into release/v0.35.0
nwingt Oct 13, 2023
afa079f
🔖 Bump version to 0.35.0(343)
nwingt Oct 13, 2023
a026e02
🔧 Update `targetSdkVersion` to 33
nwingt Oct 13, 2023
6104692
💩 Fix logout crash
nwingt Oct 13, 2023
297c711
🔖 Bump build number to 344
nwingt Oct 13, 2023
7ed299b
⏪ Revert "💩 Fix logout crash"
nwingt Oct 15, 2023
16e2dff
⏪ Revert RN 0.70 update
nwingt Oct 15, 2023
00192f4
🔖 Bump build number to 345
nwingt Oct 15, 2023
a761e32
⬇️ Downgrade AGP to 7.1.1 ([email protected] stock) to mitigate js bundle issue
williamchong Oct 16, 2023
1a4aa76
🔖 Bump build number to 346
williamchong Oct 16, 2023
445f82e
👽️ Fix Xcode 15 cycle error
williamchong Oct 16, 2023
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
4 changes: 2 additions & 2 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ INIT_APP_TIMEOUT=10000
ROOT_STATE_STORAGE_KEY=root

# Same as MARKETING_VERSION in iOS / version in Android
APP_MARKETING_VERSION=0.34.0
APP_MARKETING_VERSION=0.35.0

# Same as CURRENT_PROJECT_VERSION in iOS / version code in Android
APP_VERSION=342
APP_VERSION=346

# APP_VERSION must be greater or equal to the this value
# without forcing user to update the app
Expand Down
23 changes: 17 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ DerivedData
*.hmap
*.ipa
*.xcuserstate
project.xcworkspace
ios/.xcode.env.local

# Android/IntelliJ
#
Expand All @@ -29,6 +29,7 @@ build/
.gradle
local.properties
*.iml
*.hprof

# node.js
#
Expand All @@ -40,13 +41,23 @@ yarn-error.log
buck-out/
\.buckd/
*.keystore
!debug.keystore

# VS Code
.vscode

# Cocoapods
/ios/Pods
# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/

**/fastlane/report.xml
**/fastlane/Preview.html
**/fastlane/screenshots
**/fastlane/test_output

# Bundle artifact
*.jsbundle

# Ruby / CocoaPods
/ios/Pods/
/vendor/bundle/
6 changes: 6 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source 'https://rubygems.org'

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

gem 'cocoapods', '>= 1.11.2'
118 changes: 105 additions & 13 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,12 @@ def jscFlavor = 'org.webkit:android-jsc:+'
def enableHermes = project.ext.react.get("enableHermes", false);

/**
* Architectures to build native code for in debug.
* Architectures to build native code for.
*/
def nativeArchitectures = project.getProperties().get("reactNativeDebugArchitectures")
def reactNativeArchitectures() {
def value = project.getProperties().get("reactNativeArchitectures")
return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
}

android {
ndkVersion rootProject.ext.ndkVersion
Expand All @@ -138,17 +141,85 @@ android {
applicationId "com.oice"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 342
versionName "0.34.0"
versionCode 346
versionName "0.35.0"
missingDimensionStrategy 'react-native-camera', 'general'
missingDimensionStrategy 'store', 'play'
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()

if (isNewArchitectureEnabled()) {
// We configure the NDK build only if you decide to opt-in for the New Architecture.
externalNativeBuild {
ndkBuild {
arguments "APP_PLATFORM=android-21",
"APP_STL=c++_shared",
"NDK_TOOLCHAIN_VERSION=clang",
"GENERATED_SRC_DIR=$buildDir/generated/source",
"PROJECT_BUILD_DIR=$buildDir",
"REACT_ANDROID_DIR=$rootDir/../node_modules/react-native/ReactAndroid",
"REACT_ANDROID_BUILD_DIR=$rootDir/../node_modules/react-native/ReactAndroid/build",
"NODE_MODULES_DIR=$rootDir/../node_modules"
cFlags "-Wall", "-Werror", "-fexceptions", "-frtti", "-DWITH_INSPECTOR=1"
cppFlags "-std=c++17"
// Make sure this target name is the same you specify inside the
// src/main/jni/Android.mk file for the `LOCAL_MODULE` variable.
targets "oice_appmodules"
}
}
if (!enableSeparateBuildPerCPUArchitecture) {
ndk {
abiFilters (*reactNativeArchitectures())
}
}
}
}

if (isNewArchitectureEnabled()) {
// We configure the NDK build only if you decide to opt-in for the New Architecture.
externalNativeBuild {
ndkBuild {
path "$projectDir/src/main/jni/Android.mk"
}
}
def reactAndroidProjectDir = project(':ReactAndroid').projectDir
def packageReactNdkDebugLibs = tasks.register("packageReactNdkDebugLibs", Copy) {
dependsOn(":ReactAndroid:packageReactNdkDebugLibsForBuck")
from("$reactAndroidProjectDir/src/main/jni/prebuilt/lib")
into("$buildDir/react-ndk/exported")
}
def packageReactNdkReleaseLibs = tasks.register("packageReactNdkReleaseLibs", Copy) {
dependsOn(":ReactAndroid:packageReactNdkReleaseLibsForBuck")
from("$reactAndroidProjectDir/src/main/jni/prebuilt/lib")
into("$buildDir/react-ndk/exported")
}
afterEvaluate {
// If you wish to add a custom TurboModule or component locally,
// you should uncomment this line.
// preBuild.dependsOn("generateCodegenArtifactsFromSchema")
preDebugBuild.dependsOn(packageReactNdkDebugLibs)
preReleaseBuild.dependsOn(packageReactNdkReleaseLibs)

// Due to a bug inside AGP, we have to explicitly set a dependency
// between configureNdkBuild* tasks and the preBuild tasks.
// This can be removed once this is solved: https://issuetracker.google.com/issues/207403732
configureNdkBuildRelease.dependsOn(preReleaseBuild)
configureNdkBuildDebug.dependsOn(preDebugBuild)
reactNativeArchitectures().each { architecture ->
tasks.findByName("configureNdkBuildDebug[${architecture}]")?.configure {
dependsOn("preDebugBuild")
}
tasks.findByName("configureNdkBuildRelease[${architecture}]")?.configure {
dependsOn("preReleaseBuild")
}
}
}
}
splits {
abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false // If true, also generate a universal APK
include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
include (*reactNativeArchitectures())
}
}
signingConfigs {
Expand All @@ -162,11 +233,6 @@ android {
buildTypes {
debug {
signingConfig signingConfigs.debug
if (nativeArchitectures) {
ndk {
abiFilters nativeArchitectures.split(',')
}
}
}
release {
minifyEnabled enableProguardInReleaseBuilds
Expand Down Expand Up @@ -212,6 +278,7 @@ android {

dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])

//noinspection GradleDynamicVersion
implementation "com.facebook.react:react-native:+" // From node_modules

Expand Down Expand Up @@ -239,14 +306,31 @@ dependencies {
}

if (enableHermes) {
def hermesPath = "../../node_modules/hermes-engine/android/";
debugImplementation files(hermesPath + "hermes-debug.aar")
releaseImplementation files(hermesPath + "hermes-release.aar")
//noinspection GradleDynamicVersion
implementation("com.facebook.react:hermes-engine:+") { // From node_modules
exclude group:'com.facebook.fbjni'
}
} else {
implementation jscFlavor
}
}

if (isNewArchitectureEnabled()) {
// If new architecture is enabled, we let you build RN from source
// Otherwise we fallback to a prebuilt .aar bundled in the NPM package.
// This will be applied to all the imported transtitive dependency.
configurations.all {
resolutionStrategy.dependencySubstitution {
substitute(module("com.facebook.react:react-native"))
.using(project(":ReactAndroid"))
.because("On New Architecture we're building React Native from source")
substitute(module("com.facebook.react:hermes-engine"))
.using(project(":ReactAndroid:hermes-engine"))
.because("On New Architecture we're building Hermes from source")
}
}
}

// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
Expand All @@ -256,3 +340,11 @@ task copyDownloadableDepsToLibs(type: Copy) {

apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
apply plugin: 'com.google.gms.google-services'

def isNewArchitectureEnabled() {
// To opt-in for the New Architecture, you can either:
// - Set `newArchEnabled` to true inside the `gradle.properties` file
// - Invoke gradle with `-newArchEnabled=true`
// - Set an environment variable `ORG_GRADLE_PROJECT_newArchEnabled=true`
return project.hasProperty("newArchEnabled") && project.newArchEnabled == "true"
}
2 changes: 1 addition & 1 deletion android/app/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<data android:scheme="https" android:host="likerland.test-app.link" />
</intent-filter>
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false" />
<meta-data tools:replace="android:value" android:name="io.branch.sdk.TestMode" android:value="true" />
<meta-data tools:replace="android:value" android:name="io.branch.sdk.BranchKey" android:value="@string/branch_io_test_key" />
</application>
Expand Down
5 changes: 3 additions & 2 deletions android/app/src/debug/java/com/oice/ReactNativeFlipper.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* <p>This source code is licensed under the MIT license found in the LICENSE file in the root
* directory of this source tree.
*/
package com.awesomeproject066;
package com.oice;

import android.content.Context;
import com.facebook.flipper.android.AndroidFlipperClient;
Expand All @@ -19,6 +19,7 @@
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;
Expand Down Expand Up @@ -51,7 +52,7 @@ public void apply(OkHttpClient.Builder builder) {
ReactContext reactContext = reactInstanceManager.getCurrentReactContext();
if (reactContext == null) {
reactInstanceManager.addReactInstanceEventListener(
new ReactInstanceManager.ReactInstanceEventListener() {
new ReactInstanceEventListener() {
@Override
public void onReactContextInitialized(ReactContext reactContext) {
reactInstanceManager.removeReactInstanceEventListener(this);
Expand Down
2 changes: 1 addition & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
android:label="@string/app_name"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize"
Expand Down
33 changes: 27 additions & 6 deletions android/app/src/main/java/com/oice/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,35 @@

public class MainActivity extends ReactActivity {

/**
* Returns the instance of the {@link ReactActivityDelegate}. There the RootView is created and
* you can specify the renderer you wish to use - the new renderer (Fabric) or the old renderer
* (Paper).
*/
@Override
protected ReactActivityDelegate createReactActivityDelegate() {
return new ReactActivityDelegate(this, getMainComponentName()) {
@Override
protected ReactRootView createRootView() {
return new RNGestureHandlerEnabledRootView(MainActivity.this);
}
};
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.
reactRootView.setIsFabric(BuildConfig.IS_NEW_ARCHITECTURE_ENABLED);
return reactRootView;
}

@Override
protected boolean isConcurrentRootEnabled() {
// If you opted-in for the New Architecture, we enable Concurrent Root (i.e. React 18).
// More on this on https://reactjs.org/blog/2022/03/29/react-v18.html
return BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
}
}

// Override onStart, onNewIntent:
Expand Down
15 changes: 13 additions & 2 deletions android/app/src/main/java/com/oice/MainApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
import com.facebook.react.ReactInstanceManager;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.config.ReactFeatureFlags;
import com.facebook.soloader.SoLoader;
import com.oice.newarchitecture.MainApplicationReactNativeHost;
import java.lang.reflect.InvocationTargetException;
import java.util.List;

Expand Down Expand Up @@ -42,14 +44,23 @@ protected String getJSMainModuleName() {
}
};

private final ReactNativeHost mNewArchitectureNativeHost =
new MainApplicationReactNativeHost(this);

@Override
public ReactNativeHost getReactNativeHost() {
return mReactNativeHost;
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
return mNewArchitectureNativeHost;
} else {
return mReactNativeHost;
}
}

@Override
public void onCreate() {
super.onCreate();
// If you opted-in for the New Architecture, we enable the TurboModule system
ReactFeatureFlags.useTurboModules = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
Security.insertProviderAt(Conscrypt.newProvider(), 1);
RNBranchModule.getAutoInstance(this);
SoLoader.init(this, /* native exopackage */ false);
Expand All @@ -71,7 +82,7 @@ private static void initializeFlipper(
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.awesomeproject066.ReactNativeFlipper");
Class<?> aClass = Class.forName("com.oice.ReactNativeFlipper");
aClass
.getMethod("initializeFlipper", Context.class, ReactInstanceManager.class)
.invoke(null, context, reactInstanceManager);
Expand Down
Loading
Loading