Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4b014eab authored by Mohammed Althaf T's avatar Mohammed Althaf T 😊
Browse files

Merge branch '3766-block-issue' into 'main'

Resolve Thread crash in Messages app

See merge request !82
parents 37241c21 eec1c417
Loading
Loading
Loading
Loading
Loading

.circleci/config.yml

deleted100644 → 0
+0 −85
Original line number Diff line number Diff line
version: 2

jobs:
  build:
    working_directory: ~/code
    docker:
      - image: cimg/android:2022.12.1
    steps:
      - checkout
      - restore_cache:
          key: jars-{{ checksum "build.gradle" }}-{{ checksum  "presentation/build.gradle" }}-{{ checksum  "data/build.gradle" }}-{{ checksum  "domain/build.gradle" }}
      - run:
          name: Download dependencies
          command: ./gradlew androidDependencies
      - save_cache:
          paths:
            - ~/.gradle
          key: jars-{{ checksum "build.gradle" }}-{{ checksum  "presentation/build.gradle" }}-{{ checksum  "data/build.gradle" }}-{{ checksum  "domain/build.gradle" }}
      - run:
          name: Decrypt and unzip secrets
          command: |
            openssl aes-256-cbc -d -in secrets.tar.enc -md sha1 -k ${SECRETS_KEY} -iv ${SECRETS_IV} >> secrets.tar
            tar xvf secrets.tar
      - run:
          name: Gradle build
          command: ./gradlew :presentation:assembleWithAnalyticsRelease :presentation:bundleWithAnalyticsRelease
      - run:
          name: Flatten outputs
          command: find presentation/build/outputs -mindepth 2 -type f -exec mv -i '{}' presentation/build/outputs/ ';'
      - store_artifacts:
          path: presentation/build/outputs
      - persist_to_workspace:
          root: presentation/build/outputs
          paths: .

  test:
    working_directory: ~/code
    docker:
      - image: cimg/android:2022.12.1
    steps:
      - checkout
      - restore_cache:
          key: jars-{{ checksum "build.gradle" }}-{{ checksum  "presentation/build.gradle" }}-{{ checksum  "data/build.gradle" }}-{{ checksum  "domain/build.gradle" }}
      - run:
          name: Download dependencies
          command: ./gradlew androidDependencies
      - save_cache:
          paths:
            - ~/.gradle
          key: jars-{{ checksum "build.gradle" }}-{{ checksum  "presentation/build.gradle" }}-{{ checksum  "data/build.gradle" }}-{{ checksum  "domain/build.gradle" }}
      - store_test_results:
          path: presentation/build/test-results

  deploy:
    docker:
      - image: cibuilds/github:0.10
    steps:
      - attach_workspace:
          at: presentation/build/outputs
      - run:
          name: "Publish Release on GitHub"
          command: ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} ${CIRCLE_TAG} presentation/build/outputs/

workflows:
  version: 2
  main:
    jobs:
      - build:
          filters:
            tags:
              only: /^v.*/
      - test:
          requires:
            - build
          filters:
            tags:
              only: /^v.*/
      - deploy:
          requires:
            - test
          filters:
            branches:
              ignore: /.*/
            tags:
              only: /^v.*/

.github/ISSUE_TEMPLATE.md

deleted100644 → 0
+0 −17
Original line number Diff line number Diff line
### DESCRIPTION
A short description of the issue. 
Example: Conversations aren't marked as read when they are opened from a notification.

### STEPS
1. Steps
2. to 
3. reproduce
4. the 
5. issue.

### EXPECTED
Describe the expected behaviour.

### OBSERVATIONS
Describe what happens instead of the expected behaviour.
+3 −2
Original line number Diff line number Diff line
image: "registry.gitlab.e.foundation/e/os/docker-android-apps-cicd:0-java11"
image: "registry.gitlab.e.foundation/e/os/docker-android-apps-cicd:latest"

stages:
  - update-from-upstream
  - build

before_script:
  - export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
  - export GRADLE_USER_HOME=$(pwd)/.gradle
  - chmod +x ./gradlew
  - ./gradlew clean

