Skip to content

Commit a5ee91a

Browse files
committed
Update Fabric Calculator to 0.83
1 parent 8e327b5 commit a5ee91a

21 files changed

Lines changed: 3765 additions & 4228 deletions

File tree

samples/Calculator/fabric/Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ gem 'bigdecimal'
1414
gem 'logger'
1515
gem 'benchmark'
1616
gem 'mutex_m'
17+
gem 'nkf'

samples/Calculator/fabric/android/app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ react {
1919

2020
/* Variants */
2121
// The list of variants to that are debuggable. For those we're going to
22-
// skip the bundling of the JS bundle and the assets. By default is just 'debug'.
22+
// skip the bundling of the JS bundle and the assets. Default is "debug", "debugOptimized".
2323
// If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants.
24-
// debuggableVariants = ["liteDebug", "prodDebug"]
24+
// debuggableVariants = ["liteDebug", "liteDebugOptimized", "prodDebug", "prodDebugOptimized"]
2525

2626
/* Bundling */
2727
// A list containing the node command and its flags. Default is just 'node'.

samples/Calculator/fabric/android/app/src/main/java/com/calculatorfabric/MainApplication.kt

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,20 @@ import com.facebook.react.PackageList
55
import com.facebook.react.ReactApplication
66
import com.facebook.react.ReactHost
77
import com.facebook.react.ReactNativeApplicationEntryPoint.loadReactNative
8-
import com.facebook.react.ReactNativeHost
9-
import com.facebook.react.ReactPackage
108
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
11-
import com.facebook.react.defaults.DefaultReactNativeHost
129

1310
class MainApplication : Application(), ReactApplication {
1411

15-
override val reactNativeHost: ReactNativeHost =
16-
object : DefaultReactNativeHost(this) {
17-
override fun getPackages(): List<ReactPackage> =
18-
PackageList(this).packages.apply {
19-
// Packages that cannot be autolinked yet can be added manually here, for example:
20-
// add(MyReactNativePackage())
21-
}
22-
23-
override fun getJSMainModuleName(): String = "index"
24-
25-
override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG
26-
27-
override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED
28-
override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED
29-
}
30-
31-
override val reactHost: ReactHost
32-
get() = getDefaultReactHost(applicationContext, reactNativeHost)
12+
override val reactHost: ReactHost by lazy {
13+
getDefaultReactHost(
14+
context = applicationContext,
15+
packageList =
16+
PackageList(this).packages.apply {
17+
// Packages that cannot be autolinked yet can be added manually here, for example:
18+
// add(MyReactNativePackage())
19+
},
20+
)
21+
}
3322

3423
override fun onCreate() {
3524
super.onCreate()

samples/Calculator/fabric/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

samples/Calculator/fabric/android/gradlew

Lines changed: 1 addition & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

samples/Calculator/fabric/android/gradlew.bat

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

samples/Calculator/fabric/ios/CalculatorFabric.xcodeproj/project.pbxproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@
179179
);
180180
runOnlyForDeploymentPostprocessing = 0;
181181
shellPath = /bin/sh;
182-
shellScript = "set -e\n\nWITH_ENVIRONMENT=\"$REACT_NATIVE_PATH/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"$REACT_NATIVE_PATH/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n";
182+
shellScript = "set -e\n\nWITH_ENVIRONMENT=\"$REACT_NATIVE_PATH/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"$REACT_NATIVE_PATH/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"\\\"$WITH_ENVIRONMENT\\\" \\\"$REACT_NATIVE_XCODE\\\"\"\n";
183183
};
184184
00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */ = {
185185
isa = PBXShellScriptBuildPhase;
@@ -273,8 +273,10 @@
273273
);
274274
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
275275
PRODUCT_NAME = CalculatorFabric;
276+
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
276277
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
277278
SWIFT_VERSION = 5.0;
279+
TARGETED_DEVICE_FAMILY = "1,2";
278280
VERSIONING_SYSTEM = "apple-generic";
279281
};
280282
name = Debug;
@@ -300,7 +302,9 @@
300302
);
301303
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
302304
PRODUCT_NAME = CalculatorFabric;
305+
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
303306
SWIFT_VERSION = 5.0;
307+
TARGETED_DEVICE_FAMILY = "1,2";
304308
VERSIONING_SYSTEM = "apple-generic";
305309
};
306310
name = Release;

samples/Calculator/fabric/ios/CalculatorFabric/Info.plist

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5+
<key>CADisableMinimumFrameDurationOnPhone</key>
6+
<true/>
57
<key>CFBundleDevelopmentRegion</key>
68
<string>en</string>
79
<key>CFBundleDisplayName</key>
@@ -43,8 +45,13 @@
4345
<key>UISupportedInterfaceOrientations</key>
4446
<array>
4547
<string>UIInterfaceOrientationPortrait</string>
48+
</array>
49+
<key>UISupportedInterfaceOrientations~ipad</key>
50+
<array>
4651
<string>UIInterfaceOrientationLandscapeLeft</string>
4752
<string>UIInterfaceOrientationLandscapeRight</string>
53+
<string>UIInterfaceOrientationPortrait</string>
54+
<string>UIInterfaceOrientationPortraitUpsideDown</string>
4855
</array>
4956
<key>UIViewControllerBasedStatusBarAppearance</key>
5057
<false/>

samples/Calculator/fabric/ios/Podfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ target 'CalculatorFabric' do
2424
)
2525

2626
post_install do |installer|
27-
# https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
2827
react_native_post_install(
2928
installer,
3029
config[:reactNativePath],
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module.exports = {
2-
preset: 'react-native',
2+
preset: '@react-native/jest-preset',
33
};

0 commit comments

Comments
 (0)