Skip to content

Commit

Permalink
remove realm
Browse files Browse the repository at this point in the history
Signed-off-by: yenda <eric@status.im>
  • Loading branch information
yenda committed Sep 9, 2019
1 parent 172038b commit c3dd950
Show file tree
Hide file tree
Showing 80 changed files with 1,491 additions and 9,153 deletions.
4 changes: 0 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,6 @@ nix-add-gcroots: export TARGET_OS := none
nix-add-gcroots: ##@nix Add Nix GC roots to avoid status-react expressions being garbage collected
scripts/add-nix-gcroots.sh

nix-update-npm: export TARGET_OS := none
nix-update-npm: ##@nix Update node2nix expressions based on current package.json
nix/desktop/realm-node/generate-nix.sh

nix-update-gradle: ##@nix Update maven nix expressions based on current gradle setup
nix/mobile/android/maven-and-npm-deps/maven/generate-nix.sh

Expand Down
2 changes: 0 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,6 @@ dependencies {
implementation project(':react-native-splash-screen')
implementation project(':react-native-image-resizer')
implementation project(':react-native-dialogs')
implementation project(':realm')
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
// Force using exact RN version instead of relying on gradle dependency resolution
Expand Down Expand Up @@ -298,7 +297,6 @@ dependencies {
implementation project(':react-native-keychain')

compile 'com.github.status-im:function:0.0.1'
implementation fileTree(dir: "node_modules/realm/android/libs", include: ["*.jar"])
implementation 'com.facebook.fresco:animated-gif:1.10.0'
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
import io.invertase.firebase.RNFirebasePackage;
import io.invertase.firebase.messaging.RNFirebaseMessagingPackage;
import io.invertase.firebase.notifications.RNFirebaseNotificationsPackage;
import io.realm.react.RealmReactPackage;
import me.alwx.HttpServer.HttpServerReactPackage;
import com.chirag.RNMail.*;
import com.clipsub.RNShake.RNShakeEventPackage;
Expand Down Expand Up @@ -67,7 +66,6 @@ protected List<ReactPackage> getPackages() {
new SplashScreenReactPackage(),
statusPackage,
new RNStatusKeycardPackage(),
new RealmReactPackage(),
new RNLanguagesPackage(),
new RNCameraPackage(),
new RNFSPackage(),
Expand Down
2 changes: 0 additions & 2 deletions android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ include ':react-native-dialogs'
project(':react-native-dialogs').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-dialogs/android')
include ':react-native-languages'
project(':react-native-languages').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-languages/android')
include ':realm'
project(':realm').projectDir = new File(rootProject.projectDir, '../node_modules/realm/android')
include ':react-native-status'
project(':react-native-status').projectDir = new File(rootProject.projectDir, '../modules/react-native-status/android')
include ':react-native-camera'
Expand Down
1 change: 0 additions & 1 deletion ci/Jenkinsfile.android
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ pipeline {
BUILD_ENV = 'prod'
NIX_CONF_DIR = "${env.WORKSPACE}/nix"
FASTLANE_DISABLE_COLORS = 1
REALM_DISABLE_ANALYTICS = 1
/* since we are mounting it we need to specify location */
STATUS_RELEASE_STORE_FILE = '/home/jenkins/status-im.keystore'
/* We use EXECUTOR_NUMBER to avoid multiple instances clashing */
Expand Down
1 change: 0 additions & 1 deletion ci/Jenkinsfile.ios
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ pipeline {
TARGET_OS = 'ios'
NIX_CONF_DIR = "${env.WORKSPACE}/nix"
FASTLANE_DISABLE_COLORS = 1
REALM_DISABLE_ANALYTICS = 1
BUNDLE_PATH = "${HOME}/.bundle"
/* We use EXECUTOR_NUMBER to avoid multiple instances clashing */
LEIN_HOME = "/var/tmp/lein-${EXECUTOR_NUMBER}"
Expand Down
2 changes: 1 addition & 1 deletion ci/android.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def bundle() {
'STATUS_RELEASE_KEY_PASSWORD'
],
keep: [
'REALM_DISABLE_ANALYTICS', 'NDK_ABI_FILTERS',
'NDK_ABI_FILTERS',
'STATUS_RELEASE_STORE_FILE'
],
sbox: [
Expand Down
10 changes: 2 additions & 8 deletions clj-rn.conf.edn
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@

:figwheel-bridge "./figwheel-bridge.js"
;; JS modules
:js-modules ["realm"
"react-native-languages"
:js-modules ["react-native-languages"
"i18n-js"
"realm/react-native"
"dismissKeyboard"
"react-native-splash-screen"
"react-native-status"
Expand Down Expand Up @@ -40,7 +38,6 @@
"react-native/Libraries/vendor/emitter/EventEmitter"
"react-native-background-timer"
"react-native-fetch-polyfill"
"text-encoding"
"js-sha3"
"react-navigation"
"react-native-navigation-twopane"
Expand All @@ -49,10 +46,8 @@
"react-native-shake"
"@react-native-community/netinfo"]
;; Desktop modules
:desktop-modules ["realm"
"react-native-languages"
:desktop-modules ["react-native-languages"
"i18n-js"
"realm/react-native"
"dismissKeyboard"
"react-native-splash-screen"
"react-native-status"
Expand Down Expand Up @@ -81,7 +76,6 @@
"react-native-desktop-config"
"react-native-desktop-shortcuts"
"react-native-desktop-notification"
"text-encoding"
"js-sha3"
"web3-utils"
"react-navigation"
Expand Down
16 changes: 0 additions & 16 deletions desktop/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,20 +218,6 @@ QString getDataStoragePath() {
return dataStoragePath;
}

void renameRealmDirs() {
QDir dataDir(getDataStoragePath());

if (dataDir.exists("default.realmaccounts")) {
dataDir.mkdir("default.realm");
dataDir.rename("default.realmaccounts", "default.realm/accounts");
dataDir.rename("default.realmdefault.realm", "default.realm/default.realm");
dataDir.rename("default.realmdefault.realm.lock", "default.realm/default.realm.lock");
dataDir.rename("default.realmdefault.realm.management", "default.realm/default.realm.management");
dataDir.rename("default.realmdefault.realm.note", "default.realm/default.realm.note");
}
}


int main(int argc, char **argv) {
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QApplication app(argc, argv);
Expand All @@ -251,7 +237,6 @@ int main(int argc, char **argv) {
dataStoragePath = "";
#endif

renameRealmDirs();
ExceptionGlobalHandler exceptionHandler(
appPath + QDir::separator() + CRASH_REPORT_EXECUTABLE,
exceptionPostHandledCallback, dataStoragePath);
Expand Down Expand Up @@ -438,7 +423,6 @@ bool runNodeJsServer() {
QStringList arguments = (QStringList() << "--port" << port);
g_nodeJsServerProcess->setArguments(arguments);
}
qputenv("REALM_DISABLE_ANALYTICS", "1");
QObject::connect(g_nodeJsServerProcess, &QProcess::errorOccurred,
[=](QProcess::ProcessError) {
qCWarning(JSSERVER) << "process name: "
Expand Down
6 changes: 1 addition & 5 deletions desktop_files/package.json.orig
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@
"i18n-js": "^3.1.0",
"identicon.js": "git+https://github.com/status-im/identicon.js.git#v1.2.1-status",
"js-sha3": "^0.8.0",
"qrcode": "^1.4.1",
"metro": "^0.48.1",
"metro-react-native-babel-preset": "0.45.6",
"nfc-react-native": "git+https://github.com/status-im/nfc-react-native.git#v0.3.8-status",
"qrcode": "^1.4.1",
"react": "16.6.1",
"react-dom": "16.4.2",
"react-native": "git+https://github.com/status-im/react-native-desktop.git#v0.57.8_10",
Expand All @@ -82,13 +82,9 @@
"react-native-os": "1.1.0",
"react-native-securerandom": "git+https://github.com/status-im/react-native-securerandom.git#0.1.1-2",
"react-native-splash-screen": "3.0.6",
"react-native-tcp": "3.3.0",
"react-native-udp": "2.2.1",
"react-native-webview-bridge": "git+https://github.com/status-im/react-native-webview-bridge.git#0.33.16-status-rn049-desktop",
"react-navigation": "^2.12.1",
"realm": "git+https://github.com/status-im/realm-js.git#v2.20.1",
"status-conan": "git+https://github.com/status-im/status-conan.git#v1.0.0",
"text-encoding": "^0.6.4",
"url": "0.10.3",
"web3": "git+https://github.com/status-im/web3.js.git#0.20.3-status.alpha.3",
"web3-utils": "1.0.0-beta.36"
Expand Down
Loading

0 comments on commit c3dd950

Please sign in to comment.