.travis.yml

deleted100644 → 0
+0 −98
Original line number Diff line number Diff line
language: android
jdk: oraclejdk8
sudo: false

notifications:
  email:
    on_success: change
    on_failure: change

env:
  global:
    - COMPILE_API_LEVEL=29
    - EMULATOR_API_LEVEL=24              # It seems emulator levels 25,26,27 from main repos have google_apis by default, and do not support armeabi-v7a. Check commit comment.
    - EMULATOR_TAG=default               # Possible values are default, google_apis, android-tv, android-wear, android-wear-cn
    - EMULATOR_ABI=armeabi-v7a           # Default is armeabi-v7a, possible options are: x86, x86_64, mips, arm64-v8a, armeabi-v7a. Note: check commit comment
    - EMULATOR_NAME=qksms3
    - ANDROID_BUILD_TOOLS_VERSION=29.0.2 # Match build-tools version used in build.gradle
    - EMULATOR="system-images;android-${EMULATOR_API_LEVEL};${EMULATOR_TAG};${EMULATOR_ABI}" # Used to install/create emulator

android:
  components:
    - tools
    - platform-tools
    - tools
    - extra

    # The build tools used in the project
    - build-tools-${ANDROID_BUILD_TOOLS_VERSION}

    # The SDK used in the project
    - android-${COMPILE_API_LEVEL}

    # For running the emulator in Travis
    - android-${EMULATOR_API_LEVEL}
    - sys-img-${EMULATOR_ABI}-android-${EMULATOR_API_LEVEL}

# Set up Android-sdk and the emulator
before_install:
  # Decrypt keystore and google-services.json
  - openssl aes-256-cbc -K $encrypted_4d1d940e2c65_key -iv $encrypted_4d1d940e2c65_iv -in secrets.tar.enc -out secrets.tar -d
  - tar xvf secrets.tar

  - echo 'count=0' > /home/travis/.android/repositories.cfg # Avoid warning
  - ls -lar $HOME/**/*

  # List and delete unnecessary components to free space
  - sdkmanager --list || true                                     # Print out package list for debug purposes
  - sdkmanager --uninstall "extras;google;google_play_services"
  - yes | sdkmanager "tools"                                      # Update tools
  - yes | sdkmanager "platforms;android-${EMULATOR_API_LEVEL}"    # Android platform required by emulator
  - yes | sdkmanager "platforms;android-${COMPILE_API_LEVEL}"     # Android platform required by compiler
  - yes | sdkmanager "build-tools;${ANDROID_BUILD_TOOLS_VERSION}" # Android build tools
  - yes | sdkmanager "${EMULATOR}"                                # Install emulator system image
  - sdkmanager --list || true                                     # Print out package list for debug purposes

# Run the emulator
install:
  # emulator instance
  - echo no | android create avd --force -n ${EMULATOR_NAME} -k "${EMULATOR}"
  # Run emulator in a subshell, this seems to solve the travis QT issue
  - ( cd "$(dirname "$(which emulator)")" && ./emulator -avd ${EMULATOR_NAME} -verbose -show-kernel -selinux permissive -no-audio -no-window -no-boot-anim -wipe-data & )
  - android-wait-for-emulator
  - adb shell settings put global window_animation_scale 0 &
  - adb shell settings put global transition_animation_scale 0 &
  - adb shell settings put global animator_duration_scale 0 &
  - sleep 30
  - adb shell input keyevent 82 &
  - adb devices

# Gradle setup
before_script:
  - cd ${TRAVIS_BUILD_DIR}
  - ./gradlew --version
  - ./gradlew clean

# Build APK
script:
  - |
    ./gradlew :presentation:assembleWithAnalyticsRelease :presentation:bundleWithAnalyticsRelease assembleAndroidTest -PtestCoverageEnabled='true'
    retval=$?
    if [$retval -ne 0]; then
      echo "error on assembling, exit code: "$retval
      exit $retval
    fi

