Skip to content

Commit

Permalink
fix(create-cpp.js): fix react native gradlew permission and crash issues
Browse files Browse the repository at this point in the history
  • Loading branch information
bugra9 committed Dec 24, 2024
1 parent 93566db commit 40eed65
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 14 deletions.
4 changes: 2 additions & 2 deletions packages/cppjs-core-create-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-cpp.js",
"version": "1.0.0-beta.21",
"version": "1.0.0-beta.24",
"description": "Create Cpp.js Applications",
"homepage": "https://github.com/bugra9/cpp.js/tree/main/packages/cppjs-core-create-app#readme",
"repository": "https://github.com/bugra9/cpp.js.git",
Expand All @@ -21,7 +21,7 @@
"@cpp.js/sample-backend-nodejs-wasm": "workspace:^",
"@cpp.js/sample-cloud-cloudflare-worker": "workspace:^",
"@cpp.js/sample-mobile-reactnative-cli": "workspace:^",
"@cpp.js/sample-mobile-reactnative-expo": "1.0.0-beta.9",
"@cpp.js/sample-mobile-reactnative-expo": "1.0.0-beta.10",
"fs-extra": "^11.2.0",
"kleur": "^4.1.5",
"prompts": "^2.4.2",
Expand Down
5 changes: 5 additions & 0 deletions packages/cppjs-core-create-app/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,11 @@ async function main() {
}
});

const androidGradlewFilePath = `${cwd}/android/gradlew`;
if (fs.existsSync(androidGradlewFilePath)) {
fs.chmodSync(androidGradlewFilePath, 0o755);
}

console.log(bold(green('\nYour project is ready!')));

console.log('\nNext steps:');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ android.useAndroidX=true
# Use this property to specify which architecture you want to build.
# You can also override it from the CLI using
# ./gradlew <task> -PreactNativeArchitectures=x86_64
reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
reactNativeArchitectures=arm64-v8a,x86,x86_64

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

# Use this property to enable or disable the Hermes JS engine.
# If set to false, you will be using JSC instead.
Expand Down
2 changes: 1 addition & 1 deletion packages/cppjs-sample-mobile-reactnative-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cpp.js/sample-mobile-reactnative-cli",
"version": "1.0.0-beta.2",
"version": "1.0.0-beta.3",
"description": "Cpp.js React Native sample",
"homepage": "https://github.com/bugra9/cpp.js/tree/main/packages/cppjs-sample-mobile-reactnative-cli#readme",
"repository": "https://github.com/bugra9/cpp.js.git",
Expand Down
6 changes: 3 additions & 3 deletions packages/cppjs-sample-mobile-reactnative-expo/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# @cpp.js/sample-mobile-reactnative-expo
**Cpp.js Expo sample**

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

```bash
npm run ios
npm run android
```
2 changes: 1 addition & 1 deletion packages/cppjs-sample-mobile-reactnative-expo/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@cpp.js/sample-mobile-reactnative-expo",
"main": "expo-router/entry",
"version": "1.0.0-beta.9",
"version": "1.0.0-beta.10",
"description": "Cpp.js Expo sample",
"homepage": "https://github.com/bugra9/cpp.js/tree/main/packages/cppjs-sample-mobile-reactnative-expo#readme",
"repository": "https://github.com/bugra9/cpp.js.git",
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 40eed65

Please sign in to comment.