Add release build config and Play Store prep
- Add signing config (reads from env vars) - Enable R8 minification and resource shrinking - Expand ProGuard rules for Gson - Update README with build instructions and Play Store checklist
This commit is contained in:
41
README.md
41
README.md
@@ -185,9 +185,44 @@ curl -s http://192.168.42.1:8765/status | jq -r '"\(.connection.type) \(.connect
|
|||||||
|
|
||||||
## Building
|
## Building
|
||||||
|
|
||||||
1. Open in Android Studio
|
### Debug build
|
||||||
2. Build > Build APK
|
|
||||||
3. Install APK on your phone
|
```bash
|
||||||
|
./gradlew assembleDebug
|
||||||
|
# Output: app/build/outputs/apk/debug/app-debug.apk
|
||||||
|
```
|
||||||
|
|
||||||
|
### Release build
|
||||||
|
|
||||||
|
1. Generate a keystore:
|
||||||
|
```bash
|
||||||
|
keytool -genkey -v -keystore keystore.jks -keyalg RSA -keysize 2048 -validity 10000 -alias release
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Build with signing:
|
||||||
|
```bash
|
||||||
|
export KEYSTORE_PASSWORD="your-password"
|
||||||
|
export KEY_ALIAS="release"
|
||||||
|
export KEY_PASSWORD="your-key-password"
|
||||||
|
./gradlew assembleRelease
|
||||||
|
# Output: app/build/outputs/apk/release/app-release.apk
|
||||||
|
```
|
||||||
|
|
||||||
|
## Play Store Publishing
|
||||||
|
|
||||||
|
### Still needed:
|
||||||
|
|
||||||
|
- [ ] **App icons** - Replace placeholder icons in `app/src/main/res/mipmap-*` with proper 512x512 adaptive icons
|
||||||
|
- [ ] **Privacy policy** - Required URL (app uses location permission)
|
||||||
|
- [ ] **Screenshots** - Phone screenshots for Play Store listing
|
||||||
|
- [ ] **Feature graphic** - 1024x500 banner image
|
||||||
|
- [ ] **Store description** - Short and full descriptions
|
||||||
|
|
||||||
|
### Already configured:
|
||||||
|
|
||||||
|
- [x] Release signing config
|
||||||
|
- [x] ProGuard/R8 minification
|
||||||
|
- [x] Target SDK 36 (meets Play Store requirements)
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
|||||||
@@ -15,13 +15,27 @@ android {
|
|||||||
versionName = "1.0.0"
|
versionName = "1.0.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
signingConfigs {
|
||||||
|
create("release") {
|
||||||
|
val keystoreFile = file("../keystore.jks")
|
||||||
|
if (keystoreFile.exists()) {
|
||||||
|
storeFile = keystoreFile
|
||||||
|
storePassword = System.getenv("KEYSTORE_PASSWORD") ?: ""
|
||||||
|
keyAlias = System.getenv("KEY_ALIAS") ?: "release"
|
||||||
|
keyPassword = System.getenv("KEY_PASSWORD") ?: ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
isMinifyEnabled = false
|
isMinifyEnabled = true
|
||||||
|
isShrinkResources = true
|
||||||
proguardFiles(
|
proguardFiles(
|
||||||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||||
"proguard-rules.pro"
|
"proguard-rules.pro"
|
||||||
)
|
)
|
||||||
|
signingConfig = signingConfigs.findByName("release")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
7
app/proguard-rules.pro
vendored
7
app/proguard-rules.pro
vendored
@@ -6,3 +6,10 @@
|
|||||||
-keepattributes Signature
|
-keepattributes Signature
|
||||||
-keepattributes *Annotation*
|
-keepattributes *Annotation*
|
||||||
-keep class dev.itsh.tetherapi.data.** { *; }
|
-keep class dev.itsh.tetherapi.data.** { *; }
|
||||||
|
-keep class com.google.gson.** { *; }
|
||||||
|
|
||||||
|
# Keep generic type info for Gson
|
||||||
|
-keepattributes EnclosingMethod
|
||||||
|
-keep class * implements com.google.gson.TypeAdapterFactory
|
||||||
|
-keep class * implements com.google.gson.JsonSerializer
|
||||||
|
-keep class * implements com.google.gson.JsonDeserializer
|
||||||
|
|||||||
Reference in New Issue
Block a user