Skip to content

Commit 0879354

Browse files
committed
Enable frodo on presentation and data layer.
1 parent 3ab3df2 commit 0879354

File tree

5 files changed

+12
-5
lines changed

5 files changed

+12
-5
lines changed

build.gradle

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ apply from: 'buildsystem/dependencies.gradle'
44
buildscript {
55
repositories {
66
jcenter()
7+
mavenCentral()
78
}
89
dependencies {
9-
classpath 'com.android.tools.build:gradle:1.2.3'
10+
classpath 'com.android.tools.build:gradle:1.3.1'
1011
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4'
12+
classpath "com.fernandocejas.frodo:frodo-plugin:0.8.1"
1113
}
1214
}
1315

data/build.gradle

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,14 @@ buildscript {
77
}
88
}
99

10-
repositories {
11-
mavenCentral()
12-
}
13-
1410
apply plugin: 'com.android.library'
1511
apply plugin: 'com.neenbedankt.android-apt'
12+
apply plugin: 'com.fernandocejas.frodo'
1613
apply plugin: 'me.tatarka.retrolambda'
1714

1815
android {
16+
defaultPublishConfig "debug"
17+
1918
def globalConfiguration = rootProject.extensions.getByName("ext")
2019

2120
compileSdkVersion globalConfiguration.getAt("androidCompileSdkVersion")

data/src/main/java/com/fernandocejas/android10/sample/data/net/RestApiImpl.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import com.fernandocejas.android10.sample.data.entity.UserEntity;
2222
import com.fernandocejas.android10.sample.data.entity.mapper.UserEntityJsonMapper;
2323
import com.fernandocejas.android10.sample.data.exception.NetworkConnectionException;
24+
import com.fernandocejas.frodo.annotation.RxLogObservable;
2425
import java.net.MalformedURLException;
2526
import java.util.List;
2627
import rx.Observable;
@@ -48,6 +49,7 @@ public RestApiImpl(Context context, UserEntityJsonMapper userEntityJsonMapper) {
4849
this.userEntityJsonMapper = userEntityJsonMapper;
4950
}
5051

52+
@RxLogObservable
5153
@Override public Observable<List<UserEntity>> userEntityList() {
5254
return Observable.create(new Observable.OnSubscribe<List<UserEntity>>() {
5355
@Override public void call(Subscriber<? super List<UserEntity>> subscriber) {
@@ -72,6 +74,7 @@ public RestApiImpl(Context context, UserEntityJsonMapper userEntityJsonMapper) {
7274
});
7375
}
7476

77+
@RxLogObservable
7578
@Override public Observable<UserEntity> userEntityById(final int userId) {
7679
return Observable.create(new Observable.OnSubscribe<UserEntity>() {
7780
@Override public void call(Subscriber<? super UserEntity> subscriber) {

presentation/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
apply plugin: 'com.android.application'
22
apply plugin: 'com.neenbedankt.android-apt'
3+
apply plugin: 'com.fernandocejas.frodo'
34

45
android {
56
def globalConfiguration = rootProject.extensions.getByName("ext")

presentation/src/main/java/com/fernandocejas/android10/sample/presentation/presenter/UserDetailsPresenter.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import com.fernandocejas.android10.sample.presentation.mapper.UserModelDataMapper;
2727
import com.fernandocejas.android10.sample.presentation.model.UserModel;
2828
import com.fernandocejas.android10.sample.presentation.view.UserDetailsView;
29+
import com.fernandocejas.frodo.annotation.RxLogSubscriber;
2930
import javax.inject.Inject;
3031
import javax.inject.Named;
3132

@@ -111,6 +112,7 @@ private void getUserDetails() {
111112
this.getUserDetailsUseCase.execute(new UserDetailsSubscriber());
112113
}
113114

115+
@RxLogSubscriber
114116
private final class UserDetailsSubscriber extends DefaultSubscriber<User> {
115117

116118
@Override public void onCompleted() {

0 commit comments

Comments
 (0)