# Deploy APK
deploy:
  provider: releases
  skip_cleanup: true
  overwrite: true
  api_key:
    secure: XF7V/I02gpyOzCAFXEFyrThXVUUnKjSaWQ8lppO50mVtdugimjWIPtHrcYASaJQf9INhqo0lamk+khPxtKxc1BSCp8o+c22UKcpczyjD4kK27a3zKfuNQWteBRjCH34vIGnrRFSHSWYLIgeuoIK3q5Lq4IBK/Od3mfpRaDt1ER+IqMzR3L205x1H8dW3MVuxXgdnq3jHlRpq86oOe293+dnblVCtWUvAzwhZPnnbBc4JUaNomMI7dLJ/pAigByCoHHmG9pc2Cky1yyWVAnTZFAlf2PbzPDLRRnXmHuYKfHxiZgd/l8JTiZdhky9cXgFoSxvJyDABRqqLxVNfXt2ZwgdtiulZml8RB1FB0L37qL72mxWgi6y9IbQgt/FG20K2QpSBglk0bCGLS+h5Yz3kV4fhsBY7llpWGw14BvlAx9sUfl3Ej+IUsWoJgA00TFNGDG8sMyOFoCQVz/sB4Dv4h+JfynJZcmm8okcfYrWBHOoHY7cH3chBWp/2A736f2A/aqnBd6z8a03toe2ILC9eSOiIhrVxPyqLmEKBD1rCduVFNteqGwm9G9YwKpvFibTqu0gqEtfF7cmuMH6M5PYExI5EzoewZTYmgp02+lBuFAEMvycVvXcu8VfeeT6cgeLlmz2hsbo93UfoSQyP+gSojMOOkVUsl6mIp1STLiJ5IRY=
  file:
    - /home/travis/build/moezbhatti/qksms/presentation/build/outputs/bundle/withAnalyticsRelease/presentation.aab
    - /home/travis/build/moezbhatti/qksms/presentation/build/outputs/apk/withAnalytics/release/presentation-withAnalytics-release.apk
  on:
    repo: moezbhatti/qksms
    tags: true
 No newline at end of file
+26 −6
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@ buildscript {
    ext.coroutines_version = '1.4.3'
    ext.dagger_version = "2.16"
    ext.espresso_version = '3.1.0-alpha3'
    ext.exoplayer_version = "2.8.1"
    ext.exoplayer_version = "2.8.3"
    ext.glide_version = "4.8.0"
    ext.junit_version = '4.12'
    ext.kotlin_version = '1.7.20'
@@ -35,9 +35,10 @@ buildscript {
    ext.timber_version = '4.5.1'

    repositories {
        maven { url 'https://maven.google.com' }
        jcenter()
        google()
        jcenter()
        mavenCentral()
        maven { url 'https://maven.google.com' }
    }

    dependencies {
@@ -53,15 +54,34 @@ allprojects {
    repositories {
        google()
        jcenter()
        mavenCentral()
        maven { url "https://jitpack.io" }
        maven { url 'https://gitlab.e.foundation/api/v4/groups/9/-/packages/maven'}
        maven { url 'https://maven.fabric.io/public' }
        maven { url 'https://maven.google.com' }
        maven {
            name 'glide-snapshot'
            url 'https://oss.sonatype.org/content/repositories/snapshots'
        }
        mavenCentral()
        // Liferay CDN repo for legacy deps
        maven {
            url 'https://repository-cdn.liferay.com/nexus/content/repositories/public/'
            content {
                includeGroup 'com.github.pengrad'
                includeGroup 'com.google.android.exoplayer'
                includeGroup 'io.realm'
                includeGroup 'com.google.android'
            }
        }
        // Legacy jcenter
        maven {
            url 'https://jcenter.bintray.com'
            content {
                includeGroup 'com.google.android'
                includeGroup 'com.callcontrol'
                includeGroup 'io.michaelrocks'
                includeGroup 'com.klinkerapps'
                includeGroup 'com.squareup.okhttp'
            }
        }
    }
}

Loading