Commit e302d26c authored by Leonardo Aramaki's avatar Leonardo Aramaki

Remove unused dependencies and update versions

parent fceaa63a
# -*- coding:utf-8 -*-
a='''
@Override
public void onOpen(WebSocket webSocket, Response response) {
}
@Override
public void onFailure(IOException e, Response response) {
}
@Override
public void onMessage(ResponseBody responseBody) throws IOException {
}
@Override
public void onPong(Buffer payload) {
}
@Override
public void onClose(int code, String reason) {
}
'''.strip().split('@Override')
for m in a[1:]:
m= " @Override\n "+m.strip()
mn = m.split("\n")[1].strip().split(" ")[2].split("(")[0]
if mn.startswith("on"):
d=dict()
d["classname"]=mn[2:]
params = [p for p in " ".join(m.split("\n")[1].strip()[:-1].split(" throws ")[0].split(" ")[2:]).strip()[len(mn)+1:-1].split(", ") if p.split(" ")[0]!="WebSocket"]
d["params"]="".join([", "+p for p in params])
paramnames = [p.split(" ")[-1] for p in params]
d["paramdefs"]="\n".join([" public "+p+";" for p in params])
d["thisis"]="\n".join([" this.{param} = {param};".format(param=p) for p in paramnames])
# print '''
# public static class {classname} extends Base {{
# {paramdefs}
# public {classname}(WebSocket websocket{params}) {{
# super("{classname}", websocket);
# {thisis}
# }}
# }}'''.format(**d)
######################
x=m.split("\n")
x[2]=''' mSubscriber.onNext(new RxWebSocketCallback.{classname}(mWebSocket, {params}));'''.format(classname=mn[2:],params=", ".join(paramnames))
print "\n".join(x)
...@@ -114,19 +114,16 @@ dependencies { ...@@ -114,19 +114,16 @@ dependencies {
compile extraDependencies.okHTTP compile extraDependencies.okHTTP
compile extraDependencies.rxJava compile extraDependencies.rxJava
compile extraDependencies.boltTask compile extraDependencies.boltTask
compile supportDependencies.multidex
compile supportDependencies.designSupportLibrary compile supportDependencies.designSupportLibrary
compile supportDependencies.annotation compile supportDependencies.annotation
compile supportDependencies.kotlin;
compile rxbindingDependencies.rxBinding compile rxbindingDependencies.rxBinding
compile rxbindingDependencies.rxBindingSupport compile rxbindingDependencies.rxBindingSupport
compile rxbindingDependencies.rxBindingAppcompact compile rxbindingDependencies.rxBindingAppcompact
compile 'com.android.support:multidex:1.0.2' compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$rootProject.ext.kotlinVersion"
compile "com.google.firebase:firebase-core:$playLibVersion" compile "com.google.firebase:firebase-core:$playLibVersion"
compile "com.google.firebase:firebase-crash:$playLibVersion" compile "com.google.firebase:firebase-crash:$playLibVersion"
compile "com.google.android.gms:play-services-gcm:$playLibVersion" compile "com.google.android.gms:play-services-gcm:$playLibVersion"
debugCompile "com.facebook.stetho:stetho:$stethoVersion"
debugCompile "com.facebook.stetho:stetho-okhttp3:$stethoOkhttp3Version"
debugCompile "com.uphyca:stetho_realm:$stethoRealmVersion"
compile "com.trello.rxlifecycle2:rxlifecycle:$rxlifecycleVersion" compile "com.trello.rxlifecycle2:rxlifecycle:$rxlifecycleVersion"
compile "com.trello.rxlifecycle2:rxlifecycle-android:$rxlifecycleVersion" compile "com.trello.rxlifecycle2:rxlifecycle-android:$rxlifecycleVersion"
compile "com.trello.rxlifecycle2:rxlifecycle-components:$rxlifecycleVersion" compile "com.trello.rxlifecycle2:rxlifecycle-components:$rxlifecycleVersion"
...@@ -138,23 +135,16 @@ dependencies { ...@@ -138,23 +135,16 @@ dependencies {
compile('com.crashlytics.sdk.android:crashlytics:2.6.8@aar') { compile('com.crashlytics.sdk.android:crashlytics:2.6.8@aar') {
transitive = true; transitive = true;
} }
debugCompile "com.facebook.stetho:stetho:$stethoVersion"
debugCompile "com.facebook.stetho:stetho-okhttp3:$stethoOkhttp3Version"
debugCompile "com.uphyca:stetho_realm:$stethoRealmVersion"
debugCompile "com.tspoon.traceur:traceur:1.0.1" debugCompile "com.tspoon.traceur:traceur:1.0.1"
compile 'com.aurelhubert:ahbottomnavigation:2.0.6'
compile('com.h6ah4i.android.widget.advrecyclerview:advrecyclerview:0.10.6@aar') {
transitive = true
}
compile 'com.github.JakeWharton:ViewPagerIndicator:2.4.1@aar'
compile 'com.jakewharton:butterknife:8.6.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.6.0'
compile 'com.jakewharton.timber:timber:4.5.1'
compile 'com.github.matrixxun:MaterialBadgeTextView:c5a27e8243'
compile 'com.github.chrisbanes:PhotoView:2.0.0'
testCompile 'junit:junit:4.12' testCompile 'junit:junit:4.12'
testCompile 'org.robolectric:robolectric:3.3' testCompile 'org.robolectric:robolectric:3.3'
testCompile "org.jetbrains.kotlin:kotlin-test:$rootProject.ext.kotlinVersion" testCompile "org.jetbrains.kotlin:kotlin-test:$rootProject.ext.kotlinVersion"
testCompile "org.jetbrains.kotlin:kotlin-test-junit:$rootProject.ext.kotlinVersion" testCompile "org.jetbrains.kotlin:kotlin-test-junit:$rootProject.ext.kotlinVersion"
testCompile "org.jetbrains.kotlin:kotlin-reflect:$rootProject.ext.kotlinVersion"
testCompile "com.nhaarman:mockito-kotlin:1.1.0" testCompile "com.nhaarman:mockito-kotlin:1.1.0"
testCompile 'org.amshove.kluent:kluent:1.14' testCompile 'org.amshove.kluent:kluent:1.14'
testCompile "org.jetbrains.kotlin:kotlin-reflect:$rootProject.ext.kotlinVersion"
} }
apply plugin: 'com.google.gms.google-services' apply plugin: 'com.google.gms.google-services'
...@@ -47,20 +47,23 @@ class RoomListFragment : Fragment(), RoomListContract.View { ...@@ -47,20 +47,23 @@ class RoomListFragment : Fragment(), RoomListContract.View {
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
activity.title = "" activity?.title = ""
actionId = arguments.getInt("actionId") val args = arguments
roomId = arguments.getString("roomId") args?.let {
roomType = arguments.getString("roomType") actionId = args.getInt("actionId")
hostname = arguments.getString("hostname") roomId = args.getString("roomId")
token = arguments.getString("token") roomType = args.getString("roomType")
userId = arguments.getString("userId") hostname = args.getString("hostname")
token = args.getString("token")
userId = args.getString("userId")
}
} }
override fun onCreateView(inflater: LayoutInflater?, container: ViewGroup?, savedInstanceState: Bundle?): View? = inflater?.inflate(R.layout.fragment_room_list, container, false) override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? = inflater.inflate(R.layout.fragment_room_list, container, false)
override fun onViewCreated(view: View?, savedInstanceState: Bundle?) { override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState) super.onViewCreated(view, savedInstanceState)
presenter = RoomListPresenter(context, this) presenter = RoomListPresenter(context!!, this)
} }
override fun onResume() { override fun onResume() {
...@@ -114,9 +117,9 @@ class RoomListFragment : Fragment(), RoomListContract.View { ...@@ -114,9 +117,9 @@ class RoomListFragment : Fragment(), RoomListContract.View {
} }
override fun showPinnedMessages(dataSet: ArrayList<Message>, total: String) { override fun showPinnedMessages(dataSet: ArrayList<Message>, total: String) {
activity.title = getString(R.string.fragment_room_list_pinned_message_title, total) activity?.title = getString(R.string.fragment_room_list_pinned_message_title, total)
if (recyclerView.adapter == null) { if (recyclerView.adapter == null) {
recyclerView.adapter = RoomMessagesAdapter(dataSet, hostname, context) recyclerView.adapter = RoomMessagesAdapter(dataSet, hostname, context!!)
val linearLayoutManager = LinearLayoutManager(context, LinearLayoutManager.VERTICAL, false) val linearLayoutManager = LinearLayoutManager(context, LinearLayoutManager.VERTICAL, false)
recyclerView.layoutManager = linearLayoutManager recyclerView.layoutManager = linearLayoutManager
if (dataSet.size >= 50) { if (dataSet.size >= 50) {
...@@ -132,9 +135,9 @@ class RoomListFragment : Fragment(), RoomListContract.View { ...@@ -132,9 +135,9 @@ class RoomListFragment : Fragment(), RoomListContract.View {
} }
override fun showFavoriteMessages(dataSet: ArrayList<Message>, total: String) { override fun showFavoriteMessages(dataSet: ArrayList<Message>, total: String) {
activity.title = getString(R.string.fragment_room_list_favorite_message_title, total) activity?.title = getString(R.string.fragment_room_list_favorite_message_title, total)
if (recyclerView.adapter == null) { if (recyclerView.adapter == null) {
recyclerView.adapter = RoomMessagesAdapter(dataSet, hostname, context) recyclerView.adapter = RoomMessagesAdapter(dataSet, hostname, context!!)
val linearLayoutManager = LinearLayoutManager(context, LinearLayoutManager.VERTICAL, false) val linearLayoutManager = LinearLayoutManager(context, LinearLayoutManager.VERTICAL, false)
recyclerView.layoutManager = linearLayoutManager recyclerView.layoutManager = linearLayoutManager
if (dataSet.size >= 50) { if (dataSet.size >= 50) {
...@@ -150,7 +153,7 @@ class RoomListFragment : Fragment(), RoomListContract.View { ...@@ -150,7 +153,7 @@ class RoomListFragment : Fragment(), RoomListContract.View {
} }
override fun showFileList(dataSet: ArrayList<Attachment>, total: String) { override fun showFileList(dataSet: ArrayList<Attachment>, total: String) {
activity.title = getString(R.string.fragment_room_list_file_list_title, total) activity?.title = getString(R.string.fragment_room_list_file_list_title, total)
if (recyclerView.adapter == null) { if (recyclerView.adapter == null) {
recyclerView.adapter = RoomFileListAdapter(dataSet) recyclerView.adapter = RoomFileListAdapter(dataSet)
val linearLayoutManager = LinearLayoutManager(context, LinearLayoutManager.VERTICAL, false) val linearLayoutManager = LinearLayoutManager(context, LinearLayoutManager.VERTICAL, false)
...@@ -168,9 +171,9 @@ class RoomListFragment : Fragment(), RoomListContract.View { ...@@ -168,9 +171,9 @@ class RoomListFragment : Fragment(), RoomListContract.View {
} }
override fun showMemberList(dataSet: ArrayList<User>, total: String) { override fun showMemberList(dataSet: ArrayList<User>, total: String) {
activity.title = getString(R.string.fragment_room_list_member_list_title, total) activity?.title = getString(R.string.fragment_room_list_member_list_title, total)
if (recyclerView.adapter == null) { if (recyclerView.adapter == null) {
recyclerView.adapter = RoomMemberListAdapter(dataSet, hostname, context) recyclerView.adapter = RoomMemberListAdapter(dataSet, hostname, context!!)
val linearLayoutManager = LinearLayoutManager(context, LinearLayoutManager.VERTICAL, false) val linearLayoutManager = LinearLayoutManager(context, LinearLayoutManager.VERTICAL, false)
recyclerView.layoutManager = linearLayoutManager recyclerView.layoutManager = linearLayoutManager
if (dataSet.size >= 50) { if (dataSet.size >= 50) {
......
...@@ -67,7 +67,7 @@ class PushManagerTest { ...@@ -67,7 +67,7 @@ class PushManagerTest {
on { getColor(any()) } doReturn 0 on { getColor(any()) } doReturn 0
on { getIdentifier( on { getIdentifier(
anyString(), anyString(), any()) } doReturn R.drawable.notification_background anyString(), anyString(), any()) } doReturn R.drawable.notification_icon_background
on { getConfiguration() } doReturn RuntimeEnvironment.application.resources.configuration on { getConfiguration() } doReturn RuntimeEnvironment.application.resources.configuration
} }
......
ext { ext {
preDexLibs = "true" != System.getenv("CI") preDexLibs = "true" != System.getenv("CI")
supportLibraryVersion = "25.4.0" supportLibraryVersion = "27.0.1"
constraintLayoutVersion = "1.0.2" constraintLayoutVersion = "1.0.2"
kotlinVersion = "1.1.51" kotlinVersion = "1.1.51"
okHttpVersion = "3.9.0" okHttpVersion = "3.9.0"
...@@ -9,16 +9,18 @@ ext { ...@@ -9,16 +9,18 @@ ext {
supportDependencies = [ supportDependencies = [
designSupportLibrary: "com.android.support:design:${supportLibraryVersion}", designSupportLibrary: "com.android.support:design:${supportLibraryVersion}",
annotation : "com.android.support:support-annotations:${supportLibraryVersion}", annotation : "com.android.support:support-annotations:${supportLibraryVersion}",
constrainLayout : "com.android.support.constraint:constraint-layout:${constraintLayoutVersion}", constraintLayout : "com.android.support.constraint:constraint-layout:${constraintLayoutVersion}",
kotlin : "org.jetbrains.kotlin:kotlin-stdlib-jre7:${kotlinVersion}",
cardView : "com.android.support:cardview-v7:${supportLibraryVersion}", cardView : "com.android.support:cardview-v7:${supportLibraryVersion}",
supportV13 : "com.android.support:support-v13:${supportLibraryVersion}",
multidex : "com.android.support:multidex:1.0.2"
] ]
extraDependencies = [ extraDependencies = [
okHTTP : "com.squareup.okhttp3:okhttp:${okHttpVersion}", okHTTP : "com.squareup.okhttp3:okhttp:${okHttpVersion}",
rxJava : "io.reactivex.rxjava2:rxjava:2.1.0", rxJava : "io.reactivex.rxjava2:rxjava:2.1.0",
boltTask : "com.parse.bolts:bolts-tasks:1.4.0", boltTask : "com.parse.bolts:bolts-tasks:1.4.0",
rxAndroid : "io.reactivex.rxjava2:rxandroid:2.0.1", rxAndroid : "io.reactivex.rxjava2:rxandroid:2.0.1",
textDrawable : "com.github.rocketchat:textdrawable:1.0.2" textDrawable : "com.github.rocketchat:textdrawable:1.0.2",
optional : "com.hadisatrio:Optional:v1.0.1"
] ]
rxbindingDependencies = [ rxbindingDependencies = [
rxBinding : "com.jakewharton.rxbinding2:rxbinding:${rxbindingVersion}", rxBinding : "com.jakewharton.rxbinding2:rxbinding:${rxbindingVersion}",
......
...@@ -36,13 +36,12 @@ dependencies { ...@@ -36,13 +36,12 @@ dependencies {
compile extraDependencies.boltTask compile extraDependencies.boltTask
compile supportDependencies.annotation compile supportDependencies.annotation
compile supportDependencies.designSupportLibrary compile supportDependencies.designSupportLibrary
compile supportDependencies.kotlin
compile extraDependencies.rxAndroid compile extraDependencies.rxAndroid
compile 'com.github.akarnokd:rxjava2-interop:0.10.2'
provided extraDependencies.optional
testCompile "org.jetbrains.kotlin:kotlin-test:$rootProject.ext.kotlinVersion" testCompile "org.jetbrains.kotlin:kotlin-test:$rootProject.ext.kotlinVersion"
testCompile "org.jetbrains.kotlin:kotlin-test-junit:$rootProject.ext.kotlinVersion" testCompile "org.jetbrains.kotlin:kotlin-test-junit:$rootProject.ext.kotlinVersion"
testCompile 'org.json:json:20170516' testCompile 'org.json:json:20170516'
testCompile 'org.skyscreamer:jsonassert:1.5.0' testCompile 'org.skyscreamer:jsonassert:1.5.0'
compile 'com.github.akarnokd:rxjava2-interop:0.10.0'
provided 'com.hadisatrio:Optional:v1.0.1'
testCompile 'junit:junit:4.12' testCompile 'junit:junit:4.12'
} }
package chat.rocket.persistence.realm.repositories package chat.rocket.persistence.realm.repositories
import android.os.Looper import android.os.Looper
import android.support.v4.util.Pair
import chat.rocket.core.models.Spotlight import chat.rocket.core.models.Spotlight
import chat.rocket.core.repositories.SpotlightRepository import chat.rocket.core.repositories.SpotlightRepository
import chat.rocket.persistence.realm.RealmStore import chat.rocket.persistence.realm.RealmStore
......
...@@ -29,7 +29,6 @@ android { ...@@ -29,7 +29,6 @@ android {
ext { ext {
frescoVersion = '1.4.0' frescoVersion = '1.4.0'
rxbindingVersion = '2.0.0'
} }
dependencies { dependencies {
compile project(':rocket-chat-core') compile project(':rocket-chat-core')
...@@ -38,18 +37,18 @@ dependencies { ...@@ -38,18 +37,18 @@ dependencies {
compile supportDependencies.annotation compile supportDependencies.annotation
compile supportDependencies.cardView compile supportDependencies.cardView
compile supportDependencies.designSupportLibrary compile supportDependencies.designSupportLibrary
compile supportDependencies.constrainLayout compile supportDependencies.constraintLayout
compile supportDependencies.kotlin compile supportDependencies.supportV13
compile rxbindingDependencies.rxBinding compile rxbindingDependencies.rxBinding
compile rxbindingDependencies.rxBindingSupport compile rxbindingDependencies.rxBindingSupport
compile "com.android.support:support-v13:$rootProject.ext.supportLibraryVersion" compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$rootProject.ext.kotlinVersion"
testCompile "org.jetbrains.kotlin:kotlin-test:$rootProject.ext.kotlinVersion"
testCompile "org.jetbrains.kotlin:kotlin-test-junit:$rootProject.ext.kotlinVersion"
compile 'org.nibor.autolink:autolink:0.6.0' compile 'org.nibor.autolink:autolink:0.6.0'
compile 'com.github.yusukeiwaki.android-widget:widget-fontawesome:0.0.1' compile 'com.github.yusukeiwaki.android-widget:widget-fontawesome:0.0.1'
compile "com.facebook.fresco:fresco:$frescoVersion" compile "com.facebook.fresco:fresco:$frescoVersion"
compile "com.facebook.fresco:imagepipeline-okhttp3:$frescoVersion" compile "com.facebook.fresco:imagepipeline-okhttp3:$frescoVersion"
compile 'com.caverock:androidsvg:1.2.1' compile 'com.caverock:androidsvg:1.2.1'
testCompile "org.jetbrains.kotlin:kotlin-test-junit:$rootProject.ext.kotlinVersion"
testCompile "org.jetbrains.kotlin:kotlin-test:$rootProject.ext.kotlinVersion"
testCompile 'junit:junit:4.12' testCompile 'junit:junit:4.12'
testCompile "org.mockito:mockito-core:2.7.19" testCompile "org.mockito:mockito-core:2.7.19"
} }
...@@ -4,9 +4,9 @@ apply plugin: 'java' ...@@ -4,9 +4,9 @@ apply plugin: 'java'
dependencies { dependencies {
compile extraDependencies.rxJava compile extraDependencies.rxJava
compile extraDependencies.optional
compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$rootProject.ext.kotlinVersion" compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$rootProject.ext.kotlinVersion"
compile 'com.google.code.findbugs:jsr305:3.0.1' compile 'com.google.code.findbugs:jsr305:3.0.1'
compile 'com.hadisatrio:Optional:v1.0.1'
compileOnly 'com.google.auto.value:auto-value:1.3' compileOnly 'com.google.auto.value:auto-value:1.3'
kapt 'com.google.auto.value:auto-value:1.3' kapt 'com.google.auto.value:auto-value:1.3'
kapt 'com.gabrielittner.auto.value:auto-value-with:1.0.0' kapt 'com.gabrielittner.auto.value:auto-value-with:1.0.0'
......
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