From 3e5afe27474ad2ed019f6f56ee3bfd71726626f7 Mon Sep 17 00:00:00 2001 From: yamilmedina Date: Wed, 4 Dec 2024 15:23:17 +0100 Subject: [PATCH 1/6] chore: bump countly version --- .github/workflows/build-prod-app.yml | 115 +++++++++--------- .../AnonymousAnalyticsRecorderImpl.kt | 2 +- gradle/libs.versions.toml | 2 +- 3 files changed, 61 insertions(+), 58 deletions(-) diff --git a/.github/workflows/build-prod-app.yml b/.github/workflows/build-prod-app.yml index 8779227cf72..85fe5a18957 100644 --- a/.github/workflows/build-prod-app.yml +++ b/.github/workflows/build-prod-app.yml @@ -3,6 +3,9 @@ name: "Prod build" on: release: types: [ published ] + push: + branches: + - "fix/bump-countly-24.7.5" concurrency: group: ${{ github.workflow }}-${{ github.event.release.tag_name }} @@ -25,24 +28,24 @@ jobs: with: submodules: recursive # Needed in order to fetch Kalium sources for building fetch-depth: 0 - - name: Get latest release tag - id: get_latest_release - run: | - latest_tag=$(curl -s https://api.github.com/repos/${{ github.repository }}/releases/latest | jq -r '.tag_name') - echo "::set-output name=latest_tag::$latest_tag" - - - name: Compare versions - id: compare_versions - run: | - current_tag=${{ github.event.release.tag_name }} - latest_tag=${{ steps.get_latest_release.outputs.latest_tag }} - compare_result=$(printf "%s\n%s" "$current_tag" "$latest_tag" | sort -V | tail -n1) - if [[ "$current_tag" != "$compare_result" ]]; then - echo "Current tag ($current_tag) is lower than latest tag ($latest_tag). Failing the workflow." - exit 1 - else - echo "Current tag ($current_tag) is equal or higher than latest tag ($latest_tag). Continuing the workflow." - fi +# - name: Get latest release tag +# id: get_latest_release +# run: | +# latest_tag=$(curl -s https://api.github.com/repos/${{ github.repository }}/releases/latest | jq -r '.tag_name') +# echo "::set-output name=latest_tag::$latest_tag" +# +# - name: Compare versions +# id: compare_versions +# run: | +# current_tag=${{ github.event.release.tag_name }} +# latest_tag=${{ steps.get_latest_release.outputs.latest_tag }} +# compare_result=$(printf "%s\n%s" "$current_tag" "$latest_tag" | sort -V | tail -n1) +# if [[ "$current_tag" != "$compare_result" ]]; then +# echo "Current tag ($current_tag) is lower than latest tag ($latest_tag). Failing the workflow." +# exit 1 +# else +# echo "Current tag ($current_tag) is equal or higher than latest tag ($latest_tag). Continuing the workflow." +# fi - name: Set up JDK 17 uses: buildjet/setup-java@v4 with: @@ -60,11 +63,11 @@ jobs: run: chmod +x ./gradlew - name: Generate version file run: ./gradlew generateVersionFile - - name: Upload version file as artifact - uses: actions/upload-artifact@v4 - with: - name: Version File - path: app/version.txt +# - name: Upload version file as artifact +# uses: actions/upload-artifact@v4 +# with: +# name: Version File +# path: app/version.txt - name: build prod flavour APK run: ./gradlew app:assembleProdCompatrelease @@ -77,33 +80,33 @@ jobs: KEYPWD_COMPAT_RELEASE: ${{ secrets.SIGNING_KEY_PASSWORD_PUBLIC_RELEASE }} KEYSTOREPWD_COMPAT_RELEASE: ${{ secrets.SIGNING_STORE_PASSWORD_PUBLIC_RELEASE }} ENABLE_SIGNING: ${{ secrets.ENABLE_SIGNING }} - - name: build prod flavour bundle - run: - ./gradlew app:bundleProdCompatrelease - env: - KEYSTORE_FILE_PATH_DEBUG: ${{ vars.KEYSTORE_FILE_PATH }} - KEYSTORE_FILE_PATH_RELEASE: ${{ vars.KEYSTORE_FILE_PATH }} - KEYSTORE_FILE_PATH_COMPAT: ${{ vars.KEYSTORE_FILE_PATH }} - KEYSTORE_FILE_PATH_COMPAT_RELEASE: ${{ vars.KEYSTORE_FILE_PATH }} - KEYSTORE_KEY_NAME_COMPAT_RELEASE: ${{ secrets.SIGNING_KEY_ALIAS_PUBLIC_RELEASE }} - KEYPWD_COMPAT_RELEASE: ${{ secrets.SIGNING_KEY_PASSWORD_PUBLIC_RELEASE }} - KEYSTOREPWD_COMPAT_RELEASE: ${{ secrets.SIGNING_STORE_PASSWORD_PUBLIC_RELEASE }} - ENABLE_SIGNING: ${{ secrets.ENABLE_SIGNING }} - - name: Upload - if: success() - uses: actions/upload-artifact@v4 - with: - name: Build Artifacts - path: app/build/outputs/ - - name: Create service_account.json - run: echo '${{ secrets.SERVICE_ACCOUNT_JSON }}' > service_account.json - - name: Deploy to production track - uses: r0adkll/upload-google-play@v1 - with: - serviceAccountJson: service_account.json - packageName: com.wire - releaseFiles: app/build/outputs/bundle/prodCompatrelease/*.aab - track: alpha +# - name: build prod flavour bundle +# run: +# ./gradlew app:bundleProdCompatrelease +# env: +# KEYSTORE_FILE_PATH_DEBUG: ${{ vars.KEYSTORE_FILE_PATH }} +# KEYSTORE_FILE_PATH_RELEASE: ${{ vars.KEYSTORE_FILE_PATH }} +# KEYSTORE_FILE_PATH_COMPAT: ${{ vars.KEYSTORE_FILE_PATH }} +# KEYSTORE_FILE_PATH_COMPAT_RELEASE: ${{ vars.KEYSTORE_FILE_PATH }} +# KEYSTORE_KEY_NAME_COMPAT_RELEASE: ${{ secrets.SIGNING_KEY_ALIAS_PUBLIC_RELEASE }} +# KEYPWD_COMPAT_RELEASE: ${{ secrets.SIGNING_KEY_PASSWORD_PUBLIC_RELEASE }} +# KEYSTOREPWD_COMPAT_RELEASE: ${{ secrets.SIGNING_STORE_PASSWORD_PUBLIC_RELEASE }} +# ENABLE_SIGNING: ${{ secrets.ENABLE_SIGNING }} +# - name: Upload +# if: success() +# uses: actions/upload-artifact@v4 +# with: +# name: Build Artifacts +# path: app/build/outputs/ +# - name: Create service_account.json +# run: echo '${{ secrets.SERVICE_ACCOUNT_JSON }}' > service_account.json +# - name: Deploy to production track +# uses: r0adkll/upload-google-play@v1 +# with: +# serviceAccountJson: service_account.json +# packageName: com.wire +# releaseFiles: app/build/outputs/bundle/prodCompatrelease/*.aab +# track: alpha - name: Deploy ProdCompatRelease to S3 uses: ./.github/actions/deploy-to-s3 with: @@ -113,9 +116,9 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} build-flavour: prod build-variant: compatrelease - - name: Attach APK and version file to release - uses: softprops/action-gh-release@v2.0.8 - with: - files: | - app/build/outputs/apk/prodCompatrelease/*.apk - app/version.txt +# - name: Attach APK and version file to release +# uses: softprops/action-gh-release@v2.0.8 +# with: +# files: | +# app/build/outputs/apk/prodCompatrelease/*.apk +# app/version.txt diff --git a/core/analytics-enabled/src/main/kotlin/com/wire/android/feature/analytics/AnonymousAnalyticsRecorderImpl.kt b/core/analytics-enabled/src/main/kotlin/com/wire/android/feature/analytics/AnonymousAnalyticsRecorderImpl.kt index 78ef8edb4e4..86ca00de97e 100644 --- a/core/analytics-enabled/src/main/kotlin/com/wire/android/feature/analytics/AnonymousAnalyticsRecorderImpl.kt +++ b/core/analytics-enabled/src/main/kotlin/com/wire/android/feature/analytics/AnonymousAnalyticsRecorderImpl.kt @@ -68,7 +68,7 @@ class AnonymousAnalyticsRecorderImpl : AnonymousAnalyticsRecorder { } override fun sendEvent(event: AnalyticsEvent) { - Countly.sharedInstance().events().recordEvent(event.key, event.toSegmentation()) + Countly.sharedInstance().events().recordEvent(event.key, event.toSegmentation().toMutableMap()) } override fun halt() { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index a9bf5e66fff..a9b7eb54815 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -66,7 +66,7 @@ coil = "2.7.0" commonmark = "0.22.0" # Countly -countly = "24.7.4" +countly = "24.7.5" # RSS rss-parser = "6.0.7" From 5dd15d976a39aa88b64793b9c3d537d893001292 Mon Sep 17 00:00:00 2001 From: yamilmedina Date: Wed, 4 Dec 2024 16:38:21 +0100 Subject: [PATCH 2/6] chore: bump countly version --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index a9b7eb54815..757e61405ee 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -66,7 +66,7 @@ coil = "2.7.0" commonmark = "0.22.0" # Countly -countly = "24.7.5" +countly = "24.7.7" # RSS rss-parser = "6.0.7" From 0d27bbfaf815ebcd4d5440803364cd251a65629a Mon Sep 17 00:00:00 2001 From: yamilmedina Date: Wed, 4 Dec 2024 16:59:28 +0100 Subject: [PATCH 3/6] chore: bump countly version --- .github/workflows/build-prod-app.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-prod-app.yml b/.github/workflows/build-prod-app.yml index 85fe5a18957..1e8b69a0e77 100644 --- a/.github/workflows/build-prod-app.yml +++ b/.github/workflows/build-prod-app.yml @@ -20,7 +20,7 @@ jobs: uses: ./.github/workflows/gradle-run-unit-tests.yml secrets: inherit build-app: - needs: [ code-analysis, ui-tests, unit-tests ] +# needs: [ code-analysis, ui-tests, unit-tests ] runs-on: ubuntu-latest steps: - name: Checkout From 28e85e2dae7b7084fd4ce883870ffa19b8c53260 Mon Sep 17 00:00:00 2001 From: yamilmedina Date: Thu, 5 Dec 2024 10:43:13 +0100 Subject: [PATCH 4/6] chore: disable countly --- .../android/feature/analytics/AnonymousAnalyticsRecorderImpl.kt | 2 +- default.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/analytics-enabled/src/main/kotlin/com/wire/android/feature/analytics/AnonymousAnalyticsRecorderImpl.kt b/core/analytics-enabled/src/main/kotlin/com/wire/android/feature/analytics/AnonymousAnalyticsRecorderImpl.kt index 86ca00de97e..78ef8edb4e4 100644 --- a/core/analytics-enabled/src/main/kotlin/com/wire/android/feature/analytics/AnonymousAnalyticsRecorderImpl.kt +++ b/core/analytics-enabled/src/main/kotlin/com/wire/android/feature/analytics/AnonymousAnalyticsRecorderImpl.kt @@ -68,7 +68,7 @@ class AnonymousAnalyticsRecorderImpl : AnonymousAnalyticsRecorder { } override fun sendEvent(event: AnalyticsEvent) { - Countly.sharedInstance().events().recordEvent(event.key, event.toSegmentation().toMutableMap()) + Countly.sharedInstance().events().recordEvent(event.key, event.toSegmentation()) } override fun halt() { diff --git a/default.json b/default.json index 75d210ced82..fe8dcbf8369 100644 --- a/default.json +++ b/default.json @@ -7,7 +7,7 @@ "application_is_private_build": false, "development_api_enabled": false, "mls_support_enabled": false, - "analytics_enabled": true, + "analytics_enabled": false, "paginated_conversation_list_enabled": true, "encrypt_proteus_storage": true, "analytics_app_key": "4483f7a58ae3e70b3780319c4ccb5c88a037be49", From 7866f94769b42f4757b0540a68ab143d9aa27e7d Mon Sep 17 00:00:00 2001 From: yamilmedina Date: Thu, 5 Dec 2024 10:47:33 +0100 Subject: [PATCH 5/6] chore: disable countly --- build-logic/plugins/src/main/kotlin/AndroidCoordinates.kt | 2 +- gradle/libs.versions.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build-logic/plugins/src/main/kotlin/AndroidCoordinates.kt b/build-logic/plugins/src/main/kotlin/AndroidCoordinates.kt index 51888ade39a..8eaec843f86 100644 --- a/build-logic/plugins/src/main/kotlin/AndroidCoordinates.kt +++ b/build-logic/plugins/src/main/kotlin/AndroidCoordinates.kt @@ -26,7 +26,7 @@ object AndroidSdk { object AndroidApp { const val id = "com.wire.android" - const val versionName = "4.9.1" + const val versionName = "4.9.2" val versionCode by lazy { Versionizer(_rootDir).versionCode } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 757e61405ee..a9bf5e66fff 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -66,7 +66,7 @@ coil = "2.7.0" commonmark = "0.22.0" # Countly -countly = "24.7.7" +countly = "24.7.4" # RSS rss-parser = "6.0.7" From 8ef80107615f8ad61bef618f6165c3cae6e2de45 Mon Sep 17 00:00:00 2001 From: yamilmedina Date: Thu, 5 Dec 2024 10:49:55 +0100 Subject: [PATCH 6/6] chore: disable countly --- .github/workflows/build-prod-app.yml | 117 +++++++++++++-------------- 1 file changed, 57 insertions(+), 60 deletions(-) diff --git a/.github/workflows/build-prod-app.yml b/.github/workflows/build-prod-app.yml index 1e8b69a0e77..8779227cf72 100644 --- a/.github/workflows/build-prod-app.yml +++ b/.github/workflows/build-prod-app.yml @@ -3,9 +3,6 @@ name: "Prod build" on: release: types: [ published ] - push: - branches: - - "fix/bump-countly-24.7.5" concurrency: group: ${{ github.workflow }}-${{ github.event.release.tag_name }} @@ -20,7 +17,7 @@ jobs: uses: ./.github/workflows/gradle-run-unit-tests.yml secrets: inherit build-app: -# needs: [ code-analysis, ui-tests, unit-tests ] + needs: [ code-analysis, ui-tests, unit-tests ] runs-on: ubuntu-latest steps: - name: Checkout @@ -28,24 +25,24 @@ jobs: with: submodules: recursive # Needed in order to fetch Kalium sources for building fetch-depth: 0 -# - name: Get latest release tag -# id: get_latest_release -# run: | -# latest_tag=$(curl -s https://api.github.com/repos/${{ github.repository }}/releases/latest | jq -r '.tag_name') -# echo "::set-output name=latest_tag::$latest_tag" -# -# - name: Compare versions -# id: compare_versions -# run: | -# current_tag=${{ github.event.release.tag_name }} -# latest_tag=${{ steps.get_latest_release.outputs.latest_tag }} -# compare_result=$(printf "%s\n%s" "$current_tag" "$latest_tag" | sort -V | tail -n1) -# if [[ "$current_tag" != "$compare_result" ]]; then -# echo "Current tag ($current_tag) is lower than latest tag ($latest_tag). Failing the workflow." -# exit 1 -# else -# echo "Current tag ($current_tag) is equal or higher than latest tag ($latest_tag). Continuing the workflow." -# fi + - name: Get latest release tag + id: get_latest_release + run: | + latest_tag=$(curl -s https://api.github.com/repos/${{ github.repository }}/releases/latest | jq -r '.tag_name') + echo "::set-output name=latest_tag::$latest_tag" + + - name: Compare versions + id: compare_versions + run: | + current_tag=${{ github.event.release.tag_name }} + latest_tag=${{ steps.get_latest_release.outputs.latest_tag }} + compare_result=$(printf "%s\n%s" "$current_tag" "$latest_tag" | sort -V | tail -n1) + if [[ "$current_tag" != "$compare_result" ]]; then + echo "Current tag ($current_tag) is lower than latest tag ($latest_tag). Failing the workflow." + exit 1 + else + echo "Current tag ($current_tag) is equal or higher than latest tag ($latest_tag). Continuing the workflow." + fi - name: Set up JDK 17 uses: buildjet/setup-java@v4 with: @@ -63,11 +60,11 @@ jobs: run: chmod +x ./gradlew - name: Generate version file run: ./gradlew generateVersionFile -# - name: Upload version file as artifact -# uses: actions/upload-artifact@v4 -# with: -# name: Version File -# path: app/version.txt + - name: Upload version file as artifact + uses: actions/upload-artifact@v4 + with: + name: Version File + path: app/version.txt - name: build prod flavour APK run: ./gradlew app:assembleProdCompatrelease @@ -80,33 +77,33 @@ jobs: KEYPWD_COMPAT_RELEASE: ${{ secrets.SIGNING_KEY_PASSWORD_PUBLIC_RELEASE }} KEYSTOREPWD_COMPAT_RELEASE: ${{ secrets.SIGNING_STORE_PASSWORD_PUBLIC_RELEASE }} ENABLE_SIGNING: ${{ secrets.ENABLE_SIGNING }} -# - name: build prod flavour bundle -# run: -# ./gradlew app:bundleProdCompatrelease -# env: -# KEYSTORE_FILE_PATH_DEBUG: ${{ vars.KEYSTORE_FILE_PATH }} -# KEYSTORE_FILE_PATH_RELEASE: ${{ vars.KEYSTORE_FILE_PATH }} -# KEYSTORE_FILE_PATH_COMPAT: ${{ vars.KEYSTORE_FILE_PATH }} -# KEYSTORE_FILE_PATH_COMPAT_RELEASE: ${{ vars.KEYSTORE_FILE_PATH }} -# KEYSTORE_KEY_NAME_COMPAT_RELEASE: ${{ secrets.SIGNING_KEY_ALIAS_PUBLIC_RELEASE }} -# KEYPWD_COMPAT_RELEASE: ${{ secrets.SIGNING_KEY_PASSWORD_PUBLIC_RELEASE }} -# KEYSTOREPWD_COMPAT_RELEASE: ${{ secrets.SIGNING_STORE_PASSWORD_PUBLIC_RELEASE }} -# ENABLE_SIGNING: ${{ secrets.ENABLE_SIGNING }} -# - name: Upload -# if: success() -# uses: actions/upload-artifact@v4 -# with: -# name: Build Artifacts -# path: app/build/outputs/ -# - name: Create service_account.json -# run: echo '${{ secrets.SERVICE_ACCOUNT_JSON }}' > service_account.json -# - name: Deploy to production track -# uses: r0adkll/upload-google-play@v1 -# with: -# serviceAccountJson: service_account.json -# packageName: com.wire -# releaseFiles: app/build/outputs/bundle/prodCompatrelease/*.aab -# track: alpha + - name: build prod flavour bundle + run: + ./gradlew app:bundleProdCompatrelease + env: + KEYSTORE_FILE_PATH_DEBUG: ${{ vars.KEYSTORE_FILE_PATH }} + KEYSTORE_FILE_PATH_RELEASE: ${{ vars.KEYSTORE_FILE_PATH }} + KEYSTORE_FILE_PATH_COMPAT: ${{ vars.KEYSTORE_FILE_PATH }} + KEYSTORE_FILE_PATH_COMPAT_RELEASE: ${{ vars.KEYSTORE_FILE_PATH }} + KEYSTORE_KEY_NAME_COMPAT_RELEASE: ${{ secrets.SIGNING_KEY_ALIAS_PUBLIC_RELEASE }} + KEYPWD_COMPAT_RELEASE: ${{ secrets.SIGNING_KEY_PASSWORD_PUBLIC_RELEASE }} + KEYSTOREPWD_COMPAT_RELEASE: ${{ secrets.SIGNING_STORE_PASSWORD_PUBLIC_RELEASE }} + ENABLE_SIGNING: ${{ secrets.ENABLE_SIGNING }} + - name: Upload + if: success() + uses: actions/upload-artifact@v4 + with: + name: Build Artifacts + path: app/build/outputs/ + - name: Create service_account.json + run: echo '${{ secrets.SERVICE_ACCOUNT_JSON }}' > service_account.json + - name: Deploy to production track + uses: r0adkll/upload-google-play@v1 + with: + serviceAccountJson: service_account.json + packageName: com.wire + releaseFiles: app/build/outputs/bundle/prodCompatrelease/*.aab + track: alpha - name: Deploy ProdCompatRelease to S3 uses: ./.github/actions/deploy-to-s3 with: @@ -116,9 +113,9 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} build-flavour: prod build-variant: compatrelease -# - name: Attach APK and version file to release -# uses: softprops/action-gh-release@v2.0.8 -# with: -# files: | -# app/build/outputs/apk/prodCompatrelease/*.apk -# app/version.txt + - name: Attach APK and version file to release + uses: softprops/action-gh-release@v2.0.8 + with: + files: | + app/build/outputs/apk/prodCompatrelease/*.apk + app/version.txt