File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,15 +29,25 @@ jobs:
2929 - name : Build APK (Debug)
3030 run : ./gradlew assembleDebug --stacktrace --no-daemon
3131
32- - name : Rename file APK
33- run : mv app/build/outputs/apk/debug/app-debug.apk app/build/outputs/apk/debug/ReaderApp-${{ github.ref_name }}.apk
32+ - name : Rename and Collect APKs
33+ run : |
34+ mkdir -p release-apks
35+ # Copy Legacy flavor
36+ cp app/build/outputs/apk/legacy/debug/app-legacy-debug.apk release-apks/SimpleReader-Legacy-${{ github.ref_name }}.apk
37+ # Copy Modern flavor
38+ cp app/build/outputs/apk/modern/debug/app-modern-debug.apk release-apks/SimpleReader-Modern-${{ github.ref_name }}.apk
3439
3540 - name : Create Release on GitHub
3641 uses : softprops/action-gh-release@v2
3742 with :
38- files : app/build/outputs/apk/debug/ReaderApp-${{ github.ref_name }} .apk
43+ files : release-apks/* .apk
3944 name : Release ${{ github.ref_name }}
40- body : " Automatic version release ${{ github.ref_name }}"
45+ body : |
46+ Automatic version release ${{ github.ref_name }}
47+
48+ 📂 **Downloads:**
49+ - **Legacy**: For Android 8.0 - 12 (API 26+).
50+ - **Modern**: Optimized for Android 13+ (API 33+).
4151 draft : false
4252 prerelease : false
4353 env :
Original file line number Diff line number Diff line change @@ -40,4 +40,5 @@ For developers interested in the implementation:
4040
4141## Requirements
4242
43- * Android 13 (API Level 33) or higher.
43+ * ** Modern Version** : Android 13 (API Level 33) or higher.
44+ * ** Legacy Version** : Android 8.0 (API Level 26) or higher.
Original file line number Diff line number Diff line change @@ -40,4 +40,5 @@ Dành cho các lập trình viên quan tâm đến việc triển khai:
4040
4141## Yêu Cầu
4242
43- * Android 13 (API Level 33) hoặc cao hơn.
43+ * ** Phiên bản Hiện đại (Modern)** : Android 13 (API Level 33) hoặc cao hơn.
44+ * ** Phiên bản Cũ (Legacy)** : Android 8.0 (API Level 26) hoặc cao hơn.
Original file line number Diff line number Diff line change @@ -11,14 +11,28 @@ android {
1111
1212 defaultConfig {
1313 applicationId = " com.zeq.simple.reader"
14- minSdk = 33
14+ // minSdk removed here, defined in productFlavors
1515 targetSdk = 36
1616 versionCode = 1
1717 versionName = " 1.0"
1818
1919 testInstrumentationRunner = " androidx.test.runner.AndroidJUnitRunner"
2020 }
2121
22+ flavorDimensions + = " version"
23+ productFlavors {
24+ create(" legacy" ) {
25+ dimension = " version"
26+ minSdk = 26
27+ versionNameSuffix = " -legacy"
28+ }
29+ create(" modern" ) {
30+ dimension = " version"
31+ minSdk = 33
32+ versionNameSuffix = " -modern"
33+ }
34+ }
35+
2236 buildTypes {
2337 release {
2438 isMinifyEnabled = true
You can’t perform that action at this time.
0 commit comments