Loading .gitlab-ci.yml +93 −0 Original line number Diff line number Diff line image: "registry.gitlab.e.foundation/e/os/docker-android-apps-cicd:latest" variables: APK_PATH: "opentasks/build/outputs/apk/release" UNSIGNED_APK: "opentasks-release.apk" COMMUNITY_APK: "opentasks-release-community.apk" OFFICIAL_APK: "opentasks-release-official.apk" TEST_APK: "opentasks-release-test.apk" .rules_protected_ref: rules: &rules_protected_ref - if: '$CI_PIPELINE_SOURCE != "schedule" && $CI_COMMIT_REF_PROTECTED == "true"' - when: never .rules_protected_tag: rules: &rules_protected_tag - if: '$CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED == "true"' - when: never .rules_protected_tag_manual: rules: &rules_protected_tag_manual - if: '$CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED == "true"' when: manual - when: never stages: - build - gitlab_release before_script: - export JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64 Loading @@ -20,3 +44,72 @@ build: artifacts: paths: - opentasks/build/outputs/apk/ init_submodules: stage: gitlab_release rules: *rules_protected_ref 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: *rules_protected_ref needs: - job: init_submodules - job: build script: - | ./systemAppsUpdateInfo/scripts/generate-apks.sh \ "$APK_PATH" "$UNSIGNED_APK" "$COMMUNITY_APK" "$OFFICIAL_APK" "$TEST_APK" artifacts: paths: - $APK_PATH/$UNSIGNED_APK - $APK_PATH/$COMMUNITY_APK - $APK_PATH/$OFFICIAL_APK - $APK_PATH/$TEST_APK create-json-files: stage: gitlab_release rules: *rules_protected_tag needs: - job: init_submodules - job: generate-apks script: - | ./systemAppsUpdateInfo/scripts/create-json-files.sh \ "$APK_PATH" "$UNSIGNED_APK" "$COMMUNITY_APK" "$OFFICIAL_APK" "$TEST_APK" artifacts: paths: - community.json - official.json - test.json create-test-release: stage: gitlab_release rules: *rules_protected_tag_manual needs: - job: init_submodules - job: create-json-files artifacts: false script: - | ./systemAppsUpdateInfo/scripts/create-test-release.sh \ "$APK_PATH" "$TEST_APK" allow_failure: true create-release: stage: gitlab_release rules: *rules_protected_tag_manual needs: - job: init_submodules - job: create-json-files artifacts: false script: - | ./systemAppsUpdateInfo/scripts/create-release.sh \ "$APK_PATH" "$UNSIGNED_APK" "$COMMUNITY_APK" "$OFFICIAL_APK" allow_failure: true opentasks-provider/src/main/java/org/dmfs/provider/tasks/TaskProviderBroadcastReceiver.java +1 −1 Original line number Diff line number Diff line Loading @@ -52,7 +52,7 @@ public class TaskProviderBroadcastReceiver extends BroadcastReceiver { alarmIntent.setAction(ACTION_NOTIFICATION_ALARM); PendingIntent pendingIntent = PendingIntent.getBroadcast(context, REQUEST_CODE_ALARM, alarmIntent, PendingIntent.FLAG_UPDATE_CURRENT); PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE); // cancel any previous alarm am.cancel(pendingIntent); Loading opentasks/proguard.cfg +4 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,10 @@ -keep public class * extends android.preference.Preference -keep public class com.android.vending.licensing.ILicensingService # Keep Carrot templating engine -keep class au.com.codeka.carrot.** { *; } -keepclassmembers class au.com.codeka.carrot.** { *; } -keepclasseswithmembers class * { native <methods>; } Loading opentasks/src/main/java/org/dmfs/tasks/StaleListBroadcastReceiver.java +11 −12 Original line number Diff line number Diff line Loading @@ -89,14 +89,13 @@ public final class StaleListBroadcastReceiver extends BroadcastReceiver { Resources.Theme theme = context.getTheme(); theme.applyStyle(context.getApplicationInfo().theme, true); nm.notify("stale_list_broadacast", 0, new Notification.Builder(context, "provider_messages") nm.notify("stale_list_broadacast", 0, new Notification.Builder(context, "provider_messages") .setContentText(notificationDescription) .setContentIntent(PendingIntent.getActivity(context, 0, accountRequestIntent, PendingIntent.FLAG_UPDATE_CURRENT)) PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE)) .addAction(new Notification.Action.Builder(null, "Grant", PendingIntent.getActivity(context, 0, accountRequestIntent, PendingIntent.FLAG_UPDATE_CURRENT)) PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE)) .build()) .setColor(new AttributeColor(theme, androidx.appcompat.R.attr.colorPrimary).argb()) .setColorized(true).setSmallIcon(org.dmfs.tasks.provider.R.drawable.ic_24_opentasks) Loading opentasks/src/main/java/org/dmfs/tasks/actions/CancelDelayedAction.java +1 −1 Original line number Diff line number Diff line Loading @@ -49,6 +49,6 @@ public final class CancelDelayedAction implements TaskAction { ((AlarmManager) context.getSystemService(Context.ALARM_SERVICE)) .cancel(PendingIntent.getBroadcast(context, (int) ContentUris.parseId(taskUri), new Intent(context, ActionReceiver.class).setAction(mAction).setData(taskUri), PendingIntent.FLAG_UPDATE_CURRENT)); PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE)); } } Loading
.gitlab-ci.yml +93 −0 Original line number Diff line number Diff line image: "registry.gitlab.e.foundation/e/os/docker-android-apps-cicd:latest" variables: APK_PATH: "opentasks/build/outputs/apk/release" UNSIGNED_APK: "opentasks-release.apk" COMMUNITY_APK: "opentasks-release-community.apk" OFFICIAL_APK: "opentasks-release-official.apk" TEST_APK: "opentasks-release-test.apk" .rules_protected_ref: rules: &rules_protected_ref - if: '$CI_PIPELINE_SOURCE != "schedule" && $CI_COMMIT_REF_PROTECTED == "true"' - when: never .rules_protected_tag: rules: &rules_protected_tag - if: '$CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED == "true"' - when: never .rules_protected_tag_manual: rules: &rules_protected_tag_manual - if: '$CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED == "true"' when: manual - when: never stages: - build - gitlab_release before_script: - export JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64 Loading @@ -20,3 +44,72 @@ build: artifacts: paths: - opentasks/build/outputs/apk/ init_submodules: stage: gitlab_release rules: *rules_protected_ref 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: *rules_protected_ref needs: - job: init_submodules - job: build script: - | ./systemAppsUpdateInfo/scripts/generate-apks.sh \ "$APK_PATH" "$UNSIGNED_APK" "$COMMUNITY_APK" "$OFFICIAL_APK" "$TEST_APK" artifacts: paths: - $APK_PATH/$UNSIGNED_APK - $APK_PATH/$COMMUNITY_APK - $APK_PATH/$OFFICIAL_APK - $APK_PATH/$TEST_APK create-json-files: stage: gitlab_release rules: *rules_protected_tag needs: - job: init_submodules - job: generate-apks script: - | ./systemAppsUpdateInfo/scripts/create-json-files.sh \ "$APK_PATH" "$UNSIGNED_APK" "$COMMUNITY_APK" "$OFFICIAL_APK" "$TEST_APK" artifacts: paths: - community.json - official.json - test.json create-test-release: stage: gitlab_release rules: *rules_protected_tag_manual needs: - job: init_submodules - job: create-json-files artifacts: false script: - | ./systemAppsUpdateInfo/scripts/create-test-release.sh \ "$APK_PATH" "$TEST_APK" allow_failure: true create-release: stage: gitlab_release rules: *rules_protected_tag_manual needs: - job: init_submodules - job: create-json-files artifacts: false script: - | ./systemAppsUpdateInfo/scripts/create-release.sh \ "$APK_PATH" "$UNSIGNED_APK" "$COMMUNITY_APK" "$OFFICIAL_APK" allow_failure: true
opentasks-provider/src/main/java/org/dmfs/provider/tasks/TaskProviderBroadcastReceiver.java +1 −1 Original line number Diff line number Diff line Loading @@ -52,7 +52,7 @@ public class TaskProviderBroadcastReceiver extends BroadcastReceiver { alarmIntent.setAction(ACTION_NOTIFICATION_ALARM); PendingIntent pendingIntent = PendingIntent.getBroadcast(context, REQUEST_CODE_ALARM, alarmIntent, PendingIntent.FLAG_UPDATE_CURRENT); PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE); // cancel any previous alarm am.cancel(pendingIntent); Loading
opentasks/proguard.cfg +4 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,10 @@ -keep public class * extends android.preference.Preference -keep public class com.android.vending.licensing.ILicensingService # Keep Carrot templating engine -keep class au.com.codeka.carrot.** { *; } -keepclassmembers class au.com.codeka.carrot.** { *; } -keepclasseswithmembers class * { native <methods>; } Loading
opentasks/src/main/java/org/dmfs/tasks/StaleListBroadcastReceiver.java +11 −12 Original line number Diff line number Diff line Loading @@ -89,14 +89,13 @@ public final class StaleListBroadcastReceiver extends BroadcastReceiver { Resources.Theme theme = context.getTheme(); theme.applyStyle(context.getApplicationInfo().theme, true); nm.notify("stale_list_broadacast", 0, new Notification.Builder(context, "provider_messages") nm.notify("stale_list_broadacast", 0, new Notification.Builder(context, "provider_messages") .setContentText(notificationDescription) .setContentIntent(PendingIntent.getActivity(context, 0, accountRequestIntent, PendingIntent.FLAG_UPDATE_CURRENT)) PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE)) .addAction(new Notification.Action.Builder(null, "Grant", PendingIntent.getActivity(context, 0, accountRequestIntent, PendingIntent.FLAG_UPDATE_CURRENT)) PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE)) .build()) .setColor(new AttributeColor(theme, androidx.appcompat.R.attr.colorPrimary).argb()) .setColorized(true).setSmallIcon(org.dmfs.tasks.provider.R.drawable.ic_24_opentasks) Loading
opentasks/src/main/java/org/dmfs/tasks/actions/CancelDelayedAction.java +1 −1 Original line number Diff line number Diff line Loading @@ -49,6 +49,6 @@ public final class CancelDelayedAction implements TaskAction { ((AlarmManager) context.getSystemService(Context.ALARM_SERVICE)) .cancel(PendingIntent.getBroadcast(context, (int) ContentUris.parseId(taskUri), new Intent(context, ActionReceiver.class).setAction(mAction).setData(taskUri), PendingIntent.FLAG_UPDATE_CURRENT)); PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE)); } }