Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 29 additions & 28 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
classpath 'me.tatarka:gradle-retrolambda:3.2.3'
classpath 'me.tatarka:gradle-retrolambda:3.5.0'
}
}

Expand All @@ -16,7 +15,6 @@ def versionPatch = 0
def versionBuild = 0 // bump for dogfood builds, public betas, etc.

apply plugin: 'com.android.application'
apply plugin: 'com.neenbedankt.android-apt'
apply plugin: 'me.tatarka.retrolambda'

repositories {
Expand Down Expand Up @@ -121,42 +119,45 @@ dependencies {
compile "com.android.support:recyclerview-v7:${SUPPORT_V7_VERSION}"
compile "com.android.support:cardview-v7:${SUPPORT_V7_VERSION}"

compile 'com.google.dagger:dagger:2.0.1'
apt 'com.google.dagger:dagger-compiler:2.0.1'
provided 'org.glassfish:javax.annotation:10.0-b28'
compile "com.google.dagger:dagger:${dagger2Version}"
annotationProcessor "com.google.dagger:dagger-compiler:${dagger2Version}"
annotationProcessor 'org.glassfish:javax.annotation:10.0-b28'

compile 'com.squareup.okhttp3:okhttp:3.1.1'
compile 'com.squareup.okhttp3:logging-interceptor:3.1.1'
compile "com.squareup.okhttp3:okhttp:${okhttpVersion}"
compile "com.squareup.okhttp3:logging-interceptor:${okhttpVersion}"
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.jakewharton.picasso:picasso2-okhttp3-downloader:1.0.1'
compile 'com.squareup.retrofit2:retrofit:2.0.0-beta4'
compile 'com.squareup.retrofit2:converter-moshi:2.0.0-beta4'
compile 'com.squareup.retrofit2:adapter-rxjava:2.0.0-beta4'
internalDebugCompile 'com.squareup.retrofit2:retrofit-mock:2.0.0-beta4'

compile 'com.jakewharton:butterknife:7.0.1'
compile 'com.jakewharton.timber:timber:4.0.1'
compile 'com.jakewharton.picasso:picasso2-okhttp3-downloader:1.1.0'
compile "com.squareup.retrofit2:retrofit:${retrofit2Version}"
compile "com.squareup.retrofit2:converter-moshi:${retrofit2Version}"
compile "com.squareup.retrofit2:adapter-rxjava:${retrofit2Version}"
internalDebugCompile "com.squareup.retrofit2:retrofit-mock:${retrofit2Version}"

compile "com.jakewharton:butterknife:${butterKnifeVersion}"
annotationProcessor "com.jakewharton:butterknife-compiler:${butterKnifeVersion}"
compile 'com.jakewharton.timber:timber:4.5.1'
compile 'com.jakewharton.byteunits:byteunits:0.9.1'
compile 'com.jakewharton.rxbinding:rxbinding:0.3.0'
internalDebugCompile 'com.jakewharton.madge:madge:1.1.3'
compile 'com.jakewharton.rxbinding:rxbinding:1.0.0'
internalDebugCompile 'com.jakewharton.madge:madge:1.1.4'
internalDebugCompile 'com.jakewharton.scalpel:scalpel:1.1.2'
internalDebugCompile 'com.jakewharton:process-phoenix:1.0.2'
internalCompile 'com.squareup.leakcanary:leakcanary-android:1.3.1'
productionCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.3.1'
internalDebugCompile 'com.jakewharton:process-phoenix:1.1.1'
internalCompile "com.squareup.leakcanary:leakcanary-android:${leakCanaryVersion}"
productionCompile "com.squareup.leakcanary:leakcanary-android-no-op:${leakCanaryVersion}"

compile 'io.reactivex:rxjava:1.1.0'
compile 'io.reactivex:rxandroid:1.1.0'
compile 'io.reactivex:rxjava:1.2.3'
compile 'io.reactivex:rxandroid:1.2.1'

compile 'com.jakewharton.threetenabp:threetenabp:1.0.2'
internalCompile 'com.mattprecious.telescope:telescope:1.5.0@aar'
compile 'com.jakewharton.threetenabp:threetenabp:1.0.4'
internalCompile 'com.mattprecious.telescope:telescope:2.1.0'

compile 'com.f2prateek.rx.preferences:rx-preferences:1.0.0'
compile 'com.f2prateek.rx.preferences:rx-preferences:1.0.2'

// Espresso 2 Dependencies
androidTestCompile 'com.android.support.test:testing-support-lib:0.1'
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.0'
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
androidTestCompile ('com.android.support.test.espresso:espresso-contrib:2.0') {
exclude module: 'support-annotations'
exclude group: 'com.android.support', module: 'appcompat'
exclude group: 'com.android.support', module: 'support-v4'
exclude module: 'recyclerview-v7'
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@


import org.hamcrest.Matcher;
import org.hamcrest.core.IsAnything;

import java.util.concurrent.TimeoutException;

import static android.support.test.espresso.matcher.ViewMatchers.isRoot;
import static android.support.test.espresso.matcher.ViewMatchers.withId;
import static org.hamcrest.CoreMatchers.anything;

public class ViewActions {

Expand Down Expand Up @@ -87,7 +87,7 @@ public static ViewAction waitAtLeast(final long millis) {
return new ViewAction() {
@Override
public Matcher<View> getConstraints() {
return anything();
return new IsAnything<>();
}

@Override
Expand Down Expand Up @@ -123,7 +123,7 @@ public static ViewAction waitUntilIdle() {
return new ViewAction() {
@Override
public Matcher<View> getConstraints() {
return anything();
return new IsAnything<>();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* Pops a dialog asking for more information about the bug report and then creates an email with a
* JIRA-formatted body.
*/
public final class BugReportLens implements Lens, BugReportDialog.ReportListener {
public final class BugReportLens extends Lens implements BugReportDialog.ReportListener {
private final Context context;
private final LumberYard lumberYard;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@
import android.widget.EditText;
import android.widget.LinearLayout;

import butterknife.Bind;
import butterknife.BindView;
import butterknife.ButterKnife;
import ru.ltst.u2020mvp.R;
import ru.ltst.u2020mvp.ui.misc.EmptyTextWatcher;
import ru.ltst.u2020mvp.util.Strings;

public final class BugReportView extends LinearLayout {
@Bind(R.id.title)
@BindView(R.id.title)
EditText titleView;
@Bind(R.id.description)
@BindView(R.id.description)
EditText descriptionView;
@Bind(R.id.screenshot)
@BindView(R.id.screenshot)
CheckBox screenshotView;
@Bind(R.id.logs)
@BindView(R.id.logs)
CheckBox logsView;

public interface ReportDetailsListener {
Expand Down
10 changes: 0 additions & 10 deletions app/src/internalDebug/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,5 @@
android:process=":phoenix"
/>

<activity
android:name="com.squareup.leakcanary.internal.DisplayLeakActivity"
android:enabled="false"
android:label="@string/__leak_canary_display_activity_label"
android:taskAffinity="com.squareup.leakcanary"
android:theme="@style/__LeakCanary.Base"
>
<intent-filter tools:node="removeAll"/>
</activity>

</application>
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import java.lang.reflect.Field;
import java.util.Arrays;

import butterknife.Bind;
import butterknife.BindView;
import butterknife.ButterKnife;
import ru.ltst.u2020mvp.R;
import ru.ltst.u2020mvp.ui.misc.Truss;
Expand All @@ -32,11 +32,11 @@ public static Intent createIntent(Intent baseIntent) {
return intent;
}

@Bind(R.id.toolbar) Toolbar toolbarView;
@Bind(R.id.action) TextView actionView;
@Bind(R.id.data) TextView dataView;
@Bind(R.id.extras) TextView extrasView;
@Bind(R.id.flags) TextView flagsView;
@BindView(R.id.toolbar) Toolbar toolbarView;
@BindView(R.id.action) TextView actionView;
@BindView(R.id.data) TextView dataView;
@BindView(R.id.extras) TextView extrasView;
@BindView(R.id.flags) TextView flagsView;

private Intent baseIntent;

Expand Down
98 changes: 49 additions & 49 deletions app/src/internalDebug/java/ru/ltst/u2020mvp/ui/debug/DebugView.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
import javax.inject.Inject;
import javax.inject.Named;

import butterknife.Bind;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import okhttp3.Cache;
Expand Down Expand Up @@ -77,54 +77,54 @@ public final class DebugView extends FrameLayout {
private static final DateTimeFormatter DATE_DISPLAY_FORMAT =
DateTimeFormatter.ofPattern("yyyy-MM-dd hh:mm a", Locale.US).withZone(ZoneId.systemDefault());

@Bind(R.id.debug_contextual_title) View contextualTitleView;
@Bind(R.id.debug_contextual_list) LinearLayout contextualListView;

@Bind(R.id.debug_network_endpoint) Spinner endpointView;
@Bind(R.id.debug_network_endpoint_edit) View endpointEditView;
@Bind(R.id.debug_network_delay) Spinner networkDelayView;
@Bind(R.id.debug_network_variance) Spinner networkVarianceView;
@Bind(R.id.debug_network_error) Spinner networkErrorView;
@Bind(R.id.debug_network_proxy) Spinner networkProxyView;
@Bind(R.id.debug_network_logging) Spinner networkLoggingView;

@Bind(R.id.debug_capture_intents) Switch captureIntentsView;
@Bind(R.id.debug_repositories_response) Spinner repositoriesResponseView;

@Bind(R.id.debug_ui_animation_speed) Spinner uiAnimationSpeedView;
@Bind(R.id.debug_ui_pixel_grid) Switch uiPixelGridView;
@Bind(R.id.debug_ui_pixel_ratio) Switch uiPixelRatioView;
@Bind(R.id.debug_ui_scalpel) Switch uiScalpelView;
@Bind(R.id.debug_ui_scalpel_wireframe) Switch uiScalpelWireframeView;
@Bind(R.id.debug_build_name) TextView buildNameView;

@Bind(R.id.debug_build_code) TextView buildCodeView;
@Bind(R.id.debug_build_sha) TextView buildShaView;
@Bind(R.id.debug_build_date) TextView buildDateView;
@Bind(R.id.debug_device_make) TextView deviceMakeView;

@Bind(R.id.debug_device_model) TextView deviceModelView;
@Bind(R.id.debug_device_resolution) TextView deviceResolutionView;
@Bind(R.id.debug_device_density) TextView deviceDensityView;
@Bind(R.id.debug_device_release) TextView deviceReleaseView;
@Bind(R.id.debug_device_api) TextView deviceApiView;
@Bind(R.id.debug_picasso_indicators) Switch picassoIndicatorView;

@Bind(R.id.debug_picasso_cache_size) TextView picassoCacheSizeView;
@Bind(R.id.debug_picasso_cache_hit) TextView picassoCacheHitView;
@Bind(R.id.debug_picasso_cache_miss) TextView picassoCacheMissView;
@Bind(R.id.debug_picasso_decoded) TextView picassoDecodedView;
@Bind(R.id.debug_picasso_decoded_total) TextView picassoDecodedTotalView;
@Bind(R.id.debug_picasso_decoded_avg) TextView picassoDecodedAvgView;
@Bind(R.id.debug_picasso_transformed) TextView picassoTransformedView;
@Bind(R.id.debug_picasso_transformed_total) TextView picassoTransformedTotalView;
@Bind(R.id.debug_picasso_transformed_avg) TextView picassoTransformedAvgView;
@Bind(R.id.debug_okhttp_cache_max_size) TextView okHttpCacheMaxSizeView;

@Bind(R.id.debug_okhttp_cache_write_error) TextView okHttpCacheWriteErrorView;
@Bind(R.id.debug_okhttp_cache_request_count) TextView okHttpCacheRequestCountView;
@Bind(R.id.debug_okhttp_cache_network_count) TextView okHttpCacheNetworkCountView;
@Bind(R.id.debug_okhttp_cache_hit_count) TextView okHttpCacheHitCountView;
@BindView(R.id.debug_contextual_title) View contextualTitleView;
@BindView(R.id.debug_contextual_list) LinearLayout contextualListView;

@BindView(R.id.debug_network_endpoint) Spinner endpointView;
@BindView(R.id.debug_network_endpoint_edit) View endpointEditView;
@BindView(R.id.debug_network_delay) Spinner networkDelayView;
@BindView(R.id.debug_network_variance) Spinner networkVarianceView;
@BindView(R.id.debug_network_error) Spinner networkErrorView;
@BindView(R.id.debug_network_proxy) Spinner networkProxyView;
@BindView(R.id.debug_network_logging) Spinner networkLoggingView;

@BindView(R.id.debug_capture_intents) Switch captureIntentsView;
@BindView(R.id.debug_repositories_response) Spinner repositoriesResponseView;

@BindView(R.id.debug_ui_animation_speed) Spinner uiAnimationSpeedView;
@BindView(R.id.debug_ui_pixel_grid) Switch uiPixelGridView;
@BindView(R.id.debug_ui_pixel_ratio) Switch uiPixelRatioView;
@BindView(R.id.debug_ui_scalpel) Switch uiScalpelView;
@BindView(R.id.debug_ui_scalpel_wireframe) Switch uiScalpelWireframeView;
@BindView(R.id.debug_build_name) TextView buildNameView;

@BindView(R.id.debug_build_code) TextView buildCodeView;
@BindView(R.id.debug_build_sha) TextView buildShaView;
@BindView(R.id.debug_build_date) TextView buildDateView;
@BindView(R.id.debug_device_make) TextView deviceMakeView;

@BindView(R.id.debug_device_model) TextView deviceModelView;
@BindView(R.id.debug_device_resolution) TextView deviceResolutionView;
@BindView(R.id.debug_device_density) TextView deviceDensityView;
@BindView(R.id.debug_device_release) TextView deviceReleaseView;
@BindView(R.id.debug_device_api) TextView deviceApiView;
@BindView(R.id.debug_picasso_indicators) Switch picassoIndicatorView;

@BindView(R.id.debug_picasso_cache_size) TextView picassoCacheSizeView;
@BindView(R.id.debug_picasso_cache_hit) TextView picassoCacheHitView;
@BindView(R.id.debug_picasso_cache_miss) TextView picassoCacheMissView;
@BindView(R.id.debug_picasso_decoded) TextView picassoDecodedView;
@BindView(R.id.debug_picasso_decoded_total) TextView picassoDecodedTotalView;
@BindView(R.id.debug_picasso_decoded_avg) TextView picassoDecodedAvgView;
@BindView(R.id.debug_picasso_transformed) TextView picassoTransformedView;
@BindView(R.id.debug_picasso_transformed_total) TextView picassoTransformedTotalView;
@BindView(R.id.debug_picasso_transformed_avg) TextView picassoTransformedAvgView;
@BindView(R.id.debug_okhttp_cache_max_size) TextView okHttpCacheMaxSizeView;

@BindView(R.id.debug_okhttp_cache_write_error) TextView okHttpCacheWriteErrorView;
@BindView(R.id.debug_okhttp_cache_request_count) TextView okHttpCacheRequestCountView;
@BindView(R.id.debug_okhttp_cache_network_count) TextView okHttpCacheNetworkCountView;
@BindView(R.id.debug_okhttp_cache_hit_count) TextView okHttpCacheHitCountView;

@Inject OkHttpClient client;
@Inject @Named("Api") OkHttpClient apiClient;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

import javax.inject.Inject;

import butterknife.Bind;
import butterknife.BindView;
import butterknife.ButterKnife;
import ru.ltst.u2020mvp.ApplicationScope;
import ru.ltst.u2020mvp.R;
Expand Down Expand Up @@ -49,10 +49,10 @@ public final class DebugViewContainer implements ViewContainer {
private final Preference<Boolean> scalpelWireframeEnabled;

static class ViewHolder {
@Bind(R.id.debug_drawer_layout) DrawerLayout drawerLayout;
@Bind(R.id.debug_drawer) ViewGroup debugDrawer;
@Bind(R.id.madge_container) MadgeFrameLayout madgeFrameLayout;
@Bind(R.id.debug_content) ScalpelFrameLayout content;
@BindView(R.id.debug_drawer_layout) DrawerLayout drawerLayout;
@BindView(R.id.debug_drawer) ViewGroup debugDrawer;
@BindView(R.id.madge_container) MadgeFrameLayout madgeFrameLayout;
@BindView(R.id.debug_content) ScalpelFrameLayout content;
}

@Inject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
import java.util.Collections;
import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Bind;
import ru.ltst.u2020mvp.R;
import ru.ltst.u2020mvp.data.LumberYard.Entry;
import ru.ltst.u2020mvp.ui.misc.BindableAdapter;
Expand Down Expand Up @@ -69,11 +69,11 @@ public void bindView(Entry item, int position, View view) {

static final class LogItemViewHolder {
private final View rootView;
@Bind(R.id.debug_log_level)
@BindView(R.id.debug_log_level)
TextView levelView;
@Bind(R.id.debug_log_tag)
@BindView(R.id.debug_log_tag)
TextView tagView;
@Bind(R.id.debug_log_message)
@BindView(R.id.debug_log_message)
TextView messageView;

public LogItemViewHolder(View rootView) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
import android.app.Activity;
import android.support.v7.app.AlertDialog;
import android.content.Context;
import android.content.SharedPreferences;
import android.view.ContextThemeWrapper;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Toast;
import butterknife.Bind;

import butterknife.BindView;
import butterknife.ButterKnife;
import com.f2prateek.rx.preferences.Preference;
import com.f2prateek.rx.preferences.RxSharedPreferences;
Expand All @@ -33,7 +33,7 @@ public final class TelescopeViewContainer implements ViewContainer {
this.seenTelescopeDialog = preferences.getBoolean("internal-seen-telescope-dialog", false);
}

@Bind(R.id.telescope_container) TelescopeLayout telescopeLayout;
@BindView(R.id.telescope_container) TelescopeLayout telescopeLayout;

@Override public ViewGroup forActivity(final Activity activity) {
activity.setContentView(R.layout.internal_activity_frame);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
android:id="@+id/telescope_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:progressColor="@color/bugreport_frame"
app:telescope_progressColor="@color/bugreport_frame"
/>
Loading