Skip to content

Commit b6e24a9

Browse files
Merge pull request #55 from mendix/MOO-1776-upgrade-rn
[MOO-1776] upgrade rn to v0.77.1
2 parents cf9083d + f24c6bc commit b6e24a9

20 files changed

Lines changed: 3833 additions & 3452 deletions

android/app/build.gradle

Lines changed: 7 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,19 @@
11
apply plugin: "com.android.application"
22
apply plugin: "com.facebook.react"
3-
apply plugin: "kotlin-android"
43
apply plugin: "com.google.gms.google-services"
54
apply plugin: "com.google.firebase.crashlytics"
5+
apply plugin: "kotlin-android"
66
apply plugin: "kotlin-kapt"
7+
apply plugin: 'org.jetbrains.kotlin.plugin.compose'
78
apply plugin: "androidx.navigation.safeargs.kotlin"
89

9-
/**
10-
* This is the configuration block to customize your React Native Android app.
11-
* By default you don't need to apply any configuration, just uncomment the lines you need.
12-
*/
1310
react {
14-
/* Folders */
15-
// The root of your project, i.e. where "package.json" lives. Default is '../..'
16-
// root = file("../../")
17-
// The folder where the react-native NPM package is. Default is ../../node_modules/react-native
18-
// reactNativeDir = file("../../node_modules/react-native")
19-
// The folder where the react-native Codegen package is. Default is ../../node_modules/@react-native/codegen
20-
// codegenDir = file("../../node_modules/@react-native/codegen")
21-
// The cli.js file which is the React Native CLI entrypoint. Default is ../../node_modules/react-native/cli.js
22-
// cliFile = file("../../node_modules/react-native/cli.js")
2311
/* Variants */
2412
// The list of variants to that are debuggable. For those we're going to
2513
// skip the bundling of the JS bundle and the assets. By default is just 'debug'.
2614
// If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants.
2715
debuggableVariants = ["productionDebug", "productionRelease"]
28-
/* Bundling */
29-
// A list containing the node command and its flags. Default is just 'node'.
30-
// nodeExecutableAndArgs = ["node"]
31-
//
32-
// The command to run when bundling. By default is 'bundle'
33-
// bundleCommand = "ram-bundle"
34-
//
35-
// The path to the CLI configuration file. Default is empty.
36-
// bundleConfig = file(../rn-cli.config.js)
37-
//
38-
// The name of the generated asset file containing your JS bundle
39-
// bundleAssetName = "MyApplication.android.bundle"
40-
//
41-
// The entry file for bundle generation. Default is 'index.android.js' or 'index.js'
42-
// entryFile = file("../js/MyApplication.android.js")
43-
//
44-
// A list of extra flags to pass to the 'bundle' commands.
45-
// See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle
46-
// extraPackagerArgs = []
47-
/* Hermes Commands */
48-
// The hermes compiler command to run. By default it is 'hermesc'
49-
// hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc"
50-
//
51-
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
52-
// hermesFlags = ["-O", "-output-source-map"]
53-
//
16+
5417
/* Autolinking */
5518
autolinkLibrariesWithApp()
5619
}
@@ -60,27 +23,6 @@ react {
6023
*/
6124
def enableProguardInReleaseBuilds = false
6225

63-
/**
64-
* The preferred build flavor of JavaScriptCore (JSC)
65-
*
66-
* For example, to use the international variant, you can use:
67-
* `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
68-
*
69-
* The international variant includes ICU i18n library and necessary data
70-
* allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
71-
* give correct results when using with locales other than en-US. Note that
72-
* this variant is about 6MiB larger per architecture than default.
73-
*/
74-
def jscFlavor = "org.webkit:android-jsc:+"
75-
76-
/**
77-
* Whether to load react from source or use the prepacked package
78-
*
79-
* Keep false for faster compilation and avoid the need for an NDK to be installed.
80-
* Use true if you want to debug and modify RN source, say for patching.
81-
*/
82-
def reactNativeFromSource = BUILD_RN_FROM_SOURCE.toBoolean()
83-
8426
android {
8527
ndkVersion rootProject.ndkVersion
8628
buildToolsVersion rootProject.ext.buildToolsVersion
@@ -91,8 +33,8 @@ android {
9133
applicationId "com.mendix.developerapp.mx10"
9234
minSdkVersion rootProject.minSdkVersion
9335
targetSdkVersion rootProject.targetSdkVersion
94-
versionCode 404
95-
versionName "4.1.0"
36+
versionCode 500
37+
versionName "5.0.0"
9638
missingDimensionStrategy "react-native-camera", "general"
9739
testBuildType System.getProperty("testBuildType", "debug")
9840
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@@ -117,7 +59,7 @@ android {
11759
}
11860
release {
11961
Properties releaseProps = new Properties()
120-
def propFile = new File('./local.properties')
62+
def propFile = new File('./keystores/debug.keystore.properties')
12163
if (propFile.canRead()) {
12264
releaseProps.load(new FileInputStream(propFile))
12365

@@ -169,13 +111,7 @@ android {
169111

170112
dependencies {
171113
// React Native Core
172-
if (reactNativeFromSource) {
173-
implementation project(":ReactAndroid")
174-
} else {
175-
implementation "com.facebook.react:react-android"
176-
}
177-
178-
// Javascript engine
114+
implementation "com.facebook.react:react-android:0.77.0"
179115
implementation("com.facebook.react:hermes-android")
180116

181117
// Mendix dependencies

android/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
xmlns:tools="http://schemas.android.com/tools"
4-
package="com.mendix.developerapp">
3+
xmlns:tools="http://schemas.android.com/tools">
54

65
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" tools:node="remove"
76
tools:ignore="QueryAllPackagesPermission"/>

android/app/src/main/java/com/mendix/developerapp/utilities/EmptyDevLoadingViewController.kt

Lines changed: 0 additions & 30 deletions
This file was deleted.

android/app/src/production/java/com/mendix/developerapp/MainActivity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ class MainActivity : AppCompatActivity(), DefaultHardwareBackBtnHandler, LaunchS
262262
}
263263

264264
override fun requestPermissions(
265-
permissions: Array<out String>,
265+
permissions: Array<String>,
266266
requestCode: Int,
267267
listener: PermissionListener?
268268
) {

android/app/src/production/java/com/mendix/developerapp/mendixapp/MendixProjectFragment.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ package com.mendix.developerapp.mendixapp
22

33
import android.os.Bundle
44
import androidx.navigation.fragment.findNavController
5-
import com.facebook.react.devsupport.overrideDevLoadingViewController
5+
import com.facebook.react.devsupport.DefaultDevLoadingViewImplementation
66
import com.facebook.react.devsupport.setBundleDownloadListener
7-
import com.mendix.developerapp.utilities.EmptyDevLoadingViewController
87
import com.mendix.mendixnative.react.MxConfiguration
98

109
class MendixProjectFragment : MendixProjectFragmentBase() {
@@ -23,8 +22,10 @@ class MendixProjectFragment : MendixProjectFragmentBase() {
2322
// Setting up our download listener
2423
reactNativeHost.reactInstanceManager.devSupportManager.apply {
2524
setBundleDownloadListener(this, viewModel.devServerCallback)
26-
overrideDevLoadingViewController(this, EmptyDevLoadingViewController())
2725
}
26+
27+
// This now uses built-in RN mechanism to show bundling progress.
28+
DefaultDevLoadingViewImplementation.setDevLoadingEnabled(true);
2829
}
2930

3031
override fun onCloseProjectSelected() {

android/build.gradle

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,14 @@
22
buildscript {
33
ext {
44
buildToolsVersion = "35.0.0"
5-
minSdkVersion = 23
5+
minSdkVersion = 24
66
compileSdkVersion = 35
77
targetSdkVersion = 35
88
// needed by camera module
99
googlePlayServicesVersion = "17+"
10-
// supportLibVersion = "28.0.0"
1110
androidXAnnotation = "1.2.0"
1211
androidXBrowser = "1.3.0"
1312
lifecycleVersion = "2.0.0"
14-
kotlin_version = "1.9.24"
1513
kotlinVersion = "1.9.24"
1614
nav_version = "2.8.3"
1715
androidx_core_version = "1.6.0"
@@ -33,11 +31,12 @@ buildscript {
3331
mavenCentral()
3432
}
3533
dependencies {
36-
classpath "com.android.tools.build:gradle:7.2.2"
34+
classpath "com.android.tools.build:gradle:7.4.2"
3735
classpath "com.facebook.react:react-native-gradle-plugin"
3836
classpath "com.google.gms:google-services:4.4.2"
3937
classpath "de.undercouch:gradle-download-task:4.1.2"
4038
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
39+
classpath 'org.jetbrains.kotlin:compose-compiler-gradle-plugin:2.0.21'
4140
classpath "com.google.firebase:firebase-crashlytics-gradle:2.7.1"
4241
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.8.3"
4342

android/gradle.properties

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,13 @@ android.useAndroidX=true
1616
android.enableJetifier=true
1717
# android.enableJetifier=true
1818
org.gradle.configureondemand=true
19-
BUILD_RN_FROM_SOURCE=false
2019
# Use this property to specify which architecture you want to build.
2120
# You can also override it from the CLI using
2221
# ./gradlew <task> -PreactNativeArchitectures=x86_64
2322
reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
2423
android.suppressUnsupportedCompileSdk=33
2524
android.defaults.buildfeatures.buildconfig=true
2625
android.nonTransitiveRClass=true
27-
hermesEnabled=true
26+
# enabled by default in RN 0.76 so we need to disable it explicitly
27+
newArchEnabled=false
28+
hermesEnabled=true

android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
77
validateDistributionUrl=true
88
networkTimeout=10000

android/settings.gradle

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,6 @@ extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autoli
44

55
includeBuild('../node_modules/@react-native/gradle-plugin')
66

7-
if (BUILD_RN_FROM_SOURCE.toBoolean()) {
8-
include ':ReactAndroid'
9-
project(':ReactAndroid').projectDir = new File(rootProject.projectDir, '../node_modules/react-native/ReactAndroid')
10-
11-
include(":packages:react-native-codegen:android")
12-
project(":packages:react-native-codegen:android").projectDir = new File(rootProject.projectDir,
13-
"../node_modules/react-native/packages/react-native-codegen/android")
14-
15-
includeBuild("../node_modules/react-native/packages/react-native-codegen/android")
16-
}
17-
187
include ':mendixnative-release'
198
project(':mendixnative-release').projectDir = new File(rootProject.projectDir, '../node_modules/@mendix/native/androidlib')
209

ios/DeveloperApp/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
<key>NSPhotoLibraryUsageDescription</key>
8787
<string>To use that feature the app needs access to your photo library.</string>
8888
<key>Native Binary Version</key>
89-
<integer>9</integer>
89+
<integer>10</integer>
9090
<key>NativeOTAEnabled</key>
9191
<true/>
9292
<key>ReferenceGuideUrl</key>

0 commit comments

Comments
 (0)