Skip to content

Commit 40eed65

Browse files
committed
fix(create-cpp.js): fix react native gradlew permission and crash issues
1 parent 93566db commit 40eed65

File tree

7 files changed

+19
-14
lines changed

7 files changed

+19
-14
lines changed

packages/cppjs-core-create-app/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "create-cpp.js",
3-
"version": "1.0.0-beta.21",
3+
"version": "1.0.0-beta.24",
44
"description": "Create Cpp.js Applications",
55
"homepage": "https://github.com/bugra9/cpp.js/tree/main/packages/cppjs-core-create-app#readme",
66
"repository": "https://github.com/bugra9/cpp.js.git",
@@ -21,7 +21,7 @@
2121
"@cpp.js/sample-backend-nodejs-wasm": "workspace:^",
2222
"@cpp.js/sample-cloud-cloudflare-worker": "workspace:^",
2323
"@cpp.js/sample-mobile-reactnative-cli": "workspace:^",
24-
"@cpp.js/sample-mobile-reactnative-expo": "1.0.0-beta.9",
24+
"@cpp.js/sample-mobile-reactnative-expo": "1.0.0-beta.10",
2525
"fs-extra": "^11.2.0",
2626
"kleur": "^4.1.5",
2727
"prompts": "^2.4.2",

packages/cppjs-core-create-app/src/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,11 @@ async function main() {
155155
}
156156
});
157157

158+
const androidGradlewFilePath = `${cwd}/android/gradlew`;
159+
if (fs.existsSync(androidGradlewFilePath)) {
160+
fs.chmodSync(androidGradlewFilePath, 0o755);
161+
}
162+
158163
console.log(bold(green('\nYour project is ready!')));
159164

160165
console.log('\nNext steps:');

packages/cppjs-sample-mobile-reactnative-cli/android/gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ android.useAndroidX=true
2525
# Use this property to specify which architecture you want to build.
2626
# You can also override it from the CLI using
2727
# ./gradlew <task> -PreactNativeArchitectures=x86_64
28-
reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
28+
reactNativeArchitectures=arm64-v8a,x86,x86_64
2929

3030
# Use this property to enable support to the new architecture.
3131
# This will allow you to use TurboModules and the Fabric render in
3232
# your application. You should enable this flag either if you want
3333
# to write custom TurboModules/Fabric components OR use libraries that
3434
# are providing them.
35-
newArchEnabled=true
35+
newArchEnabled=false
3636

3737
# Use this property to enable or disable the Hermes JS engine.
3838
# If set to false, you will be using JSC instead.

packages/cppjs-sample-mobile-reactnative-cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@cpp.js/sample-mobile-reactnative-cli",
3-
"version": "1.0.0-beta.2",
3+
"version": "1.0.0-beta.3",
44
"description": "Cpp.js React Native sample",
55
"homepage": "https://github.com/bugra9/cpp.js/tree/main/packages/cppjs-sample-mobile-reactnative-cli#readme",
66
"repository": "https://github.com/bugra9/cpp.js.git",

packages/cppjs-sample-mobile-reactnative-expo/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# @cpp.js/sample-mobile-reactnative-expo
22
**Cpp.js Expo sample**
33

4-
<a href="https://www.npmjs.com/package/@cpp.js/plugin-react-native">
5-
<img alt="NPM version" src="https://img.shields.io/npm/v/@cpp.js/plugin-react-native?style=for-the-badge" />
4+
<a href="https://www.npmjs.com/package/@cpp.js/sample-mobile-reactnative-expo">
5+
<img alt="NPM version" src="https://img.shields.io/npm/v/@cpp.js/sample-mobile-reactnative-expo?style=for-the-badge" />
66
</a>
77
<a href="https://github.com/bugra9/cpp.js/blob/main/LICENSE">
88
<img alt="License" src="https://img.shields.io/github/license/bugra9/cpp.js?style=for-the-badge" />
@@ -30,5 +30,5 @@
3030
3. Start the android app
3131

3232
```bash
33-
npm run ios
33+
npm run android
3434
```

packages/cppjs-sample-mobile-reactnative-expo/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@cpp.js/sample-mobile-reactnative-expo",
33
"main": "expo-router/entry",
4-
"version": "1.0.0-beta.9",
4+
"version": "1.0.0-beta.10",
55
"description": "Cpp.js Expo sample",
66
"homepage": "https://github.com/bugra9/cpp.js/tree/main/packages/cppjs-sample-mobile-reactnative-expo#readme",
77
"repository": "https://github.com/bugra9/cpp.js.git",

pnpm-lock.yaml

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

0 commit comments

Comments
 (0)