From a44bd27c3378d861d55cb8fbb01c7d7a0f03ac33 Mon Sep 17 00:00:00 2001 From: Hasib Prince Date: Wed, 31 Jan 2024 14:41:01 +0600 Subject: [PATCH 1/2] updated default value of auto download message size --- .../src/main/java/com/fsck/k9/AccountPreferenceSerializer.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/core/src/main/java/com/fsck/k9/AccountPreferenceSerializer.kt b/app/core/src/main/java/com/fsck/k9/AccountPreferenceSerializer.kt index fe491c98d6..0b30121620 100644 --- a/app/core/src/main/java/com/fsck/k9/AccountPreferenceSerializer.kt +++ b/app/core/src/main/java/com/fsck/k9/AccountPreferenceSerializer.kt @@ -124,7 +124,7 @@ class AccountPreferenceSerializer( maxPushFolders = storage.getInt("$accountUuid.maxPushFolders", 10) isSubscribedFoldersOnly = storage.getBoolean("$accountUuid.subscribedFoldersOnly", false) maximumPolledMessageAge = storage.getInt("$accountUuid.maximumPolledMessageAge", -1) - maximumAutoDownloadMessageSize = storage.getInt("$accountUuid.maximumAutoDownloadMessageSize", 1048576) + maximumAutoDownloadMessageSize = storage.getInt("$accountUuid.maximumAutoDownloadMessageSize", 2097152) messageFormat = getEnumStringPref(storage, "$accountUuid.messageFormat", DEFAULT_MESSAGE_FORMAT) val messageFormatAuto = storage.getBoolean("$accountUuid.messageFormatAuto", DEFAULT_MESSAGE_FORMAT_AUTO) if (messageFormatAuto && messageFormat == MessageFormat.TEXT) { @@ -600,7 +600,7 @@ class AccountPreferenceSerializer( maxPushFolders = 10 isSubscribedFoldersOnly = false maximumPolledMessageAge = -1 - maximumAutoDownloadMessageSize = 1048576 + maximumAutoDownloadMessageSize = 2097152 messageFormat = DEFAULT_MESSAGE_FORMAT isMessageFormatAuto = DEFAULT_MESSAGE_FORMAT_AUTO isMessageReadReceipt = DEFAULT_MESSAGE_READ_RECEIPT -- GitLab From 1927289c8d5a218f484e886bae5c632498bb89f4 Mon Sep 17 00:00:00 2001 From: Hasib Prince Date: Tue, 10 Sep 2024 20:16:47 +0600 Subject: [PATCH 2/2] feat: release related jobs are added --- .gitlab-ci.yml | 91 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3dc1501721..56df94b3cb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,8 +1,15 @@ image: "registry.gitlab.e.foundation/e/os/docker-android-apps-cicd:master" +variables: + APK_PATH: "app/k9mail/build/outputs/apk/release" + UNSIGNED_APK: "Mail-unsigned.apk" + COMMUNITY_APK: "Mail-community.apk" + OFFICIAL_APK: "Mail-official.apk" + stages: - update-from-upstream - build +- gitlab_release before_script: - export GRADLE_USER_HOME=$(pwd)/.gradle @@ -22,10 +29,94 @@ build: stage: build script: - ./gradlew :app:k9mail:build + - cd app/k9mail/build/outputs/apk/ + - | + if [[ ! -d "release" ]]; then + echo "$APK_PATH does not exist." + exit 1 + fi + cd "release" + unsigned_build=$(ls *.apk | grep "unsigned") + cp $unsigned_build $UNSIGNED_APK artifacts: paths: - app/k9mail/build/outputs/apk/ +init_submodules: + stage: gitlab_release + rules: + - if: '$CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED == "true"' + when: on_success + script: + - | + git clone https://gitlab.e.foundation/e/os/system-apps-update-info.git systemAppsUpdateInfo + artifacts: + paths: + - systemAppsUpdateInfo/scripts/ + +generate-apks: + stage: gitlab_release + rules: + - if: '$CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED == "true"' + when: on_success + needs: + - init_submodules + - build + dependencies: + - init_submodules + - build + before_script: + - apt update && apt install apksigner -y + script: + - | + ./systemAppsUpdateInfo/scripts/generate-apks.sh \ + "$APK_PATH" "$UNSIGNED_APK" "$COMMUNITY_APK" "$OFFICIAL_APK" + artifacts: + paths: + - $APK_PATH/$UNSIGNED_APK + - $APK_PATH/$COMMUNITY_APK + - $APK_PATH/$OFFICIAL_APK + +create-json-files: + stage: gitlab_release + dependencies: + - init_submodules + - generate-apks + needs: + - init_submodules + - generate-apks + rules: + - if: '$CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED == "true"' + when: manual + before_script: + - apt update && apt install jq aapt -y + script: + - | + ./systemAppsUpdateInfo/scripts/create-json-files.sh \ + "$APK_PATH" "$UNSIGNED_APK" "$COMMUNITY_APK" "$OFFICIAL_APK" + artifacts: + paths: + - community.json + - official.json + +create-release: + stage: gitlab_release + dependencies: + - init_submodules + needs: + - init_submodules + - create-json-files + - generate-apks + rules: + - if: '$CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED == "true"' + when: on_success + before_script: + - apt update && apt install jq -y + script: + - | + ./systemAppsUpdateInfo/scripts/create-release.sh \ + "$APK_PATH" "$UNSIGNED_APK" "$COMMUNITY_APK" "$OFFICIAL_APK" + .update-from-upstream: image: registry.gitlab.e.foundation/e/tools/docker-tools:latest stage: update-from-upstream -- GitLab