From 62f42a16dd9efd0f733e3924c8de31d52283b358 Mon Sep 17 00:00:00 2001 From: manu Date: Thu, 23 May 2024 13:38:43 +0200 Subject: [PATCH 1/3] build: 3.0 release --- RELEASE.md | 145 ++++++++++++++++++++++++-------------- gradle/libs.versions.toml | 2 +- whatsnew/whatsnew-en-US | 19 ++--- 3 files changed, 103 insertions(+), 63 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index 10b51397d1..defe4bf1f8 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,68 +1,105 @@ -Android Capture App for DHIS 2 (v2.9.1) - Patch version +Android Capture App for DHIS 2 (v3.0) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index d5222afc68..6f07b529e1 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -2,7 +2,7 @@ ndk = "21.4.7075529" sdk = "34" minSdk = "21" -vCode = "132" +vCode = "133" vName = "3.0" kotlinCompilerExtensionVersion = "1.5.6" gradle = "8.2.2" diff --git a/whatsnew/whatsnew-en-US b/whatsnew/whatsnew-en-US index 29ab46b2fc..7be5c2dad9 100644 --- a/whatsnew/whatsnew-en-US +++ b/whatsnew/whatsnew-en-US @@ -1,8 +1,11 @@ -This is a patch version that fixes: -- ANDROAPP-5749 Incorrect behavior when tapping on Next on sections that are too long -- ANDROAPP-5885 Data set indicators don't update until the user moves to a different cell -- ANDROAPP-5741 [Local Analytics] App crashes if charts are empty -- ANDROAPP-5604 App crashes when one attempts to synchronise TEI and events imported via QR code -- ANDROAPP-5872 Search in stock management is not updating the list - -You can find all the details on Jira and Github. \ No newline at end of file +- Event and enrollment label can be customized via the Maintenance App. +- Supports multiselect data elements. +- Support for custom icons. +- Event/enrollment details are now more accessible within forms. +- Improved search flow and dashboard layout. +- Redesigned input fields. +- Support line listing analytics. +- Custom map layers can be used. +- Export/import databases for troubleshooting. +- Better feedback for configuration errors. +- Better navigation for many TEIs \ No newline at end of file From 7473069ec5fac6672a30e05a7d228608a8f025aa Mon Sep 17 00:00:00 2001 From: manu Date: Thu, 23 May 2024 15:42:24 +0200 Subject: [PATCH 2/3] build: 3.0 release --- .github/workflows/deploy-release.yml | 2 +- RELEASE.md | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy-release.yml b/.github/workflows/deploy-release.yml index 3e04870367..50a7b89700 100644 --- a/.github/workflows/deploy-release.yml +++ b/.github/workflows/deploy-release.yml @@ -86,7 +86,7 @@ jobs: with: allowUpdates: true draft: true - generateReleaseNotes: true + bodyFile: "RELEASE.md" name: "Android Capture App for DHIS 2 (v${{ inputs.release_tag_name }})" tag: ${{ inputs.release_tag_name }} artifacts: ${{ env.main_project_module }}/build/outputs/apk/dhis/release/dhis2-v${{ steps.read-version.outputs.vName }}-dhis-release.apk,${{ env.main_project_module }}/build/outputs/apk/dhisPlayServices/release/dhis2-v${{ steps.read-version.outputs.vName }}-dhisPlayServices-release.apk,${{ env.main_project_module }}/build/outputs/apk/dhis/debug/dhis2-v${{ steps.read-version.outputs.vName }}-dhis-debug.apk diff --git a/RELEASE.md b/RELEASE.md index defe4bf1f8..f0c1788bed 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,9 +1,5 @@ -Android Capture App for DHIS 2 (v3.0)
-This is a patch version of the DHIS2 Android App It builds upon the last version including bug fixes that couldn't wait to the next version. -It includes no functional improvements neither changes in the User Interface. It means that yours users can update without experiencing any change in the UI. +The new DHIS2 Android App allows offline data capture across all DHIS2 data models. Data and metadata are automatically synchronized whenever there is internet access, always keeping the most relevant data for the logged user in the device. +The app is compatible and we support 41, 40, 2.39.
-## Bugs fixed -* [ANDROAPP-5895](https://dhis2.atlassian.net/browse/ANDROAPP-5895) Correct misalignment when entering text for inputShell -* [ANDROAPP-5885](https://dhis2.atlassian.net/browse/ANDROAPP-5885) [Data set] indicators don't update until the user moves to a different cell -* [ANDROAPP-5881](https://dhis2.atlassian.net/browse/ANDROAPP-5881) Input with virtual keyboard not working correctly -* [ANDROAPP-5872](https://dhis2.atlassian.net/browse/ANDROAPP-5872) [LMIS] Search in stock management is not updating the list -* [ANDROAPP-5871](https://dhis2.atlassian.net/browse/ANDROAPP-5871) App Not Responding when local db is encrypted -* [ANDROAPP-5856](https://dhis2.atlassian.net/browse/ANDROAPP-5856) ANR ReadableStoreImpl.addObjectsToCollection in DataSetDetailRepositoryImpl -* [ANDROAPP-5825](https://dhis2.atlassian.net/browse/ANDROAPP-5825) Input date value changes on click in schedule new event screen -* [ANDROAPP-5821](https://dhis2.atlassian.net/browse/ANDROAPP-5821) NoSuchElementException: List is empty. -* [ANDROAPP-5807](https://dhis2.atlassian.net/browse/ANDROAPP-5807) Crash when parsing value to input in InputDateTime -* [ANDROAPP-5804](https://dhis2.atlassian.net/browse/ANDROAPP-5804) Incorrect label on bar codes, QR codes and GS1 -* [ANDROAPP-5803](https://dhis2.atlassian.net/browse/ANDROAPP-5803) On schedule event due date incorrect when last previous event does not have a report date -* [ANDROAPP-5788](https://dhis2.atlassian.net/browse/ANDROAPP-5788) Keyboard hides helper text if the selected field is near the bottom of the screen -* [ANDROAPP-5773](https://dhis2.atlassian.net/browse/ANDROAPP-5773) Analytics are not being displayed as tables. -* [ANDROAPP-5770](https://dhis2.atlassian.net/browse/ANDROAPP-5770) IllegalStateException: Expected BringIntoViewRequester to not be used before parents are placed. -* [ANDROAPP-5769](https://dhis2.atlassian.net/browse/ANDROAPP-5769) ApplicationNotResponding: ANR for at least 5000 ms. -* [ANDROAPP-5767](https://dhis2.atlassian.net/browse/ANDROAPP-5767) RuntimeException in teidashboardActivity Sentry issue -* [ANDROAPP-5764](https://dhis2.atlassian.net/browse/ANDROAPP-5764) BottomSheetDialog shows barcode expanded with old form -* [ANDROAPP-5749](https://dhis2.atlassian.net/browse/ANDROAPP-5749) Incorrect behavior when tapping on Next on sections that are too long -* [ANDROAPP-5746](https://dhis2.atlassian.net/browse/ANDROAPP-5746) Exception when trying to add a file from downloads directory -* [ANDROAPP-5743](https://dhis2.atlassian.net/browse/ANDROAPP-5743) [Bug?] Calculated variables save integer values with ".0" -* [ANDROAPP-5742](https://dhis2.atlassian.net/browse/ANDROAPP-5742) [Local Analytics] App isn't plotting all the points (per event), only the first one. -* [ANDROAPP-5741](https://dhis2.atlassian.net/browse/ANDROAPP-5741) [Local Analytics] App crashes if charts are empty -* [ANDROAPP-5740](https://dhis2.atlassian.net/browse/ANDROAPP-5740) Display error correctly when date or time is incomplete -* [ANDROAPP-5726](https://dhis2.atlassian.net/browse/ANDROAPP-5726) RTS workflow needs to allow for translating the 3 transaction types -* [ANDROAPP-5716](https://dhis2.atlassian.net/browse/ANDROAPP-5716) Filters not responsive to rapid changes when there are many programs -* [ANDROAPP-5710](https://dhis2.atlassian.net/browse/ANDROAPP-5710) Keyboard not showing for certain fields -* [ANDROAPP-5704](https://dhis2.atlassian.net/browse/ANDROAPP-5704) Overdue date in patient line list follows inconsistent format -* [ANDROAPP-5700](https://dhis2.atlassian.net/browse/ANDROAPP-5700) User can select out-of-scope OUs on the enrollment form -* [ANDROAPP-5698](https://dhis2.atlassian.net/browse/ANDROAPP-5698) Incorrect list of points in a polygon -* [ANDROAPP-5663](https://dhis2.atlassian.net/browse/ANDROAPP-5663) Tei dashboard event list scrolling -* [ANDROAPP-5662](https://dhis2.atlassian.net/browse/ANDROAPP-5662) Search button is behind the nav bar -* [ANDROAPP-5630](https://dhis2.atlassian.net/browse/ANDROAPP-5630) Due date in Tracker program does not follow standard interval days -* [ANDROAPP-5606](https://dhis2.atlassian.net/browse/ANDROAPP-5606) Active filter counter mismatched with workinglist's filters -* [ANDROAPP-5604](https://dhis2.atlassian.net/browse/ANDROAPP-5604) App crashes when one attempts to synchronise TEI and events imported via QR code -* [ANDROAPP-5570](https://dhis2.atlassian.net/browse/ANDROAPP-5570) Changes to enrollment date not respected by program rules -* [ANDROAPP-5567](https://dhis2.atlassian.net/browse/ANDROAPP-5567) DHIS2-RTS Capture app limited to 60 TEIs -* [ANDROAPP-5484](https://dhis2.atlassian.net/browse/ANDROAPP-5484) Images block creating relationships (Capture Android) -* [ANDROAPP-5294](https://dhis2.atlassian.net/browse/ANDROAPP-5294) Filter by ACCESSIBLE org units -* [ANDROAPP-5261](https://dhis2.atlassian.net/browse/ANDROAPP-5261) The animation of the input bottom bar is not smooth. -* [ANDROAPP-5249](https://dhis2.atlassian.net/browse/ANDROAPP-5249) Resizing for all columns difficult use -* [ANDROAPP-5130](https://dhis2.atlassian.net/browse/ANDROAPP-5130) Follow-up clicks can be skipped by the app when entering data into tables. -* This patch release updates the [Android SDK](https://github.com/dhis2/dhis2-android-sdk) to version 1.9.1-20240109.100903-15. - -You can find in Jira details on the [bugs fixed](https://dhis2.atlassian.net/issues/?filter=10554) in this version. - -Remember to check the [documentation](https://www.dhis2.org/android-documentation) for detailed -information of the features included in the App and how to configure DHIS2 to use it. - -Please create a [Jira](https://dhis2.atlassian.net) Issue if you find a bug or -you want to propose a new functionality. [Project: Android App for DHIS2 | Component: +**Cross product** + +[**Support for customized Tracker terminology**](https://dhis2.atlassian.net/jira/polaris/projects/ROADMAP/ideas?selectedIssue=ROADMAP-201)**:** Some DHIS2 terminology is not familiar for the end users. For this reason, we are gradually enabling the possibility to customize it to each particular use case. In this version, the term "event" and "enrollment" are customizable. The admin user will be able to configure it for each program using the Maintenance App, and the Android Capture App will display the customized term instead of the generic one. + +**Documentation link:** + +[**Multiselect value type:**](https://dhis2.atlassian.net/jira/polaris/projects/ROADMAP/ideas/view/4066207?selectedIssue=ROADMAP-72\&issueViewSection=comments) DHIS2 already supports the introduction of multiple options for data elements for data aggregation. In this version it will also support it for individual data. The Android App will support both aggregated and individual multi select data elements from this version. + +**Documentation link:** + +[**Custom Icons**](https://dhis2.atlassian.net/jira/polaris/projects/ROADMAP/ideas/view/4066207?selectedIssue=ROADMAP-207): DHIS2 now supports uploading custom Icons to be used in addition to the built in Icon library. This is useful for use cases not related to health or that require very specific iconography. The Android App will render the custom icons that need to be uploaded and configured using the Maintenance DHIS2 Web App. + +**Documentation link:** + + + +**User Experience** + +[**Improvements in forms layout**](https://dhis2.atlassian.net/jira/polaris/projects/ROADMAP/ideas?selectedIssue=ROADMAP-204)**:** When creating an event or an enrollment, there are a number of fields that are not data elements or attributes, for example, event date, org unit, coordinates, enrollment date, category combinations. Those elements are referred to as event/enrollment details and in previous versions they were displayed in different screens separated from the data elements or attributes. They were difficult to find when users wanted to edit or consult them. In this version the details are displayed inside the form, as the first opened section for completion. Once they are filled in, for example when the user reopens the event or enrollment form, the details section will be visible and easily available, but collapsed to leave more space for the data collection.  + +**Documentation link:** + +[**Improve TEI search user experience**](https://dhis2.atlassian.net/jira/polaris/projects/ROADMAP/ideas?selectedIssue=ROADMAP-203)**:** The search form has been improved to provide a cleaner look and a more intuitive user experience. The buttons have been made more explicit for differencing search from creation. In addition the flow for searching TEIs using attributes rendered as bar / QR codes has been made more agile. If there is only one result and the attribute is unique, the app will open the TEI Dashboard directly. If there are multiple results, the app will display all the cards on the TEI list (this is equal to the current workflow), and if there are no results, the app will display the create button and allow the user to “search outside the program” if the configuration allows it. + +**Documentation link:** + + + +[**Improve TEI dashboard user experience**](https://dhis2.atlassian.net/jira/polaris/projects/ROADMAP/ideas?selectedIssue=ROADMAP-205)**:** In the previous version of the application, the TEI header part of the dashboard was improved. In continuation to that effort, the bottom part, where all program stages are displayed, has been redesigned in this version. The changes include a fresh and more clean look of the list of events, with more space and less -not critical- information displayed. In addition, the button for creating new events has been moved to the top (in timeline view). + +**Documentation link:** + +[**New inputs for value types:**](https://dhis2.atlassian.net/jira/polaris/projects/ROADMAP/ideas/view/4066207?selectedIssue=ROADMAP-293) ****The inputs for all value types have been gradually redesigned from the 2.9 version of the app. The signature input field as well as the complete legend description are included now to improve user experience at data entry. The new input fields are now displayed by default and admin users are able to opt-out to use the old forms through the Android Settings web app. + +**Documentation link:** + +[https://docs.dhis2.org/en/use/android-app/visual-configurations.html#capture\_app\_visual\_legends\_descri2ptions](https://docs.dhis2.org/en/use/android-app/visual-configurations.html#capture_app_visual_legends_descriptions) + + + +[**Improvements in tracker programs data entry flow:**](https://dhis2.atlassian.net/jira/polaris/projects/ROADMAP/ideas/view/4066207?selectedIssue=ROADMAP-294) ****Several improvements have been made in the tracker programs user flow. An informative dialog has been added for confirmation when the user deletes a TEIs. The dialog for scheduling events after compilation has also been redesigned and improved. The selection of org. Units when the user only has access to one org. Unit for data collection has been removed and pre-filled, and lastly, the program rule “Hide program stage” behavior has been aligned with Capture web. + +**Documentation link:** + + + +[**Improve App behavior when working in offline mode:**](https://dhis2.atlassian.net/jira/polaris/projects/ROADMAP/ideas/view/4066207?selectedIssue=ROADMAP-295) ****Some parts of the Android App are not responsive when there is no connection available (i.e. sync buttons…). The behavior is now improved and the App will inform the user that actions are not started because there is no internet connection available when buttons that require connection are tapped. + +**Documentation link:** NA + +**New functionality and Web Parity** + +[**Line listing analytics**](https://dhis2.atlassian.net/browse/ROADMAP-206): This version of the Android App includes the possibility to render and display line listing as part of the offline analytics functionalities. The line list has to be created using the Line Listing DHIS2 web App, and then configured to be displayed in Android using the Android Settings Web App (ASWA), as any other offline analytics in Android. In this case Line lists can be displayed in the home screen, and event or tracker programs (as they do not really apply to aggregated data, they are not displayed in Datasets). Users will be able to search by period, Org. unit, or any of the columns added in the Line List. + +There are some limitations to the line lists to be displayed in the Android App. The Org. units and Periods must be relative, not fixed. And there is a maximum number of columns of 15.  + +Android Local Analytics are built using local data, and wil, update instantly as more data gets collected (or downloaded) in the device. The App will display a maximum of 500 rows and will inform the user when the limit is reached. + +**Documentation link:** + +\ + + +[**Configurable basemap layer:**](https://dhis2.atlassian.net/jira/polaris/projects/ROADMAP/ideas/view/4066207?selectedIssue=ROADMAP-209\&issueViewSection=deliver) DHIS2 supports the configuration of custom map layers for the Maps Web App. From this version of the DHIS2 Android App, those custom layers will be downloaded and rendered in the Maps. The custom layers will be presented as additional layers to the default ones. + +**Documentation link:** + +**Implementation Support** + +[**Import/Export App database:**](https://dhis2.atlassian.net/jira/polaris/projects/ROADMAP/ideas/view/4066207?selectedIssue=ROADMAP-210) ****As part of troubleshooting, some errors can be hard to replicate and can lead to data loss because of being unable to sync. With this functionality the end user will be able to export the local database and share it with an admin who will be able to import it for troubleshooting, being able to replicate the exact environment (database, device, configuration). The exported database is encrypted and the administrator will require the user credentials to be able to access the database. + +**Documentation link:** + +[**Improve end-user config error feedback:**](https://dhis2.atlassian.net/jira/polaris/projects/ROADMAP/ideas/view/4066207?selectedIssue=ROADMAP-296) ****In some cases configuration errors leave empty screens in the Android Capture app, either because of empty forms or because of lack of access. From this version of the Android App the app will display explicit and understandable errors to the user, who will be able to effectively communicate with the administrator to fix the problem. + +**Documentation link: NA** + +  + +**Maintenance/Performance** + +[**Improve app navigation performance for high number of TEIs:**](https://dhis2.atlassian.net/jira/polaris/projects/ROADMAP/ideas/view/4066207?selectedIssue=ROADMAP-208) ****Implementations are more and more demanding in terms of offline need of individual records. This version of the app has been reviewed to optimize performance when there are big numbers of TEIs downloaded locally. **** + +**Documentation link: NA** + +Remember to check the [documentation](https://www.dhis2.org/android-documentation) for detailed information of the features included in the App and how to configure DHIS2 to use it. + +Please create a [Jira](https://dhis2.atlassian.net) Issue if you find a bug or you want to propose a new functionality. [Project: Android App for DHIS2 | Component: AndroidApp].
- - +
- -
The new DHIS2 Android App allows offline data capture across all DHIS2 data models. Data and metadata are automatically synchronized whenever there is internet access, always keeping the most relevant data for the logged user in the device. The app is compatible and we support 41, 40, 2.39. @@ -97,6 +93,8 @@ Android Local Analytics are built using local data, and wil, update instantly as **Documentation link: NA** +You can find in Jira details on the [new features](https://dhis2.atlassian.net/issues/?filter=10640) and [bugs fixed](https://dhis2.atlassian.net/issues/?filter=10641) in this version. + Remember to check the [documentation](https://www.dhis2.org/android-documentation) for detailed information of the features included in the App and how to configure DHIS2 to use it. Please create a [Jira](https://dhis2.atlassian.net) Issue if you find a bug or you want to propose a new functionality. [Project: Android App for DHIS2 | Component: From 22445332f7cc28e624b227c560ca4d10808862d2 Mon Sep 17 00:00:00 2001 From: Pablo Date: Fri, 24 May 2024 09:40:05 +0200 Subject: [PATCH 3/3] build: rename apk files Signed-off-by: Pablo --- .github/workflows/build-release-candidate.yml | 2 +- .github/workflows/continuous-delivery.yml | 2 +- .github/workflows/continuous-integration.yml | 2 +- .github/workflows/deploy-release.yml | 6 ++--- app/build.gradle.kts | 25 +++++++++++++++++-- 5 files changed, 29 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-release-candidate.yml b/.github/workflows/build-release-candidate.yml index df7609ec4a..6eb35c8764 100644 --- a/.github/workflows/build-release-candidate.yml +++ b/.github/workflows/build-release-candidate.yml @@ -62,4 +62,4 @@ jobs: uses: actions/upload-artifact@v3 with: name: ${{ env.repository_name }} - Android APK - path: ${{ env.main_project_module }}/build/outputs/apk/dhis/release/dhis2-v${{ steps.read-version.outputs.vName }}-dhis-release.apk + path: ${{ env.main_project_module }}/build/outputs/apk/dhis/release/dhis2-v${{ steps.read-version.outputs.vName }}.apk diff --git a/.github/workflows/continuous-delivery.yml b/.github/workflows/continuous-delivery.yml index c74716e987..c3d7c89978 100644 --- a/.github/workflows/continuous-delivery.yml +++ b/.github/workflows/continuous-delivery.yml @@ -51,4 +51,4 @@ jobs: uses: actions/upload-artifact@v4 with: name: ${{ env.repository_name }} - Android APK - ${{ steps.date.outputs.date }} - path: ${{ env.main_project_module }}/build/outputs/apk/dhis/debug/dhis2-v${{ steps.read-version.outputs.vName }}-dhis-debug.apk + path: ${{ env.main_project_module }}/build/outputs/apk/dhis/debug/dhis2-v${{ steps.read-version.outputs.vName }}-training.apk diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 6a520473a5..0b7aa91c4e 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -90,4 +90,4 @@ jobs: uses: actions/upload-artifact@v3 with: name: ${{ env.repository_name }} - Android APK - path: ${{ env.main_project_module }}/build/outputs/apk/dhis/debug/dhis2-v${{ steps.read-version.outputs.vName }}-dhis-debug.apk + path: ${{ env.main_project_module }}/build/outputs/apk/dhis/debug/dhis2-v${{ steps.read-version.outputs.vName }}-training.apk diff --git a/.github/workflows/deploy-release.yml b/.github/workflows/deploy-release.yml index 50a7b89700..77b5f194c5 100644 --- a/.github/workflows/deploy-release.yml +++ b/.github/workflows/deploy-release.yml @@ -64,7 +64,7 @@ jobs: with: serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }} packageName: com.dhis2 - releaseFiles: ${{ env.main_project_module }}/build/outputs/apk/dhisPlayServices/release/dhis2-v${{ steps.read-version.outputs.vName }}-dhisPlayServices-release.apk + releaseFiles: ${{ env.main_project_module }}/build/outputs/apk/dhisPlayServices/release/dhis2-v${{ steps.read-version.outputs.vName }}-googlePlay.apk track: alpha whatsNewDirectory: whatsnew @@ -78,7 +78,7 @@ jobs: generateReleaseNotes: true name: "Android Capture App for DHIS 2 (v${{ inputs.release_tag_name }}) - Patch version" tag: ${{ inputs.release_tag_name }} - artifacts: ${{ env.main_project_module }}/build/outputs/apk/dhis/release/dhis2-v${{ steps.read-version.outputs.vName }}-dhis-release.apk,${{ env.main_project_module }}/build/outputs/apk/dhisPlayServices/release/dhis2-v${{ steps.read-version.outputs.vName }}-dhisPlayServices-release.apk,${{ env.main_project_module }}/build/outputs/apk/dhis/debug/dhis2-v${{ steps.read-version.outputs.vName }}-dhis-debug.apk + artifacts: ${{ env.main_project_module }}/build/outputs/apk/dhis/release/dhis2-v${{ steps.read-version.outputs.vName }}.apk,${{ env.main_project_module }}/build/outputs/apk/dhisPlayServices/release/dhis2-v${{ steps.read-version.outputs.vName }}-googlePlay.apk,${{ env.main_project_module }}/build/outputs/apk/dhis/debug/dhis2-v${{ steps.read-version.outputs.vName }}-training.apk - name: Github New Release if: ${{ (inputs.github_release == true) && (inputs.is_patch == false) }} @@ -89,4 +89,4 @@ jobs: bodyFile: "RELEASE.md" name: "Android Capture App for DHIS 2 (v${{ inputs.release_tag_name }})" tag: ${{ inputs.release_tag_name }} - artifacts: ${{ env.main_project_module }}/build/outputs/apk/dhis/release/dhis2-v${{ steps.read-version.outputs.vName }}-dhis-release.apk,${{ env.main_project_module }}/build/outputs/apk/dhisPlayServices/release/dhis2-v${{ steps.read-version.outputs.vName }}-dhisPlayServices-release.apk,${{ env.main_project_module }}/build/outputs/apk/dhis/debug/dhis2-v${{ steps.read-version.outputs.vName }}-dhis-debug.apk + artifacts: ${{ env.main_project_module }}/build/outputs/apk/dhis/release/dhis2-v${{ steps.read-version.outputs.vName }}.apk,${{ env.main_project_module }}/build/outputs/apk/dhisPlayServices/release/dhis2-v${{ steps.read-version.outputs.vName }}-googlePlay.apk,${{ env.main_project_module }}/build/outputs/apk/dhis/debug/dhis2-v${{ steps.read-version.outputs.vName }}-training.apk diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 535bb1ac95..d99a20c7a4 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -1,3 +1,5 @@ +import com.android.build.api.variant.impl.VariantOutputImpl +import com.android.build.gradle.internal.scope.ProjectInfo.Companion.getBaseName import java.io.ByteArrayOutputStream import java.text.SimpleDateFormat import java.util.Date @@ -36,10 +38,10 @@ android { } signingConfigs { - create("release"){ + create("release") { keyAlias = System.getenv("SIGNING_KEY_ALIAS") keyPassword = System.getenv("SIGNING_KEY_PASSWORD") - System.getenv("SIGNING_KEYSTORE_PATH")?.let {path-> + System.getenv("SIGNING_KEYSTORE_PATH")?.let { path -> storeFile = file(path) } storePassword = System.getenv("SIGNING_STORE_PASSWORD") @@ -227,6 +229,25 @@ android { abortOnError = false checkReleaseBuilds = false } + + androidComponents { + onVariants { variant -> + val buildType = variant.buildType + val flavorName = variant.flavorName + variant.outputs.forEach { output -> + if (output is VariantOutputImpl) { + val suffix = when { + buildType == "debug" && flavorName == "dhis" -> "-training" + buildType == "release" && flavorName == "dhisPlayServices" -> "-googlePlay" + else -> "" + } + + output.outputFileName = "dhis2-v${libs.versions.vName.get()}$suffix.apk" + } + } + + } + } } dependencies {