AntiFeatures:
  - UpstreamNonFree
Categories:
  - Internet
License: Apache-2.0
WebSite: https://about.mattermost.com/
SourceCode: https://github.com/mattermost/mattermost-mobile
IssueTracker: https://github.com/mattermost/mattermost-mobile/issues

AutoName: Mattermost Beta

RepoType: git
Repo: https://github.com/mattermost/mattermost-mobile.git

Builds:
  - versionName: 1.15.2
    versionCode: 170
    disable: JavaScript heap out of memory
    commit: v1.15.2
    subdir: android/app
    sudo:
      - apt-get update || apt-get update
      - apt-get install -y --no-install-recommends -t stretch-backports npm
    init:
      - sed -i -e '/react-native-youtube/d' ../../package.json build.gradle ../settings.gradle
        ../../app/components/post_body_additional_content/post_body_additional_content.js
      - make -C ../.. pre-run
    gradle:
      - yes
    rm:
      - node_modules/react-native-notifications/android/src/main/java/com/wix/reactnativenotifications/gcm/
      - node_modules/sc-uws/*.node
      - node_modules/sc-uws/build/
      - node_modules/xdate/build/compiler.jar
    prebuild:
      - sed -i -e '/play-services-gcm/,+2d' build.gradle
      - sed -i -e '/ReactNativeYouTube/d' src/main/java/com/mattermost/rnbeta/MainApplication.java
      - sed -i -e '/com.google.android.gms.iid.InstanceID.getInstance/d' ../../node_modules/react-native-device-info/android/src/main/java/com/learnium/RNDeviceInfo/RNDeviceModule.java
      - sed -i -e '/play-services/d' ../../node_modules/react-native-device-info/android/build.gradle
        ../../node_modules/react-native-notifications/android/build.gradle
      - sed -i -e '/hasPermission/d' -e '/tokenFetchIntent/d' -e '/GcmInstance/d'
        ../../node_modules/react-native-notifications/android/src/main/java/com/wix/reactnativenotifications/RNNotificationsModule.java
      - sed -i -e '/maven {/,+2d' ../../node_modules/react-native-document-picker/android/build.gradle
      - truncate -s 0 ../../node_modules/react-native/local-cli/server/util/external/xsel
    scanignore:
      - android/build.gradle
      - node_modules/react-native-svg/android/build.gradle
      - node_modules/react-native-navigation/android/build.gradle
      - node_modules/react-native-image-picker/android/build.gradle
    scandelete:
      - node_modules

  - versionName: 1.16.0
    versionCode: 175
    disable: JavaScript heap out of memory
    commit: v1.16.0
    subdir: android/app
    sudo:
      - apt-get update || apt-get update
      - apt-get install -y --no-install-recommends -t stretch-backports npm
    init:
      - sed -i -e '/react-native-youtube/d' ../../package.json build.gradle ../settings.gradle
        ../../app/components/post_body_additional_content/post_body_additional_content.js
      - make -C ../.. pre-run
    gradle:
      - yes
    rm:
      - node_modules/react-native-notifications/android/src/main/java/com/wix/reactnativenotifications/gcm/
      - node_modules/sc-uws/*.node
      - node_modules/sc-uws/build/
      - node_modules/xdate/build/compiler.jar
    prebuild:
      - sed -i -e '/play-services-gcm/,+2d' build.gradle
      - sed -i -e '/ReactNativeYouTube/d' src/main/java/com/mattermost/rnbeta/MainApplication.java
      - sed -i -e '/com.google.android.gms.iid.InstanceID.getInstance/d' ../../node_modules/react-native-device-info/android/src/main/java/com/learnium/RNDeviceInfo/RNDeviceModule.java
      - sed -i -e '/play-services/d' ../../node_modules/react-native-device-info/android/build.gradle
        ../../node_modules/react-native-notifications/android/build.gradle
      - sed -i -e '/hasPermission/d' -e '/tokenFetchIntent/d' -e '/GcmInstance/d'
        ../../node_modules/react-native-notifications/android/src/main/java/com/wix/reactnativenotifications/RNNotificationsModule.java
      - sed -i -e '/maven {/,+2d' ../../node_modules/react-native-document-picker/android/build.gradle
      - truncate -s 0 ../../node_modules/react-native/local-cli/server/util/external/xsel
    scanignore:
      - android/build.gradle
      - node_modules/react-native-svg/android/build.gradle
      - node_modules/react-native-navigation/android/build.gradle
      - node_modules/react-native-image-picker/android/build.gradle
    scandelete:
      - node_modules

  - versionName: 1.16.1
    versionCode: 176
    disable: JavaScript heap out of memory
    commit: v1.16.1
    subdir: android/app
    sudo:
      - apt-get update || apt-get update
      - apt-get install -y --no-install-recommends -t stretch-backports npm
    init:
      - sed -i -e '/react-native-youtube/d' ../../package.json build.gradle ../settings.gradle
        ../../app/components/post_body_additional_content/post_body_additional_content.js
      - make -C ../.. pre-run
    gradle:
      - yes
    rm:
      - node_modules/react-native-notifications/android/src/main/java/com/wix/reactnativenotifications/gcm/
      - node_modules/sc-uws/*.node
      - node_modules/sc-uws/build/
      - node_modules/xdate/build/compiler.jar
    prebuild:
      - sed -i -e '/play-services-gcm/,+2d' build.gradle
      - sed -i -e '/ReactNativeYouTube/d' src/main/java/com/mattermost/rnbeta/MainApplication.java
      - sed -i -e '/com.google.android.gms.iid.InstanceID.getInstance/d' ../../node_modules/react-native-device-info/android/src/main/java/com/learnium/RNDeviceInfo/RNDeviceModule.java
      - sed -i -e '/play-services/d' ../../node_modules/react-native-device-info/android/build.gradle
        ../../node_modules/react-native-notifications/android/build.gradle
      - sed -i -e '/hasPermission/d' -e '/tokenFetchIntent/d' -e '/GcmInstance/d'
        ../../node_modules/react-native-notifications/android/src/main/java/com/wix/reactnativenotifications/RNNotificationsModule.java
      - sed -i -e '/maven {/,+2d' ../../node_modules/react-native-document-picker/android/build.gradle
      - truncate -s 0 ../../node_modules/react-native/local-cli/server/util/external/xsel
    scanignore:
      - android/build.gradle
      - node_modules/react-native-svg/android/build.gradle
      - node_modules/react-native-navigation/android/build.gradle
      - node_modules/react-native-image-picker/android/build.gradle
    scandelete:
      - node_modules

  - versionName: 1.17.0
    versionCode: 182
    disable: watch ENOSPC
    commit: v1.17.0
    subdir: android/app
    sudo:
      - apt-get update || apt-get update
      - apt-get install -y --no-install-recommends -t stretch-backports npm
    init:
      - sed -i -e '/react-native-youtube/d' ../../package.json build.gradle ../settings.gradle
        ../../app/components/post_body_additional_content/post_body_additional_content.js
      - make -C ../.. pre-run
    gradle:
      - yes
    rm:
      - node_modules/react-native-notifications/android/src/main/java/com/wix/reactnativenotifications/gcm/
      - node_modules/sc-uws/*.node
      - node_modules/sc-uws/build/
      - node_modules/xdate/build/compiler.jar
      - node_modules/react-native-video/android-exoplayer/build/
      - node_modules/socketcluster/
      - node_modules/shaka-player/third_party/closure/compiler.jar
      - node_modules/.bin/socketcluster
    prebuild:
      - sed -i -e '/play-services-gcm/,+2d' build.gradle
      - sed -i -e '/ReactNativeYouTube/d' src/main/java/com/mattermost/rnbeta/MainApplication.java
      - sed -i -e '/com.google.android.gms.iid.InstanceID.getInstance/d' ../../node_modules/react-native-device-info/android/src/main/java/com/learnium/RNDeviceInfo/RNDeviceModule.java
      - sed -i -e '/play-services/d' ../../node_modules/react-native-device-info/android/build.gradle
      - sed -i -e '/firebase/d' ../../node_modules/react-native-notifications/android/build.gradle
        build.gradle
      - sed -i -e '/hasPermission/d' -e '/tokenFetchIntent/d' -e '/FcmInstance/d'
        -e '/FirebaseApp/'d ../../node_modules/react-native-notifications/android/src/main/java/com/wix/reactnativenotifications/RNNotificationsModule.java
        ../../node_modules/react-native-notifications/android/src/main/java/com/wix/reactnativenotifications/RNNotificationsPackage.java
      - sed -i -e '/maven {/,+2d' ../../node_modules/react-native-document-picker/android/build.gradle
      - truncate -s 0 ../../node_modules/react-native/local-cli/server/util/external/xsel
    scanignore:
      - android/build.gradle
      - node_modules/react-native-svg/android/build.gradle
      - node_modules/react-native-navigation/android/build.gradle
      - node_modules/react-native-image-picker/android/build.gradle
      - node_modules/react-native-webview/android/build.gradle
    scandelete:
      - node_modules

  - versionName: 1.18.0
    versionCode: 186
    disable: watch ENOSPC
    commit: v1.18.0
    subdir: android/app
    sudo:
      - apt-get update || apt-get update
      - apt-get install -y --no-install-recommends -t stretch-backports npm
    init:
      - sed -i -e '/react-native-youtube/d' ../../package.json build.gradle ../settings.gradle
        ../../app/components/post_body_additional_content/post_body_additional_content.js
      - make -C ../.. pre-run
    gradle:
      - yes
    rm:
      - node_modules/react-native-notifications/android/src/main/java/com/wix/reactnativenotifications/gcm/
      - node_modules/sc-uws/*.node
      - node_modules/sc-uws/build/
      - node_modules/xdate/build/compiler.jar
      - node_modules/react-native-video/android-exoplayer/build/
      - node_modules/socketcluster/
      - node_modules/shaka-player/third_party/closure/compiler.jar
      - node_modules/.bin/socketcluster
    prebuild:
      - sed -i -e '/play-services-gcm/,+2d' build.gradle
      - sed -i -e '/ReactNativeYouTube/d' src/main/java/com/mattermost/rnbeta/MainApplication.java
      - sed -i -e '/com.google.android.gms.iid.InstanceID.getInstance/d' ../../node_modules/react-native-device-info/android/src/main/java/com/learnium/RNDeviceInfo/RNDeviceModule.java
      - sed -i -e '/play-services/d' ../../node_modules/react-native-device-info/android/build.gradle
      - sed -i -e '/firebase/d' ../../node_modules/react-native-notifications/android/build.gradle
        build.gradle
      - sed -i -e '/hasPermission/d' -e '/tokenFetchIntent/d' -e '/FcmInstance/d'
        -e '/FirebaseApp/'d ../../node_modules/react-native-notifications/android/src/main/java/com/wix/reactnativenotifications/RNNotificationsModule.java
        ../../node_modules/react-native-notifications/android/src/main/java/com/wix/reactnativenotifications/RNNotificationsPackage.java
      - sed -i -e '/maven {/,+2d' ../../node_modules/react-native-document-picker/android/build.gradle
      - truncate -s 0 ../../node_modules/react-native/local-cli/server/util/external/xsel
    scanignore:
      - android/build.gradle
      - node_modules/react-native-svg/android/build.gradle
      - node_modules/react-native-navigation/android/build.gradle
      - node_modules/react-native-image-picker/android/build.gradle
      - node_modules/react-native-webview/android/build.gradle
    scandelete:
      - node_modules

  - versionName: 1.18.1
    versionCode: 187
    disable: JavaScript heap out of memory
    commit: v1.18.1
    subdir: android/app
    sudo:
      - sysctl fs.inotify.max_user_watches=524288
      - sysctl -p
      - apt-get update || apt-get update
      - apt-get install -y --no-install-recommends -t stretch-backports npm
    init:
      - sed -i -e '/react-native-youtube/d' ../../package.json build.gradle ../settings.gradle
        ../../app/components/post_body_additional_content/post_body_additional_content.js
      - make -C ../.. pre-run
    gradle:
      - yes
    rm:
      - node_modules/react-native-notifications/android/src/main/java/com/wix/reactnativenotifications/gcm/
      - node_modules/sc-uws/*.node
      - node_modules/sc-uws/build/
      - node_modules/xdate/build/compiler.jar
      - node_modules/react-native-video/android-exoplayer/build/
      - node_modules/socketcluster/
      - node_modules/shaka-player/third_party/closure/compiler.jar
      - node_modules/.bin/socketcluster
    prebuild:
      - sed -i -e '/play-services-gcm/,+2d' build.gradle
      - sed -i -e '/ReactNativeYouTube/d' src/main/java/com/mattermost/rnbeta/MainApplication.java
      - sed -i -e '/com.google.android.gms.iid.InstanceID.getInstance/d' ../../node_modules/react-native-device-info/android/src/main/java/com/learnium/RNDeviceInfo/RNDeviceModule.java
      - sed -i -e '/play-services/d' ../../node_modules/react-native-device-info/android/build.gradle
      - sed -i -e '/firebase/d' ../../node_modules/react-native-notifications/android/build.gradle
        build.gradle
      - sed -i -e '/hasPermission/d' -e '/tokenFetchIntent/d' -e '/FcmInstance/d'
        -e '/FirebaseApp/'d ../../node_modules/react-native-notifications/android/src/main/java/com/wix/reactnativenotifications/RNNotificationsModule.java
        ../../node_modules/react-native-notifications/android/src/main/java/com/wix/reactnativenotifications/RNNotificationsPackage.java
      - sed -i -e '/maven {/,+2d' ../../node_modules/react-native-document-picker/android/build.gradle
      - truncate -s 0 ../../node_modules/react-native/local-cli/server/util/external/xsel
    scanignore:
      - android/build.gradle
      - node_modules/react-native-svg/android/build.gradle
      - node_modules/react-native-navigation/android/build.gradle
      - node_modules/react-native-image-picker/android/build.gradle
      - node_modules/react-native-webview/android/build.gradle
    scandelete:
      - node_modules

  - versionName: 1.19.0
    versionCode: 193
    commit: v1.19.0
    subdir: android/app
    sudo:
      - sysctl fs.inotify.max_user_watches=524288
      - sysctl -p
      - apt-get update || apt-get update
      - apt-get install -y --no-install-recommends -t stretch-backports npm
    init:
      - sed -i -e '/react-native-youtube/d' ../../package.json build.gradle ../settings.gradle
        ../../app/components/post_body_additional_content/post_body_additional_content.js
      - make -C ../.. pre-run
    gradle:
      - yes
    rm:
      - node_modules/react-native-notifications/android/src/main/java/com/wix/reactnativenotifications/gcm/
      - node_modules/sc-uws/*.node
      - node_modules/sc-uws/build/
      - node_modules/xdate/build/compiler.jar
      - node_modules/react-native-video/android-exoplayer/build/
      - node_modules/socketcluster/
      - node_modules/shaka-player/third_party/closure/compiler.jar
      - node_modules/.bin/socketcluster
    prebuild:
      - "sed -i -e '/play-services-gcm/,+2d' -e 's/bundleCommand: \"ram-bundle\",/bundleCommand:\
        \ \"ram-bundle\", nodeExecutableAndArgs: [\"node\", \"--max-old-space-size=12000\"\
        ],/' build.gradle"
      - sed -i -e '/ReactNativeYouTube/d' src/main/java/com/mattermost/rnbeta/MainApplication.java
      - sed -i -e '/com.google.android.gms.iid.InstanceID.getInstance/d' ../../node_modules/react-native-device-info/android/src/main/java/com/learnium/RNDeviceInfo/RNDeviceModule.java
      - sed -i -e '/play-services/d' ../../node_modules/react-native-device-info/android/build.gradle
      - sed -i -e '/firebase/d' ../../node_modules/react-native-notifications/android/build.gradle
        build.gradle
      - sed -i -e '/hasPermission/d' -e '/tokenFetchIntent/d' -e '/FcmInstance/d'
        -e '/FirebaseApp/'d ../../node_modules/react-native-notifications/android/src/main/java/com/wix/reactnativenotifications/RNNotificationsModule.java
        ../../node_modules/react-native-notifications/android/src/main/java/com/wix/reactnativenotifications/RNNotificationsPackage.java
      - sed -i -e '/maven {/,+2d' ../../node_modules/react-native-document-picker/android/build.gradle
      - truncate -s 0 ../../node_modules/react-native/local-cli/server/util/external/xsel
    scanignore:
      - android/build.gradle
      - node_modules/react-native-svg/android/build.gradle
      - node_modules/react-native-navigation/android/build.gradle
      - node_modules/react-native-image-picker/android/build.gradle
      - node_modules/react-native-webview/android/build.gradle
    scandelete:
      - node_modules

  - versionName: 1.24.0
    versionCode: 239
    disable: fails to build
    commit: v1.24.0
    subdir: android/app
    sudo:
      - sysctl fs.inotify.max_user_watches=524288
      - sysctl -p
      - apt-get update || apt-get update
      - apt-get install -y --no-install-recommends -t stretch-backports npm
    init:
      - sed -i -e '/react-native-youtube/d' ../../package.json build.gradle ../settings.gradle
        ../../app/components/post_body_additional_content/post_body_additional_content.js
      - make -C ../.. pre-run
    gradle:
      - yes
    rm:
      - node_modules/react-native-notifications/android/src/main/java/com/wix/reactnativenotifications/gcm/
      - node_modules/xdate/build/compiler.jar
      - node_modules/react-native-video/android-exoplayer/build/
      - node_modules/socketcluster/
      - node_modules/shaka-player/third_party/closure/compiler.jar
      - node_modules/.bin/socketcluster
    prebuild:
      - "sed -i -e '/play-services-gcm/,+2d' -e 's/bundleCommand: \"ram-bundle\",/bundleCommand:\
        \ \"ram-bundle\", nodeExecutableAndArgs: [\"node\", \"--max-old-space-size=12000\"\
        ],/' build.gradle"
      - sed -i -e '/ReactNativeYouTube/d' src/main/java/com/mattermost/rnbeta/MainApplication.java
      - sed -i -e '/com.google.android.gms.iid.InstanceID.getInstance/d' ../../node_modules/react-native-device-info/android/src/main/java/com/learnium/RNDeviceInfo/RNDeviceModule.java
      - sed -i -e '/play-services/d' ../../node_modules/react-native-device-info/android/build.gradle
      - sed -i -e '/firebase/d' ../../node_modules/react-native-notifications/android/build.gradle
        build.gradle
      - sed -i -e '/hasPermission/d' -e '/tokenFetchIntent/d' -e '/FcmInstance/d'
        -e '/FirebaseApp/'d ../../node_modules/react-native-notifications/android/src/main/java/com/wix/reactnativenotifications/RNNotificationsModule.java
        ../../node_modules/react-native-notifications/android/src/main/java/com/wix/reactnativenotifications/RNNotificationsPackage.java
      - sed -i -e '/maven {/,+2d' ../../node_modules/react-native-document-picker/android/build.gradle
      - truncate -s 0 ../../node_modules/@react-native-community/cli/build/commands/server/external/xsel
    scanignore:
      - android/build.gradle
      - node_modules/react-native-svg/android/build.gradle
      - node_modules/react-native-image-picker/android/build.gradle
      - node_modules/react-native-webview/android/build.gradle
    scandelete:
      - node_modules

MaintainerNotes: |-
    sed is used to:
    * Remove push notifications (see [https://github.com/wix/react-native-notifications/issues/207 this issue])
    * Remove the native Youtube player (see [https://github.com/inProgress-team/react-native-youtube/issues/288 this issue])
    * Remove Play Services from Device Information (see [https://github.com/rebeccahughes/react-native-device-info/issues/381 this issue])

    scanignore is used to allow the "node_modules/react-native/android" local Maven repository.

AutoUpdateMode: Version v%v
UpdateCheckMode: Tags
CurrentVersion: 1.24.0
CurrentVersionCode: 239
