Commit 3e1bb00a authored by Tiago Cunha's avatar Tiago Cunha

Removed unused Instabug and clean up

parent 70d0952f
...@@ -9,7 +9,6 @@ before_script: ...@@ -9,7 +9,6 @@ before_script:
- echo y | android update sdk --no-ui --all --filter extra-google-m2repository,extra-google-google_play_services - echo y | android update sdk --no-ui --all --filter extra-google-m2repository,extra-google-google_play_services
- echo y | android update sdk --no-ui --all --filter build-tools-25.0.2 - echo y | android update sdk --no-ui --all --filter build-tools-25.0.2
- ./gradlew dependencies - ./gradlew dependencies
- sed -i -e 's/minSdkVersion = 21/minSdkVersion = 17/g' dependencies.gradle
script: script:
- ./gradlew checkstyle findbugs pmd - ./gradlew checkstyle findbugs pmd
# UNDER HEAVY DEVELOPMENT for v1.0-beta
* rough design document is [here](https://github.com/RocketChat/Rocket.Chat.Android/blob/doc/README.md)
* Rocket.Chat.Android.Lily is moved to [deprecated_lily](https://github.com/RocketChat/Rocket.Chat.Android/tree/deprecated_lily) branch.
Contribution to [the issue with `v1.0-beta` without asignee](https://github.com/RocketChat/Rocket.Chat.Android/issues?utf8=%E2%9C%93&q=is%3Aopen%20is%3Aissue%20no%3Aassignee%20v1.0-beta) is very Welcome! :smile:
---
[![CircleCI](https://circleci.com/gh/RocketChat/Rocket.Chat.Android/tree/develop.svg?style=shield)](https://circleci.com/gh/RocketChat/Rocket.Chat.Android/tree/develop) [![Build Status](https://travis-ci.org/RocketChat/Rocket.Chat.Android.svg?branch=develop)](https://travis-ci.org/RocketChat/Rocket.Chat.Android) [![CircleCI](https://circleci.com/gh/RocketChat/Rocket.Chat.Android/tree/develop.svg?style=shield)](https://circleci.com/gh/RocketChat/Rocket.Chat.Android/tree/develop) [![Build Status](https://travis-ci.org/RocketChat/Rocket.Chat.Android.svg?branch=develop)](https://travis-ci.org/RocketChat/Rocket.Chat.Android)
# Rocket.Chat.Android # Rocket.Chat.Android
Rocket.Chat Native Android Application. Rocket.Chat Native Android Application.
![screenshots](https://cloud.githubusercontent.com/assets/11763113/21146109/e730ccce-c193-11e6-8b77-7812c1c1e219.png)
*Warning: This app is not production ready. It is under heavy development and any contributions are welcome.*
## How to build ## How to build
Retrolambda needs java8 to be installed on your system Retrolambda needs java8 to be installed on your system
...@@ -34,8 +20,4 @@ echo "sdk.dir="$ANDROID_HOME > local.properties ...@@ -34,8 +20,4 @@ echo "sdk.dir="$ANDROID_HOME > local.properties
## Bug report & Feature request ## Bug report & Feature request
Please report via instabug Please report via [GitHub issue](https://github.com/RocketChat/Rocket.Chat.Android/issues) :)
![Instabug](https://cloud.githubusercontent.com/assets/11763113/20717302/6b0918d2-b698-11e6-86f5-df25813f0158.png)
Of course, [GitHub issue](https://github.com/RocketChat/Rocket.Chat.Android/issues) is also available :)
...@@ -55,14 +55,6 @@ android { ...@@ -55,14 +55,6 @@ android {
signingConfig signingConfigs.release signingConfig signingConfigs.release
} }
} }
productFlavors {
qa {
// something - qa builds will have some extra stuff for alpha testers
}
prod {
// another
}
}
packagingOptions { packagingOptions {
exclude 'META-INF/LICENSE.txt' exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt' exclude 'META-INF/NOTICE.txt'
...@@ -102,9 +94,6 @@ dependencies { ...@@ -102,9 +94,6 @@ dependencies {
compile "com.android.support:appcompat-v7:$supportVersion" compile "com.android.support:appcompat-v7:$supportVersion"
compile "com.android.support:design:$supportVersion" compile "com.android.support:design:$supportVersion"
qaCompile('com.instabug.library:instabug:3.1.0') {
exclude group: 'io.reactivex'
}
compile 'com.android.support:multidex:1.0.1' compile 'com.android.support:multidex:1.0.1'
compile "com.google.firebase:firebase-core:$playLibVersion" compile "com.google.firebase:firebase-core:$playLibVersion"
......
...@@ -11,7 +11,6 @@ import chat.rocket.persistence.realm.RealmStore; ...@@ -11,7 +11,6 @@ import chat.rocket.persistence.realm.RealmStore;
import chat.rocket.android.service.ConnectivityManager; import chat.rocket.android.service.ConnectivityManager;
import chat.rocket.core.models.ServerInfo; import chat.rocket.core.models.ServerInfo;
import chat.rocket.android.widget.RocketChatWidgets; import chat.rocket.android.widget.RocketChatWidgets;
import chat.rocket.android.wrappers.InstabugWrapper;
import chat.rocket.persistence.realm.RocketChatPersistenceRealm; import chat.rocket.persistence.realm.RocketChatPersistenceRealm;
/** /**
...@@ -33,14 +32,9 @@ public class RocketChatApplication extends MultiDexApplication { ...@@ -33,14 +32,9 @@ public class RocketChatApplication extends MultiDexApplication {
RealmStore.put(serverInfo.getHostname()); RealmStore.put(serverInfo.getHostname());
} }
Stetho.initialize(Stetho.newInitializerBuilder(this) if (BuildConfig.DEBUG) {
.enableDumpapp(Stetho.defaultDumperPluginsProvider(this)) enableStetho();
.enableWebKitInspector(RealmInspectorModulesProvider.builder(this).build()) }
.build());
InstabugWrapper.build(this, getString(R.string.instabug_api_key));
//TODO: add periodic trigger for RocketChatService.keepAlive(this) here!
RocketChatWidgets.initialize(this, OkHttpHelper.getClientForDownloadFile(this)); RocketChatWidgets.initialize(this, OkHttpHelper.getClientForDownloadFile(this));
} }
...@@ -58,4 +52,11 @@ public class RocketChatApplication extends MultiDexApplication { ...@@ -58,4 +52,11 @@ public class RocketChatApplication extends MultiDexApplication {
.penaltyLog() .penaltyLog()
.build()); .build());
} }
private void enableStetho() {
Stetho.initialize(Stetho.newInitializerBuilder(this)
.enableDumpapp(Stetho.defaultDumperPluginsProvider(this))
.enableWebKitInspector(RealmInspectorModulesProvider.builder(this).build())
.build());
}
} }
...@@ -5,13 +5,10 @@ import android.support.annotation.IdRes; ...@@ -5,13 +5,10 @@ import android.support.annotation.IdRes;
import android.support.annotation.Nullable; import android.support.annotation.Nullable;
import android.support.v4.app.Fragment; import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentManager;
import android.view.MotionEvent;
import com.trello.rxlifecycle2.components.support.RxAppCompatActivity; import com.trello.rxlifecycle2.components.support.RxAppCompatActivity;
import chat.rocket.android.helper.OnBackPressListener; import chat.rocket.android.helper.OnBackPressListener;
import chat.rocket.android.log.RCLog;
import chat.rocket.android.wrappers.InstabugWrapper;
import icepick.Icepick; import icepick.Icepick;
abstract class AbstractFragmentActivity extends RxAppCompatActivity { abstract class AbstractFragmentActivity extends RxAppCompatActivity {
...@@ -72,14 +69,4 @@ abstract class AbstractFragmentActivity extends RxAppCompatActivity { ...@@ -72,14 +69,4 @@ abstract class AbstractFragmentActivity extends RxAppCompatActivity {
.addToBackStack(null) .addToBackStack(null)
.commit(); .commit();
} }
@Override
public boolean dispatchTouchEvent(MotionEvent event) {
try {
InstabugWrapper.trackTouchEventOnActivity(event, this);
} catch (IllegalStateException exception) {
RCLog.w(exception, "Instabug error (ignored)");
}
return super.dispatchTouchEvent(event);
}
} }
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="instabug_api_key">ac4314823dbb87263c76b22db0135727</string>
</resources>
\ No newline at end of file
package chat.rocket.android.wrappers;
import android.app.Activity;
import android.app.Application;
import android.view.MotionEvent;
public class InstabugWrapper {
public static void build(Application application, String apiKey) {
// stub
}
public static void trackTouchEventOnActivity(MotionEvent event, Activity activity) {
// stub
}
}
package chat.rocket.android.wrappers;
import android.app.Activity;
import android.app.Application;
import android.view.MotionEvent;
import com.instabug.library.Feature;
import com.instabug.library.Instabug;
import com.instabug.library.InstabugTrackingDelegate;
import com.instabug.library.invocation.InstabugInvocationEvent;
public class InstabugWrapper {
public static void build(Application application, String apiKey) {
new Instabug.Builder(application, apiKey)
.setInvocationEvent(InstabugInvocationEvent.FLOATING_BUTTON)
.setInAppMessagingState(Feature.State.DISABLED) //not available in Free plan...
.build();
}
public static void trackTouchEventOnActivity(MotionEvent event, Activity activity) {
InstabugTrackingDelegate.notifyActivityGotTouchEvent(event, activity);
}
}
...@@ -41,11 +41,11 @@ deployment: ...@@ -41,11 +41,11 @@ deployment:
tag: /v\d+\.\d+\.\d+(?!.)/ tag: /v\d+\.\d+\.\d+(?!.)/
owner: RocketChat owner: RocketChat
commands: commands:
- ./gradlew publishListingProdRelease - ./gradlew publishListingRelease
-Dorg.gradle.project.track=beta -Dorg.gradle.project.track=beta
alpha: alpha:
tag: /v\d+\.\d+\.\d+/ tag: /v\d+\.\d+\.\d+/
owner: RocketChat owner: RocketChat
commands: commands:
- ./gradlew publishListingQaRelease - ./gradlew publishListingRelease
-Dorg.gradle.pr oject.track=alpha -Dorg.gradle.pr oject.track=alpha
\ No newline at end of file
...@@ -40,7 +40,7 @@ task checkstyle(type: Checkstyle, group: 'Verification', description: 'Runs code ...@@ -40,7 +40,7 @@ task checkstyle(type: Checkstyle, group: 'Verification', description: 'Runs code
task findbugs(type: FindBugs, task findbugs(type: FindBugs,
group: 'Verification', group: 'Verification',
description: 'Inspect java bytecode for bugs', description: 'Inspect java bytecode for bugs',
dependsOn: ['compileQaDebugSources']) { dependsOn: ['compileDebugSources']) {
ignoreFailures = false ignoreFailures = false
effort = "max" effort = "max"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment