Skip to content

Commit a7b6945

Browse files
HariniMalothu17Harini Malothuanupriya13
authored
Updated Calculator Fabric to 0.80.0 (#1063)
## Description ### Why What is the motivation for this change? Add a few sentences describing the context and overall goals of the pull request's commits. Resolves [Add Relevant Issue Here] ## Screenshots Add any relevant screen captures here from before or after your changes. ###### Microsoft Reviewers: [Open in CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/microsoft/react-native-windows-samples/pull/1063) --------- Co-authored-by: Harini Malothu <[email protected]> Co-authored-by: Anupriya Verma <[email protected]>
1 parent 5d1cd22 commit a7b6945

32 files changed

+13952
-16743
lines changed
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
module.exports = {
22
arrowParens: 'avoid',
3-
bracketSameLine: true,
4-
bracketSpacing: false,
53
singleQuote: true,
64
trailingComma: 'all',
75
};
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<configuration>
3-
<packageSources>
4-
<clear />
5-
<add key="react-native" value="https://pkgs.dev.azure.com/ms/react-native/_packaging/react-native-public/nuget/v3/index.json" />
6-
<add key="Nuget.org" value="https://api.nuget.org/v3/index.json" />
7-
</packageSources>
8-
<disabledPackageSources>
9-
<clear />
10-
</disabledPackageSources>
11-
</configuration>
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<packageSources>
4+
<clear />
5+
<add key="react-native" value="https://pkgs.dev.azure.com/ms/react-native/_packaging/react-native-public/nuget/v3/index.json" />
6+
<add key="Nuget.org" value="https://api.nuget.org/v3/index.json" />
7+
</packageSources>
8+
<disabledPackageSources>
9+
<clear />
10+
</disabledPackageSources>
11+
</configuration>

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

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,11 @@ import android.app.Application
44
import com.facebook.react.PackageList
55
import com.facebook.react.ReactApplication
66
import com.facebook.react.ReactHost
7+
import com.facebook.react.ReactNativeApplicationEntryPoint.loadReactNative
78
import com.facebook.react.ReactNativeHost
89
import com.facebook.react.ReactPackage
9-
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
1010
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
1111
import com.facebook.react.defaults.DefaultReactNativeHost
12-
import com.facebook.react.soloader.OpenSourceMergedSoMapping
13-
import com.facebook.soloader.SoLoader
1412

1513
class MainApplication : Application(), ReactApplication {
1614

@@ -35,10 +33,6 @@ class MainApplication : Application(), ReactApplication {
3533

3634
override fun onCreate() {
3735
super.onCreate()
38-
SoLoader.init(this, OpenSourceMergedSoMapping)
39-
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
40-
// If you opted-in for the New Architecture, we load the native entry point for this app.
41-
load()
42-
}
36+
loadReactNative(this)
4337
}
4438
}

samples/Calculator/fabric/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildscript {
55
compileSdkVersion = 35
66
targetSdkVersion = 35
77
ndkVersion = "27.1.12297006"
8-
kotlinVersion = "2.0.21"
8+
kotlinVersion = "2.1.20"
99
}
1010
repositories {
1111
google()
Binary file not shown.

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.13-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

samples/Calculator/fabric/android/gradlew

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ case "$( uname )" in #(
114114
NONSTOP* ) nonstop=true ;;
115115
esac
116116

117-
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
117+
CLASSPATH="\\\"\\\""
118118

119119

120120
# Determine the Java command to use to start the JVM.
@@ -213,7 +213,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
213213
set -- \
214214
"-Dorg.gradle.appname=$APP_BASE_NAME" \
215215
-classpath "$CLASSPATH" \
216-
org.gradle.wrapper.GradleWrapperMain \
216+
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
217217
"$@"
218218

219219
# Stop when "xargs" is not available.
Lines changed: 99 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,99 @@
1-
@rem
2-
@rem Copyright 2015 the original author or authors.
3-
@rem
4-
@rem Licensed under the Apache License, Version 2.0 (the "License");
5-
@rem you may not use this file except in compliance with the License.
6-
@rem You may obtain a copy of the License at
7-
@rem
8-
@rem https://www.apache.org/licenses/LICENSE-2.0
9-
@rem
10-
@rem Unless required by applicable law or agreed to in writing, software
11-
@rem distributed under the License is distributed on an "AS IS" BASIS,
12-
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
@rem See the License for the specific language governing permissions and
14-
@rem limitations under the License.
15-
@rem
16-
@rem SPDX-License-Identifier: Apache-2.0
17-
@rem
18-
19-
@if "%DEBUG%"=="" @echo off
20-
@rem ##########################################################################
21-
@rem
22-
@rem Gradle startup script for Windows
23-
@rem
24-
@rem ##########################################################################
25-
26-
@rem Set local scope for the variables with windows NT shell
27-
if "%OS%"=="Windows_NT" setlocal
28-
29-
set DIRNAME=%~dp0
30-
if "%DIRNAME%"=="" set DIRNAME=.
31-
@rem This is normally unused
32-
set APP_BASE_NAME=%~n0
33-
set APP_HOME=%DIRNAME%
34-
35-
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
36-
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
37-
38-
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
39-
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
40-
41-
@rem Find java.exe
42-
if defined JAVA_HOME goto findJavaFromJavaHome
43-
44-
set JAVA_EXE=java.exe
45-
%JAVA_EXE% -version >NUL 2>&1
46-
if %ERRORLEVEL% equ 0 goto execute
47-
48-
echo. 1>&2
49-
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
50-
echo. 1>&2
51-
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
52-
echo location of your Java installation. 1>&2
53-
54-
goto fail
55-
56-
:findJavaFromJavaHome
57-
set JAVA_HOME=%JAVA_HOME:"=%
58-
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
59-
60-
if exist "%JAVA_EXE%" goto execute
61-
62-
echo. 1>&2
63-
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
64-
echo. 1>&2
65-
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
66-
echo location of your Java installation. 1>&2
67-
68-
goto fail
69-
70-
:execute
71-
@rem Setup the command line
72-
73-
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
74-
75-
76-
@rem Execute Gradle
77-
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
78-
79-
:end
80-
@rem End local scope for the variables with windows NT shell
81-
if %ERRORLEVEL% equ 0 goto mainEnd
82-
83-
:fail
84-
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
85-
rem the _cmd.exe /c_ return code!
86-
set EXIT_CODE=%ERRORLEVEL%
87-
if %EXIT_CODE% equ 0 set EXIT_CODE=1
88-
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
89-
exit /b %EXIT_CODE%
90-
91-
:mainEnd
92-
if "%OS%"=="Windows_NT" endlocal
93-
94-
:omega
1+
@REM Copyright (c) Meta Platforms, Inc. and affiliates.
2+
@REM
3+
@REM This source code is licensed under the MIT license found in the
4+
@REM LICENSE file in the root directory of this source tree.
5+
6+
@rem
7+
@rem Copyright 2015 the original author or authors.
8+
@rem
9+
@rem Licensed under the Apache License, Version 2.0 (the "License");
10+
@rem you may not use this file except in compliance with the License.
11+
@rem You may obtain a copy of the License at
12+
@rem
13+
@rem https://www.apache.org/licenses/LICENSE-2.0
14+
@rem
15+
@rem Unless required by applicable law or agreed to in writing, software
16+
@rem distributed under the License is distributed on an "AS IS" BASIS,
17+
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18+
@rem See the License for the specific language governing permissions and
19+
@rem limitations under the License.
20+
@rem
21+
@rem SPDX-License-Identifier: Apache-2.0
22+
@rem
23+
24+
@if "%DEBUG%"=="" @echo off
25+
@rem ##########################################################################
26+
@rem
27+
@rem Gradle startup script for Windows
28+
@rem
29+
@rem ##########################################################################
30+
31+
@rem Set local scope for the variables with windows NT shell
32+
if "%OS%"=="Windows_NT" setlocal
33+
34+
set DIRNAME=%~dp0
35+
if "%DIRNAME%"=="" set DIRNAME=.
36+
@rem This is normally unused
37+
set APP_BASE_NAME=%~n0
38+
set APP_HOME=%DIRNAME%
39+
40+
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
41+
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
42+
43+
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
44+
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
45+
46+
@rem Find java.exe
47+
if defined JAVA_HOME goto findJavaFromJavaHome
48+
49+
set JAVA_EXE=java.exe
50+
%JAVA_EXE% -version >NUL 2>&1
51+
if %ERRORLEVEL% equ 0 goto execute
52+
53+
echo. 1>&2
54+
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
55+
echo. 1>&2
56+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
57+
echo location of your Java installation. 1>&2
58+
59+
goto fail
60+
61+
:findJavaFromJavaHome
62+
set JAVA_HOME=%JAVA_HOME:"=%
63+
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
64+
65+
if exist "%JAVA_EXE%" goto execute
66+
67+
echo. 1>&2
68+
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
69+
echo. 1>&2
70+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
71+
echo location of your Java installation. 1>&2
72+
73+
goto fail
74+
75+
:execute
76+
@rem Setup the command line
77+
78+
set CLASSPATH=
79+
80+
81+
@rem Execute Gradle
82+
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
83+
84+
:end
85+
@rem End local scope for the variables with windows NT shell
86+
if %ERRORLEVEL% equ 0 goto mainEnd
87+
88+
:fail
89+
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
90+
rem the _cmd.exe /c_ return code!
91+
set EXIT_CODE=%ERRORLEVEL%
92+
if %EXIT_CODE% equ 0 set EXIT_CODE=1
93+
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
94+
exit /b %EXIT_CODE%
95+
96+
:mainEnd
97+
if "%OS%"=="Windows_NT" endlocal
98+
99+
:omega

samples/Calculator/fabric/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
* @format
33
*/
44

5-
import {AppRegistry} from 'react-native';
5+
import { AppRegistry } from 'react-native';
66
import App from './App';
7-
import {name as appName} from './app.json';
7+
import { name as appName } from './app.json';
88

99
AppRegistry.registerComponent(appName, () => App);

0 commit comments

Comments
 (0)