Skip to content

Commit 2432411

Browse files
authored
Upgrade cppwinrt and csharp Calculator samples (#1018)
## Description Upgrade cppwinrt and csharp calculator samples to 0.78. ### Why Part of the 0.78 release. ### Screenshots Calculator cppwinrt: ![image](https://github.com/user-attachments/assets/9fb0089a-dc30-47f6-894c-e6354fcf9454) Calculator csharp: ![image](https://github.com/user-attachments/assets/efaa662b-bc1d-418a-9975-81064ec42feb) ###### Microsoft Reviewers: [Open in CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/microsoft/react-native-windows-samples/pull/1018)
1 parent 3f07f88 commit 2432411

File tree

20 files changed

+2495
-2689
lines changed

20 files changed

+2495
-2689
lines changed

samples/Calculator/cppwinrt/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ local.properties
3333
.cxx/
3434
*.keystore
3535
!debug.keystore
36+
.kotlin/
3637

3738
# node.js
3839
#

samples/Calculator/cppwinrt/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ See [../README.md](../README.md) for details of this sample.
44

55
See [../csharp/](../csharp/) for a C# version of this sample.
66

7-
It currently targets React Native Windows 0.76.
7+
It currently targets React Native Windows 0.78.
88

99
### Setup
1010
See [../README.md#Setup](../README.md#Setup).

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,14 @@ def enableProguardInReleaseBuilds = false
6363
* The preferred build flavor of JavaScriptCore (JSC)
6464
*
6565
* For example, to use the international variant, you can use:
66-
* `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
66+
* `def jscFlavor = io.github.react-native-community:jsc-android-intl:2026004.+`
6767
*
6868
* The international variant includes ICU i18n library and necessary data
6969
* allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
7070
* give correct results when using with locales other than en-US. Note that
7171
* this variant is about 6MiB larger per architecture than default.
7272
*/
73-
def jscFlavor = 'org.webkit:android-jsc:+'
73+
def jscFlavor = 'io.github.react-native-community:jsc-android:2026004.+'
7474

7575
android {
7676
ndkVersion rootProject.ext.ndkVersion

samples/Calculator/cppwinrt/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ buildscript {
33
buildToolsVersion = "35.0.0"
44
minSdkVersion = 24
55
compileSdkVersion = 35
6-
targetSdkVersion = 34
6+
targetSdkVersion = 35
77
ndkVersion = "27.1.12297006"
88
kotlinVersion = "2.0.21"
99
}

samples/Calculator/cppwinrt/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.10.2-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-all.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

samples/Calculator/cppwinrt/android/gradlew

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,7 @@ done
8686
# shellcheck disable=SC2034
8787
APP_BASE_NAME=${0##*/}
8888
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
89-
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
90-
' "$PWD" ) || exit
89+
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
9190

9291
# Use the maximum available, or set MAX_FD != -1 to use that value.
9392
MAX_FD=maximum

samples/Calculator/cppwinrt/package-lock.json

Lines changed: 526 additions & 673 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

samples/Calculator/cppwinrt/package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
"windows": "npx @react-native-community/cli run-windows"
1212
},
1313
"dependencies": {
14-
"react": "18.3.1",
15-
"react-native": "0.77.0",
16-
"react-native-windows": "^0.77.0"
14+
"react": "19.0.0",
15+
"react-native": "0.78.1",
16+
"react-native-windows": "^0.78.1"
1717
},
1818
"devDependencies": {
1919
"@babel/core": "^7.25.2",
@@ -22,19 +22,19 @@
2222
"@react-native-community/cli": "15.0.1",
2323
"@react-native-community/cli-platform-android": "15.0.1",
2424
"@react-native-community/cli-platform-ios": "15.0.1",
25-
"@react-native/babel-preset": "0.77.0",
26-
"@react-native/eslint-config": "0.77.0",
27-
"@react-native/metro-config": "0.77.0",
28-
"@react-native/typescript-config": "0.77.0",
25+
"@react-native/babel-preset": "0.78.1",
26+
"@react-native/eslint-config": "0.78.1",
27+
"@react-native/metro-config": "0.78.1",
28+
"@react-native/typescript-config": "0.78.1",
2929
"@types/jest": "^29.5.13",
30-
"@types/react": "^18.2.6",
31-
"@types/react-test-renderer": "^18.0.0",
30+
"@types/react": "^19.0.0",
31+
"@types/react-test-renderer": "^19.0.0",
3232
"eslint": "^8.19.0",
3333
"jest": "^29.6.3",
3434
"prettier": "2.8.8",
35-
"react-test-renderer": "18.3.1",
35+
"react-test-renderer": "19.0.0",
3636
"typescript": "5.0.4",
37-
"metro-config": "^0.81.0"
37+
"metro-config": "^0.81.4"
3838
},
3939
"engines": {
4040
"node": ">=18"

samples/Calculator/cppwinrt/windows/Calculator/Calculator.vcxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<!-- This project was created with react-native-windows 0.76.2 -->
2+
<!-- This project was created with react-native-windows 0.78.1 -->
33
<Project ToolsVersion="Current" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
44
<Import Project="$(SolutionDir)\ExperimentalFeatures.props" Condition="Exists('$(SolutionDir)\ExperimentalFeatures.props')" />
55
<PropertyGroup Label="Globals">

samples/Calculator/cppwinrt/yarn.lock

Lines changed: 676 additions & 626 deletions
Large diffs are not rendered by default.

samples/Calculator/csharp/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ local.properties
3333
.cxx/
3434
*.keystore
3535
!debug.keystore
36+
.kotlin/
3637

3738
# node.js
3839
#

samples/Calculator/csharp/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ See [../README.md](../README.md) for details of this sample.
44

55
See [../cppwinrt/](../cppwinrt/) for a C++/Winrt version of this sample.
66

7-
It currently targets React Native Windows 0.76.
7+
It currently targets React Native Windows 0.78.
88

99
### Setup
1010
See [../README.md#Setup](../README.md#Setup).

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,14 @@ def enableProguardInReleaseBuilds = false
6363
* The preferred build flavor of JavaScriptCore (JSC)
6464
*
6565
* For example, to use the international variant, you can use:
66-
* `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
66+
* `def jscFlavor = io.github.react-native-community:jsc-android-intl:2026004.+`
6767
*
6868
* The international variant includes ICU i18n library and necessary data
6969
* allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
7070
* give correct results when using with locales other than en-US. Note that
7171
* this variant is about 6MiB larger per architecture than default.
7272
*/
73-
def jscFlavor = 'org.webkit:android-jsc:+'
73+
def jscFlavor = 'io.github.react-native-community:jsc-android:2026004.+'
7474

7575
android {
7676
ndkVersion rootProject.ext.ndkVersion

samples/Calculator/csharp/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ buildscript {
33
buildToolsVersion = "35.0.0"
44
minSdkVersion = 24
55
compileSdkVersion = 35
6-
targetSdkVersion = 34
6+
targetSdkVersion = 35
77
ndkVersion = "27.1.12297006"
88
kotlinVersion = "2.0.21"
99
}

samples/Calculator/csharp/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.10.2-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-all.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

samples/Calculator/csharp/android/gradlew

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,7 @@ done
8686
# shellcheck disable=SC2034
8787
APP_BASE_NAME=${0##*/}
8888
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
89-
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
90-
' "$PWD" ) || exit
89+
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
9190

9291
# Use the maximum available, or set MAX_FD != -1 to use that value.
9392
MAX_FD=maximum

0 commit comments

Comments
 (0)