🔧 chore(buildapk.yaml): add new GitHub Actions workflow for building APK
All checks were successful
Building APK / build-apk (push) Successful in 40m56s

🔧 chore(build.gradle): update ndkVersion to 26.2.11394342 for better compatibility
🔧 chore(gradle.properties): increase JVM args for better performance
🔧 chore(eas.json): add buildType as apk for all build profiles to generate APKs
🔧 chore(package.json): downgrade @react-native-async-storage/async-storage to 1.21.0 and react-native-pager-view to 6.2.3 for compatibility
🔧 chore(package.json): add expo-dev-client@3.3.11 for better development experience
🔧 chore(package.json): update react-native-reanimated to latest, react-native-safe-area-context to 4.8.2 and react-native-screens to 3.29.0 for better compatibility and performance
This commit is contained in:
Djalim Simaila 2024-04-06 01:25:47 +02:00
parent 69f7bfd78c
commit e9ae892cdd
6 changed files with 76 additions and 10 deletions

View File

@ -0,0 +1,55 @@
name: Building APK
run-name: Build APK
on: [push]
jobs:
build-apk:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '17'
- name: Setup NodeJS
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Setup Android SDK
uses: android-actions/setup-android@v3
with:
packages: ''
cmdline-tools-version: 9862592
- name: Setup bun
uses: oven-sh/setup-bun@v1
- name: Install dependencies
run: bun install
- run: ./gradlew clean
working-directory: ./android
- name: Setup EAS
uses: expo/expo-github-action@v8
with:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
packager: bun
- name: Build APK
run: eas build --no-wait --profile preview --platform android --non-interactive --local
- name: Zip all apk
run: |
zip apk.zip *.apk
- name: Upload APK ZIP
uses: actions/upload-artifact@v3
with:
name: apk
path: apk.zip

View File

@ -8,7 +8,7 @@ buildscript {
targetSdkVersion = Integer.parseInt(findProperty('android.targetSdkVersion') ?: '34') targetSdkVersion = Integer.parseInt(findProperty('android.targetSdkVersion') ?: '34')
kotlinVersion = findProperty('android.kotlinVersion') ?: '1.8.10' kotlinVersion = findProperty('android.kotlinVersion') ?: '1.8.10'
ndkVersion = "25.1.8937393" ndkVersion = "26.2.11394342"
} }
repositories { repositories {
google() google()

View File

@ -10,7 +10,7 @@
# Specifies the JVM arguments used for the daemon process. # Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings. # The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx512m -XX:MaxMetaspaceSize=256m # Default value: -Xmx512m -XX:MaxMetaspaceSize=256m
org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m org.gradle.jvmargs=-Xmx8192m -XX:MaxMetaspaceSize=1024m
# When configured, Gradle will run in incubating parallel mode. # When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit # This option should only be used with decoupled projects. More details, visit

BIN
bun.lockb

Binary file not shown.

View File

@ -5,12 +5,22 @@
"build": { "build": {
"development": { "development": {
"developmentClient": true, "developmentClient": true,
"distribution": "internal" "distribution": "internal",
"android": {
"buildType": "apk"
}
}, },
"preview": { "preview": {
"distribution": "internal" "distribution": "internal",
"android": {
"buildType": "apk"
}
}, },
"production": {} "production": {
"android": {
"buildType": "apk"
}
}
}, },
"submit": { "submit": {
"production": {} "production": {}

View File

@ -10,7 +10,7 @@
}, },
"dependencies": { "dependencies": {
"@expo/metro-runtime": "^3.1.3", "@expo/metro-runtime": "^3.1.3",
"@react-native-async-storage/async-storage": "^1.23.1", "@react-native-async-storage/async-storage": "1.21.0",
"@react-navigation/material-bottom-tabs": "^6.2.28", "@react-navigation/material-bottom-tabs": "^6.2.28",
"@react-navigation/material-top-tabs": "^6.6.13", "@react-navigation/material-top-tabs": "^6.6.13",
"@react-navigation/native": "^6.1.17", "@react-navigation/native": "^6.1.17",
@ -19,6 +19,7 @@
"axios": "^1.6.8", "axios": "^1.6.8",
"expo": "~50.0.14", "expo": "~50.0.14",
"expo-clipboard": "~5.0.1", "expo-clipboard": "~5.0.1",
"expo-dev-client": "^3.3.11",
"expo-status-bar": "~1.11.1", "expo-status-bar": "~1.11.1",
"expo-system-ui": "^2.9.3", "expo-system-ui": "^2.9.3",
"react": "18.2.0", "react": "18.2.0",
@ -27,12 +28,12 @@
"react-native-async-storage": "^0.0.1", "react-native-async-storage": "^0.0.1",
"react-native-drawer-layout": "^3.3.0", "react-native-drawer-layout": "^3.3.0",
"react-native-gesture-handler": "~2.14.0", "react-native-gesture-handler": "~2.14.0",
"react-native-pager-view": "^6.3.0", "react-native-pager-view": "6.2.3",
"react-native-paper": "^5.12.3", "react-native-paper": "^5.12.3",
"react-native-reanimated": "~3.6.2", "react-native-reanimated": "latest",
"react-native-safe-area-context": "^4.9.0", "react-native-safe-area-context": "4.8.2",
"react-native-safe-area-view": "^1.1.1", "react-native-safe-area-view": "^1.1.1",
"react-native-screens": "^3.30.1", "react-native-screens": "~3.29.0",
"react-native-simple-toast": "^3.3.1", "react-native-simple-toast": "^3.3.1",
"react-native-tab-view": "^3.5.2", "react-native-tab-view": "^3.5.2",
"react-native-toast-notifications": "^3.4.0", "react-native-toast-notifications": "^3.4.0",