Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AloqaIM-Android
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
AloqaIM-Android
Commits
e302d26c
Commit
e302d26c
authored
Nov 17, 2017
by
Leonardo Aramaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused dependencies and update versions
parent
fceaa63a
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
41 additions
and
109 deletions
+41
-109
gen_listeners.py
android-ddp/gen_listeners.py
+0
-60
build.gradle
app/build.gradle
+6
-16
RoomListFragment.kt
...rocket/android/fragment/chatroom/list/RoomListFragment.kt
+20
-17
PushManagerTest.kt
...c/test/kotlin/chat.rocket.android/push/PushManagerTest.kt
+1
-1
dependencies.gradle
dependencies.gradle
+6
-4
build.gradle
persistence-realm/build.gradle
+2
-3
RealmSpotlightRepository.kt
...ersistence/realm/repositories/RealmSpotlightRepository.kt
+0
-1
build.gradle
rocket-chat-android-widgets/build.gradle
+5
-6
build.gradle
rocket-chat-core/build.gradle
+1
-1
No files found.
android-ddp/gen_listeners.py
deleted
100644 → 0
View file @
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
)
app/build.gradle
View file @
e302d26c
...
...
@@ -114,19 +114,16 @@ dependencies {
compile
extraDependencies
.
okHTTP
compile
extraDependencies
.
rxJava
compile
extraDependencies
.
boltTask
compile
supportDependencies
.
multidex
compile
supportDependencies
.
designSupportLibrary
compile
supportDependencies
.
annotation
compile
supportDependencies
.
kotlin
;
compile
rxbindingDependencies
.
rxBinding
compile
rxbindingDependencies
.
rxBindingSupport
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-crash:$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-android:$rxlifecycleVersion"
compile
"com.trello.rxlifecycle2:rxlifecycle-components:$rxlifecycleVersion"
...
...
@@ -138,23 +135,16 @@ dependencies {
compile
(
'com.crashlytics.sdk.android:crashlytics:2.6.8@aar'
)
{
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"
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
'org.robolectric:robolectric:3.3'
testCompile
"org.jetbrains.kotlin:kotlin-test:$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
'org.amshove.kluent:kluent:1.14'
testCompile
"org.jetbrains.kotlin:kotlin-reflect:$rootProject.ext.kotlinVersion"
}
apply
plugin:
'com.google.gms.google-services'
app/src/main/java/chat/rocket/android/fragment/chatroom/list/RoomListFragment.kt
View file @
e302d26c
...
...
@@ -47,20 +47,23 @@ class RoomListFragment : Fragment(), RoomListContract.View {
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
activity
.
title
=
""
actionId
=
arguments
.
getInt
(
"actionId"
)
roomId
=
arguments
.
getString
(
"roomId"
)
roomType
=
arguments
.
getString
(
"roomType"
)
hostname
=
arguments
.
getString
(
"hostname"
)
token
=
arguments
.
getString
(
"token"
)
userId
=
arguments
.
getString
(
"userId"
)
activity
?.
title
=
""
val
args
=
arguments
args
?.
let
{
actionId
=
args
.
getInt
(
"actionId"
)
roomId
=
args
.
getString
(
"roomId"
)
roomType
=
args
.
getString
(
"roomType"
)
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
)
presenter
=
RoomListPresenter
(
context
,
this
)
presenter
=
RoomListPresenter
(
context
!!
,
this
)
}
override
fun
onResume
()
{
...
...
@@ -114,9 +117,9 @@ class RoomListFragment : Fragment(), RoomListContract.View {
}
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
)
{
recyclerView
.
adapter
=
RoomMessagesAdapter
(
dataSet
,
hostname
,
context
)
recyclerView
.
adapter
=
RoomMessagesAdapter
(
dataSet
,
hostname
,
context
!!
)
val
linearLayoutManager
=
LinearLayoutManager
(
context
,
LinearLayoutManager
.
VERTICAL
,
false
)
recyclerView
.
layoutManager
=
linearLayoutManager
if
(
dataSet
.
size
>=
50
)
{
...
...
@@ -132,9 +135,9 @@ class RoomListFragment : Fragment(), RoomListContract.View {
}
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
)
{
recyclerView
.
adapter
=
RoomMessagesAdapter
(
dataSet
,
hostname
,
context
)
recyclerView
.
adapter
=
RoomMessagesAdapter
(
dataSet
,
hostname
,
context
!!
)
val
linearLayoutManager
=
LinearLayoutManager
(
context
,
LinearLayoutManager
.
VERTICAL
,
false
)
recyclerView
.
layoutManager
=
linearLayoutManager
if
(
dataSet
.
size
>=
50
)
{
...
...
@@ -150,7 +153,7 @@ class RoomListFragment : Fragment(), RoomListContract.View {
}
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
)
{
recyclerView
.
adapter
=
RoomFileListAdapter
(
dataSet
)
val
linearLayoutManager
=
LinearLayoutManager
(
context
,
LinearLayoutManager
.
VERTICAL
,
false
)
...
...
@@ -168,9 +171,9 @@ class RoomListFragment : Fragment(), RoomListContract.View {
}
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
)
{
recyclerView
.
adapter
=
RoomMemberListAdapter
(
dataSet
,
hostname
,
context
)
recyclerView
.
adapter
=
RoomMemberListAdapter
(
dataSet
,
hostname
,
context
!!
)
val
linearLayoutManager
=
LinearLayoutManager
(
context
,
LinearLayoutManager
.
VERTICAL
,
false
)
recyclerView
.
layoutManager
=
linearLayoutManager
if
(
dataSet
.
size
>=
50
)
{
...
...
app/src/test/kotlin/chat.rocket.android/push/PushManagerTest.kt
View file @
e302d26c
...
...
@@ -67,7 +67,7 @@ class PushManagerTest {
on
{
getColor
(
any
())
}
doReturn
0
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
}
...
...
dependencies.gradle
View file @
e302d26c
ext
{
preDexLibs
=
"true"
!=
System
.
getenv
(
"CI"
)
supportLibraryVersion
=
"2
5.4.0
"
supportLibraryVersion
=
"2
7.0.1
"
constraintLayoutVersion
=
"1.0.2"
kotlinVersion
=
"1.1.51"
okHttpVersion
=
"3.9.0"
...
...
@@ -9,16 +9,18 @@ ext {
supportDependencies
=
[
designSupportLibrary:
"com.android.support:design:${supportLibraryVersion}"
,
annotation
:
"com.android.support:support-annotations:${supportLibraryVersion}"
,
constrainLayout
:
"com.android.support.constraint:constraint-layout:${constraintLayoutVersion}"
,
kotlin
:
"org.jetbrains.kotlin:kotlin-stdlib-jre7:${kotlinVersion}"
,
constraintLayout
:
"com.android.support.constraint:constraint-layout:${constraintLayoutVersion}"
,
cardView
:
"com.android.support:cardview-v7:${supportLibraryVersion}"
,
supportV13
:
"com.android.support:support-v13:${supportLibraryVersion}"
,
multidex
:
"com.android.support:multidex:1.0.2"
]
extraDependencies
=
[
okHTTP
:
"com.squareup.okhttp3:okhttp:${okHttpVersion}"
,
rxJava
:
"io.reactivex.rxjava2:rxjava:2.1.0"
,
boltTask
:
"com.parse.bolts:bolts-tasks:1.4.0"
,
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
=
[
rxBinding
:
"com.jakewharton.rxbinding2:rxbinding:${rxbindingVersion}"
,
...
...
persistence-realm/build.gradle
View file @
e302d26c
...
...
@@ -36,13 +36,12 @@ dependencies {
compile
extraDependencies
.
boltTask
compile
supportDependencies
.
annotation
compile
supportDependencies
.
designSupportLibrary
compile
supportDependencies
.
kotlin
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-junit:$rootProject.ext.kotlinVersion"
testCompile
'org.json:json:20170516'
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'
}
persistence-realm/src/main/java/chat/rocket/persistence/realm/repositories/RealmSpotlightRepository.kt
View file @
e302d26c
package
chat.rocket.persistence.realm.repositories
import
android.os.Looper
import
android.support.v4.util.Pair
import
chat.rocket.core.models.Spotlight
import
chat.rocket.core.repositories.SpotlightRepository
import
chat.rocket.persistence.realm.RealmStore
...
...
rocket-chat-android-widgets/build.gradle
View file @
e302d26c
...
...
@@ -29,7 +29,6 @@ android {
ext
{
frescoVersion
=
'1.4.0'
rxbindingVersion
=
'2.0.0'
}
dependencies
{
compile
project
(
':rocket-chat-core'
)
...
...
@@ -38,18 +37,18 @@ dependencies {
compile
supportDependencies
.
annotation
compile
supportDependencies
.
cardView
compile
supportDependencies
.
designSupportLibrary
compile
supportDependencies
.
constrainLayout
compile
supportDependencies
.
kotlin
compile
supportDependencies
.
constrain
t
Layout
compile
supportDependencies
.
supportV13
compile
rxbindingDependencies
.
rxBinding
compile
rxbindingDependencies
.
rxBindingSupport
compile
"com.android.support:support-v13:$rootProject.ext.supportLibraryVersion"
testCompile
"org.jetbrains.kotlin:kotlin-test:$rootProject.ext.kotlinVersion"
testCompile
"org.jetbrains.kotlin:kotlin-test-junit:$rootProject.ext.kotlinVersion"
compile
"org.jetbrains.kotlin:kotlin-stdlib-jre7:$rootProject.ext.kotlinVersion"
compile
'org.nibor.autolink:autolink:0.6.0'
compile
'com.github.yusukeiwaki.android-widget:widget-fontawesome:0.0.1'
compile
"com.facebook.fresco:fresco:$frescoVersion"
compile
"com.facebook.fresco:imagepipeline-okhttp3:$frescoVersion"
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
"org.mockito:mockito-core:2.7.19"
}
rocket-chat-core/build.gradle
View file @
e302d26c
...
...
@@ -4,9 +4,9 @@ apply plugin: 'java'
dependencies
{
compile
extraDependencies
.
rxJava
compile
extraDependencies
.
optional
compile
"org.jetbrains.kotlin:kotlin-stdlib-jre7:$rootProject.ext.kotlinVersion"
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'
kapt
'com.google.auto.value:auto-value:1.3'
kapt
'com.gabrielittner.auto.value:auto-value-with:1.0.0'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment