|
| 1 | +# Play Store AAB Build - Quick Guide |
| 2 | + |
| 3 | +Complete workflow to build and upload a signed Android App Bundle (AAB) to Google Play Store. |
| 4 | + |
| 5 | +--- |
| 6 | + |
| 7 | +## 📋 Prerequisites |
| 8 | + |
| 9 | +### 1. Create Keystore (One-time Only) |
| 10 | +```bash |
| 11 | +keytool -genkey -v -keystore release.keystore -alias release \ |
| 12 | + -keyalg RSA -keysize 2048 -validity 10000 |
| 13 | +``` |
| 14 | +**⚠️ Important:** Backup your keystore securely! You'll need it for all future updates. |
| 15 | + |
| 16 | +### 2. Organize Your Course |
| 17 | +Put your markdown file in a clean folder (avoid large binaries or unrelated files): |
| 18 | +```bash |
| 19 | +mkdir -p ~/my-course |
| 20 | +cp your-course.md ~/my-course/ |
| 21 | +# Copy any images/resources the course needs |
| 22 | +``` |
| 23 | + |
| 24 | +### 3. Set Up Google Play Console |
| 25 | +1. Go to [Google Play Console](https://play.google.com/console) |
| 26 | +2. Create a new app |
| 27 | +3. Fill in store listing details (title, description, screenshots) |
| 28 | +4. Set up app category and content rating |
| 29 | + |
| 30 | +--- |
| 31 | + |
| 32 | +## 🏗️ Build Process |
| 33 | + |
| 34 | +### Step 1: Build Docker Image |
| 35 | +```bash |
| 36 | +cd ~/LiaScript-Exporter |
| 37 | +docker build -t liascript-exporter-android . |
| 38 | +``` |
| 39 | + |
| 40 | +### Step 2: Build Signed AAB |
| 41 | +```bash |
| 42 | +docker run --rm \ |
| 43 | + -v $(pwd)/release.keystore:/keystore/release.keystore \ |
| 44 | + -v $(pwd)/output:/output \ |
| 45 | + -v ~/my-course:/input \ |
| 46 | + -e KEYSTORE_PASSWORD="your-password" \ |
| 47 | + -e KEY_PASSWORD="your-key-password" \ |
| 48 | + liascript-exporter-android \ |
| 49 | + --input /input/your-course.md \ |
| 50 | + --format android \ |
| 51 | + --output /output/my-app \ |
| 52 | + --android-bundle \ |
| 53 | + --android-appId "com.yourcompany.yourapp" \ |
| 54 | + --android-appName "Your App Name" |
| 55 | +``` |
| 56 | + |
| 57 | +**Output:** `output/my-app.aab` (ready for upload) |
| 58 | + |
| 59 | +--- |
| 60 | + |
| 61 | +## 📤 Upload to Play Store |
| 62 | + |
| 63 | +### Step 1: Create Release in Play Console |
| 64 | +1. Open [Google Play Console](https://play.google.com/console) |
| 65 | +2. Select your app |
| 66 | +3. Go to **Production** → **Create new release** |
| 67 | +4. Upload `output/my-app.aab` |
| 68 | + |
| 69 | +### Step 2: Complete Release Details |
| 70 | +- **Release name:** e.g., "Version 1.0.0" |
| 71 | +- **Release notes:** Describe what's in your course |
| 72 | +- Click **Review release** |
| 73 | + |
| 74 | +### Step 3: Submit for Review |
| 75 | +- Review all details |
| 76 | +- Click **Start rollout to Production** |
| 77 | +- Google will review your app (typically 1-3 days) |
| 78 | + |
| 79 | +--- |
| 80 | + |
| 81 | +## 🔄 Updating Your App |
| 82 | + |
| 83 | +When you need to update your course: |
| 84 | + |
| 85 | +1. **Update your markdown file** |
| 86 | +2. **Increment version** in your build (optional: add `--android-versionCode` flag) |
| 87 | +3. **Rebuild AAB** with the same keystore and passwords |
| 88 | +4. **Upload to Play Console** as a new release |
| 89 | + |
| 90 | +--- |
| 91 | + |
| 92 | +## ⚙️ Configuration Options |
| 93 | + |
| 94 | +### Required Flags |
| 95 | +| Flag | Description | Example | |
| 96 | +|------|-------------|---------| |
| 97 | +| `--android-bundle` | Build AAB instead of APK | Required for Play Store | |
| 98 | +| `--android-appId` | Unique app identifier | `com.company.app` | |
| 99 | +| `--android-appName` | App display name | `"My Course"` | |
| 100 | + |
| 101 | +### Optional Flags |
| 102 | +| Flag | Description | Default | |
| 103 | +|------|-------------|---------| |
| 104 | +| `--android-keystore` | Keystore file path | `/keystore/release.keystore` | |
| 105 | +| `--android-keystorePassword` | Keystore password | From `KEYSTORE_PASSWORD` env var | |
| 106 | +| `--android-keyPassword` | Key password | From `KEY_PASSWORD` env var | |
| 107 | +| `--android-keyAlias` | Key alias in keystore | `release` | |
| 108 | +| `--android-icon` | Custom app icon (1024x1024px) | LiaScript default | |
| 109 | + |
| 110 | +--- |
| 111 | + |
| 112 | +## 🐛 Troubleshooting |
| 113 | + |
| 114 | +### Build takes too long |
| 115 | +- **Cause:** Large files in course directory |
| 116 | +- **Fix:** Ensure only course files are in the input folder |
| 117 | + |
| 118 | +### "No input defined" error |
| 119 | +- **Cause:** Course file not mounted correctly |
| 120 | +- **Fix:** Check `-v ~/my-course:/input` matches `--input /input/your-course.md` |
| 121 | + |
| 122 | +### "Keystore file not found" |
| 123 | +- **Cause:** Keystore not mounted or wrong path |
| 124 | +- **Fix:** Verify `-v $(pwd)/release.keystore:/keystore/release.keystore` |
| 125 | + |
| 126 | +### AAB file not created |
| 127 | +- **Cause:** Gradle build failed |
| 128 | +- **Fix:** Check error messages in build output, ensure passwords are correct |
| 129 | + |
| 130 | +--- |
| 131 | + |
| 132 | +## 📚 Example: Complete Workflow |
| 133 | + |
| 134 | +```bash |
| 135 | +# 1. Create keystore (first time only) |
| 136 | +keytool -genkey -v -keystore release.keystore -alias release \ |
| 137 | + -keyalg RSA -keysize 2048 -validity 10000 |
| 138 | + |
| 139 | +# 2. Prepare course folder |
| 140 | +mkdir -p ~/courses/intro-to-physics |
| 141 | +cp intro-to-physics.md ~/courses/intro-to-physics/ |
| 142 | + |
| 143 | +# 3. Build Docker image |
| 144 | +cd ~/LiaScript-Exporter |
| 145 | +docker build -t liascript-exporter-android . |
| 146 | + |
| 147 | +# 4. Build signed AAB |
| 148 | +docker run --rm \ |
| 149 | + -v $(pwd)/release.keystore:/keystore/release.keystore \ |
| 150 | + -v $(pwd)/output:/output \ |
| 151 | + -v ~/courses/intro-to-physics:/input \ |
| 152 | + -e KEYSTORE_PASSWORD="mySecretPass123" \ |
| 153 | + -e KEY_PASSWORD="mySecretPass123" \ |
| 154 | + liascript-exporter-android \ |
| 155 | + --input /input/intro-to-physics.md \ |
| 156 | + --format android \ |
| 157 | + --output /output/physics-app \ |
| 158 | + --android-bundle \ |
| 159 | + --android-appId "com.education.physics" \ |
| 160 | + --android-appName "Physics 101" |
| 161 | + |
| 162 | +# 5. Upload output/physics-app.aab to Google Play Console |
| 163 | +``` |
| 164 | + |
| 165 | +--- |
| 166 | + |
| 167 | +## 📖 Additional Resources |
| 168 | + |
| 169 | +- **Google Play Console:** https://play.google.com/console |
| 170 | +- **Play Console Help:** https://support.google.com/googleplay/android-developer |
| 171 | +- **App Signing Help:** https://developer.android.com/studio/publish/app-signing |
| 172 | +- **LiaScript Documentation:** https://liascript.github.io |
0 commit comments