@@ -76,7 +76,8 @@ A minimalist, offline-first task management app built with Expo, React Native, a
|
||||
| UI Components | React Native Paper + Custom SVG icons |
|
||||
| Animations | React Native Reanimated |
|
||||
| Date/Time | @react-native-community/datetimepicker + date-fns |
|
||||
| Build | Expo Dev Client / EAS Build |
|
||||
| Build | EAS Build / Gradle (local APK) |
|
||||
| CI/CD | Gitea Actions (`.gitea/workflows/build-apk.yml`) |
|
||||
|
||||
## Project Structure
|
||||
|
||||
@@ -210,6 +211,8 @@ npx expo start --web
|
||||
```
|
||||
|
||||
### Building
|
||||
|
||||
#### EAS Build (cloud)
|
||||
```bash
|
||||
# Install EAS CLI
|
||||
npm install -g eas-cli
|
||||
@@ -222,6 +225,51 @@ eas build --platform ios
|
||||
eas build --platform android
|
||||
eas build --platform web
|
||||
```
|
||||
Profiles are defined in `eas.json` (`development`, `preview`, `production`; production auto-increments version code).
|
||||
|
||||
#### Gradle (local Android APK)
|
||||
The native Android project lives in `carry-your-live/android/`. Requires JDK 17+ and the Android SDK (platform 35, build-tools 35.0.0, NDK 27.1).
|
||||
|
||||
```bash
|
||||
cd carry-your-live/android
|
||||
|
||||
# Debug APK (unsigned)
|
||||
./gradlew assembleDebug
|
||||
|
||||
# Release APK (currently signed with the debug keystore)
|
||||
./gradlew assembleRelease
|
||||
```
|
||||
Output:
|
||||
```
|
||||
android/app/build/outputs/apk/debug/app-debug.apk
|
||||
android/app/build/outputs/apk/release/app-release.apk
|
||||
```
|
||||
Key notes:
|
||||
- The debug keystore (`android/app/debug.keystore`) is generated by the CI pipeline and must exist for release builds — create it locally with the same command used in the pipeline (see below) if it's missing.
|
||||
- Release builds use `signingConfig signingConfigs.debug` until a production keystore is configured.
|
||||
- Versions are set in `android/app/build.gradle` (`versionCode`, `versionName`).
|
||||
|
||||
## CI/CD Pipeline (Gitea Actions)
|
||||
|
||||
`.gitea/workflows/build-apk.yml` builds a release APK on every push to `main` (also manually triggerable via workflow_dispatch):
|
||||
|
||||
1. **Checkout** and setup Node 22, JDK 17 (Temurin)
|
||||
2. **Android SDK**: installs cmdline-tools, licenses, platform-tools, `platforms;android-35`, `build-tools;35.0.0`, `ndk;27.1.12297006`
|
||||
3. **JS deps**: `npm ci` in `carry-your-live/`
|
||||
4. **Debug keystore**: generates `carry-your-live/android/app/debug.keystore` with `keytool` (alias `androiddebugkey`, passwords `android`)
|
||||
5. **Build**: `./gradlew assembleRelease` in `carry-your-live/android/`
|
||||
6. **Upload**: the APK is saved as the `carry-your-live-release` artifact (downloadable from the run's artifacts page)
|
||||
|
||||
To run the build locally exactly as CI does:
|
||||
|
||||
```bash
|
||||
keytool -genkeypair -v \
|
||||
-keystore carry-your-live/android/app/debug.keystore \
|
||||
-alias androiddebugkey -storepass android -keypass android \
|
||||
-keyalg RSA -keysize 2048 -validity 10000 \
|
||||
-dname "CN=Android Debug,O=Android,C=US"
|
||||
cd carry-your-live/android && ./gradlew assembleRelease
|
||||
```
|
||||
|
||||
## Sync API Specification
|
||||
|
||||
|
||||
Reference in New Issue
Block a user