Skip to content

Commit

Permalink
android: Setup building scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
sashko9807 committed Aug 8, 2023
1 parent ddc6d61 commit d6b0a05
Show file tree
Hide file tree
Showing 4 changed files with 2,941 additions and 2,567 deletions.
3 changes: 3 additions & 0 deletions android/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ buck-out/

# Bundle artifacts
*.jsbundle

#JS Bundle
app/src/main/assets/*
1 change: 1 addition & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ project.ext.react = [
cliPath: new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim()).getParentFile().getAbsolutePath() + "/cli.js",
hermesCommand: new File(["node", "--print", "require.resolve('hermes-engine/package.json')"].execute(null, rootDir).text.trim()).getParentFile().getAbsolutePath() + "/%OS-BIN%/hermesc",
composeSourceMapsPath: new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim()).getParentFile().getAbsolutePath() + "/scripts/compose-source-maps.js",
bundleInDebug: true,
]

apply from: new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim(), "../react.gradle")
Expand Down
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
"scripts": {
"start": "expo start --dev-client",
"android": "expo run:android",
"android:bundle": "mkdirp android/app/src/main/assets && npx react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle",
"android:buildDebug": "yarn android:bundle && cd android && gradlew --stop && gradlew assembleDebug",
"android:installDebug": "cd android && gradlew installDebug",
"android:buildRelease": "yarn android:bundle && cd android && gradlew --stop && gradlew assembleRelease",
"android:installRelease": "cd android && gradlew installRelease",
"ios": "expo run:ios",
"web": "expo start --web",
"eject": "expo eject"
Expand Down Expand Up @@ -50,6 +55,7 @@
},
"devDependencies": {
"@babel/core": "^7.12.9",
"mkdirp": "^3.0.1",
"react-native-dotenv": "^3.4.8",
"react-native-svg-transformer": "^1.0.0",
"yarn-upgrade-all": "^0.7.1"
Expand Down
Loading

0 comments on commit d6b0a05

Please sign in to comment.