4.12.1 Rocket.Chat

This commit is contained in:
Djorkaeff Alexandre 2020-11-25 22:03:44 +00:00 committed by Licaon_Kter
parent c673caaf26
commit cba8038b5e
2 changed files with 195 additions and 4 deletions

View file

@ -193,10 +193,54 @@ Builds:
scandelete:
- node_modules
- versionName: 4.12.1
versionCode: 2143
commit: 4.12.1
subdir: android/app
sudo:
- sysctl fs.inotify.max_user_watches=524288
- curl -Lo node.tar.xz https://nodejs.org/dist/v10.18.1/node-v10.18.1-linux-x64.tar.xz
- echo "8cc40f45c2c62529b15e83a6bbe0ac1febf57af3c5720df68067c96c0fddbbdf node.tar.xz"
| sha256sum -c -
- tar xJf node.tar.xz
- cp -a node-v10.18.1-linux-x64/. /usr/local/
- npm -g install yarn
init: yarn install
patch:
- foss-build-2.patch
gradle:
- foss
rm:
- ios
prebuild: sed -E -i 's/VERSIONCODE*/$$VERCODE$$/' build.gradle
scanignore:
- android/build.gradle
- node_modules/jsc-android
- node_modules/hermes-engine
- node_modules/react-native/android/com/facebook/react/react-native/*/
- node_modules/react-native-appearance/android/build.gradle
- node_modules/react-native-bootsplash/android/build.gradle
- node_modules/react-native-device-info/android/build.gradle
- node_modules/react-native-jitsi-meet/android/build.gradle
- node_modules/react-native-localize/android/build.gradle
- node_modules/react-native-prompt-android/android/build.gradle
- node_modules/react-native-reanimated/android/build.gradle
- node_modules/react-native-safe-area-context/android/build.gradle
- node_modules/react-native-screens/android/build.gradle
- node_modules/react-native-vector-icons/android/build.gradle
- node_modules/react-native-webview/android/build.gradle
- node_modules/rn-root-view/android/build.gradle
- node_modules/@react-native-community/async-storage/android/build.gradle
- node_modules/@react-native-community/masked-view/android/build.gradle
- node_modules/@react-native-community/art/android/build.gradle
- node_modules/@react-native-community/cookies/android/build.gradle
scandelete:
- node_modules
MaintainerNotes: We use a Github repo as a Maven repository for a LIBRE_BUILD Jitsi
SDK, since Jitsi don't expose the LIBRE_BUILD on their Maven repository.
AutoUpdateMode: None
UpdateCheckMode: Tags
CurrentVersion: 4.11.0
CurrentVersionCode: 2137
AutoUpdateMode: Version %v
UpdateCheckMode: Tags \d+\.\d+\.\d+
CurrentVersion: 4.12.1
CurrentVersionCode: 2143

View file

@ -0,0 +1,147 @@
diff --git a/android/app/build.gradle b/android/app/build.gradle
index 2ed9d8163..0d690be0c 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -247,14 +247,14 @@ dependencies {
implementation project(':watermelondb')
implementation project(":reactnativekeyboardinput")
implementation project(':@react-native-community_viewpager')
- playImplementation project(':reactnativenotifications')
- playImplementation project(':@react-native-firebase_app')
- playImplementation project(':@react-native-firebase_analytics')
- playImplementation project(':@react-native-firebase_crashlytics')
+ // playImplementation project(':reactnativenotifications')
+ // playImplementation project(':@react-native-firebase_app')
+ // playImplementation project(':@react-native-firebase_analytics')
+ // playImplementation project(':@react-native-firebase_crashlytics')
implementation fileTree(dir: "libs", include: ["*.jar"])
//noinspection GradleDynamicVersion
implementation "com.facebook.react:react-native:+" // From node_modules
- playImplementation "com.google.firebase:firebase-messaging:18.0.0"
+ // playImplementation "com.google.firebase:firebase-messaging:18.0.0"
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
exclude group:'com.facebook.fbjni'
diff --git a/android/build.gradle b/android/build.gradle
index ae769e0c7..c1dbe393c 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -24,9 +24,9 @@ buildscript {
mavenLocal()
google()
jcenter()
- maven {
- url 'https://maven.fabric.io/public'
- }
+ // maven {
+ // url 'https://maven.fabric.io/public'
+ // }
}
dependencies {
diff --git a/android/settings.gradle b/android/settings.gradle
index ed2f78c10..3ddc4b5ed 100644
--- a/android/settings.gradle
+++ b/android/settings.gradle
@@ -4,17 +4,17 @@ includeUnimodulesProjects()
rootProject.name = 'RocketChatRN'
include ':watermelondb'
project(':watermelondb').projectDir = new File(rootProject.projectDir, '../node_modules/@nozbe/watermelondb/native/android')
-include ':reactnativenotifications'
-project(':reactnativenotifications').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-notifications/android/app')
+// include ':reactnativenotifications'
+// project(':reactnativenotifications').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-notifications/android/app')
include ':reactnativekeyboardinput'
project(':reactnativekeyboardinput').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-keyboard-input/lib/android')
include ':@react-native-community_viewpager'
project(':@react-native-community_viewpager').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/viewpager/android')
-include ':@react-native-firebase_app'
-project(':@react-native-firebase_app').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-firebase/app/android')
-include ':@react-native-firebase_analytics'
-project(':@react-native-firebase_analytics').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-firebase/analytics/android')
-include ':@react-native-firebase_crashlytics'
-project(':@react-native-firebase_crashlytics').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-firebase/crashlytics/android')
+// include ':@react-native-firebase_app'
+// project(':@react-native-firebase_app').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-firebase/app/android')
+// include ':@react-native-firebase_analytics'
+// project(':@react-native-firebase_analytics').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-firebase/analytics/android')
+// include ':@react-native-firebase_crashlytics'
+// project(':@react-native-firebase_crashlytics').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-firebase/crashlytics/android')
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
include ':app'
diff --git a/app/notifications/push/push.android.js b/app/notifications/push/push.android.js
index d83184594..5ba6a2ef7 100644
--- a/app/notifications/push/push.android.js
+++ b/app/notifications/push/push.android.js
@@ -1,4 +1,4 @@
-import { NotificationsAndroid, PendingNotifications } from 'react-native-notifications';
+const { NotificationsAndroid, PendingNotifications } = {};
class PushNotification {
constructor() {
@@ -6,11 +6,11 @@ class PushNotification {
this.onNotification = null;
this.deviceToken = null;
- NotificationsAndroid.setRegistrationTokenUpdateListener((deviceToken) => {
+ NotificationsAndroid?.setRegistrationTokenUpdateListener((deviceToken) => {
this.deviceToken = deviceToken;
});
- NotificationsAndroid.setNotificationOpenedListener((notification) => {
+ NotificationsAndroid?.setNotificationOpenedListener((notification) => {
this.onNotification(notification);
});
}
@@ -24,8 +24,8 @@ class PushNotification {
configure(params) {
this.onRegister = params.onRegister;
this.onNotification = params.onNotification;
- NotificationsAndroid.refreshToken();
- return PendingNotifications.getInitialNotification();
+ NotificationsAndroid?.refreshToken();
+ return PendingNotifications?.getInitialNotification();
}
}
diff --git a/app/utils/log/index.js b/app/utils/log/index.js
index da1be54a9..38be41872 100644
--- a/app/utils/log/index.js
+++ b/app/utils/log/index.js
@@ -1,17 +1,9 @@
-import firebaseAnalytics from '@react-native-firebase/analytics';
import { isFDroidBuild } from '../../constants/environment';
-import config from '../../../config';
import events from './events';
-const analytics = firebaseAnalytics || '';
-let bugsnag = '';
-let crashlytics;
-
-if (!isFDroidBuild) {
- const { Client } = require('bugsnag-react-native');
- crashlytics = require('@react-native-firebase/crashlytics').default;
- bugsnag = new Client(config.BUGSNAG_API_KEY);
-}
+const analytics = () => {};
+const crashlytics = () => {};
+const bugsnag = {};
export { analytics };
export const loggerConfig = bugsnag.config;
diff --git a/react-native.config.js b/react-native.config.js
index cbd0de1b6..56cbf0ff9 100644
--- a/react-native.config.js
+++ b/react-native.config.js
@@ -30,6 +30,11 @@ module.exports = {
platforms: {
android: null
}
+ },
+ 'bugsnag-react-native': {
+ platforms: {
+ android: null
+ }
}
}
};