Update Gradle configuration

This commit is contained in:
Sergey Solovyev
2018-04-29 19:04:13 +02:00
parent f41a37fe31
commit 68cded37d9
29 changed files with 180 additions and 188 deletions

View File

@@ -36,7 +36,7 @@ import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.inject.Inject;
import butterknife.Bind;
import butterknife.BindView;
import butterknife.ButterKnife;
import dagger.Lazy;
@@ -58,13 +58,13 @@ public abstract class BaseActivity extends AppCompatActivity implements SharedPr
Lazy<Ga> ga;
@Inject
Typeface typeface;
@Bind(R.id.main)
@BindView(R.id.main)
ViewGroup mainView;
@Nullable
@Bind(R.id.toolbar)
@BindView(R.id.toolbar)
Toolbar toolbar;
@Nullable
@Bind(R.id.fab)
@BindView(R.id.fab)
FloatingActionButton fab;
@Nonnull
private Preferences.Gui.Theme theme = Preferences.Gui.Theme.material_theme;

View File

@@ -38,7 +38,7 @@ import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.FrameLayout;
import butterknife.Bind;
import butterknife.BindView;
import jscl.AngleUnit;
import jscl.NumeralBase;
import org.solovyev.android.calculator.converter.ConverterFragment;
@@ -65,11 +65,11 @@ public class CalculatorActivity extends BaseActivity implements View.OnClickList
@Inject
StartupHelper startupHelper;
@Nullable
@Bind(R.id.partial_keyboard)
@BindView(R.id.partial_keyboard)
View partialKeyboard;
@Bind(R.id.editor)
@BindView(R.id.editor)
FrameLayout editor;
@Bind(R.id.main_menu)
@BindView(R.id.main_menu)
View mainMenuButton;
private boolean useBackAsPrevious;

View File

@@ -30,7 +30,8 @@ import android.support.annotation.Nullable;
import android.support.annotation.StringRes;
import android.support.v7.app.AlertDialog;
import android.view.*;
import butterknife.Bind;
import butterknife.BindView;
import butterknife.ButterKnife;
import com.squareup.otto.Bus;
import jscl.NumeralBase;
@@ -74,7 +75,7 @@ public class DisplayFragment extends BaseFragment implements View.OnClickListene
}
}
@Bind(R.id.calculator_display)
@BindView(R.id.calculator_display)
DisplayView displayView;
@Inject
SharedPreferences preferences;

View File

@@ -26,7 +26,7 @@ import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import butterknife.Bind;
import butterknife.BindView;
import butterknife.ButterKnife;
import javax.annotation.Nonnull;
@@ -36,7 +36,7 @@ public class EditorFragment extends BaseFragment {
@Inject
Editor editor;
@Bind(R.id.calculator_editor)
@BindView(R.id.calculator_editor)
EditorView editorView;
public EditorFragment() {

View File

@@ -29,7 +29,7 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import butterknife.Bind;
import butterknife.BindView;
import butterknife.ButterKnife;
import org.solovyev.android.calculator.App;
import org.solovyev.android.calculator.BaseFragment;
@@ -40,13 +40,13 @@ import static org.solovyev.common.text.Strings.isEmpty;
public class AboutFragment extends BaseFragment {
@Bind(R.id.about_image)
@BindView(R.id.about_image)
ImageView imageView;
@Bind(R.id.about_text)
@BindView(R.id.about_text)
TextView textView;
@Bind(R.id.about_translators_label)
@BindView(R.id.about_translators_label)
TextView translatorsLabel;
@Bind(R.id.about_translators)
@BindView(R.id.about_translators)
TextView translatorsView;
public AboutFragment() {

View File

@@ -29,7 +29,7 @@ import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import butterknife.Bind;
import butterknife.BindView;
import butterknife.ButterKnife;
import org.solovyev.android.calculator.BaseFragment;
import org.solovyev.android.calculator.R;
@@ -37,7 +37,7 @@ import org.solovyev.android.calculator.release.ReleaseNotes;
public class ReleaseNotesFragment extends BaseFragment {
@Bind(R.id.releasenotes_text)
@BindView(R.id.releasenotes_text)
TextView text;
public ReleaseNotesFragment() {

View File

@@ -16,7 +16,7 @@ import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.inject.Inject;
import butterknife.Bind;
import butterknife.BindView;
import butterknife.ButterKnife;
public class AdUi {
@@ -26,7 +26,7 @@ public class AdUi {
@NonNull
private final Handler handler;
@Nullable
@Bind(R.id.cpp_ad)
@BindView(R.id.cpp_ad)
AdView adView;
@Nullable
private Boolean adFree = null;

View File

@@ -48,7 +48,7 @@ import org.solovyev.android.calculator.view.EditTextCompat;
import javax.annotation.Nonnull;
import javax.inject.Inject;
import butterknife.Bind;
import butterknife.BindView;
import butterknife.ButterKnife;
import static org.solovyev.android.calculator.UiPreferences.Converter.lastDimension;
@@ -77,21 +77,21 @@ public class ConverterFragment extends BaseDialogFragment
SharedPreferences uiPreferences;
@Inject
Editor editor;
@Bind(R.id.converter_dimensions_spinner)
@BindView(R.id.converter_dimensions_spinner)
Spinner dimensionsSpinner;
@Bind(R.id.converter_spinner_from)
@BindView(R.id.converter_spinner_from)
Spinner spinnerFrom;
@Bind(R.id.converter_label_from)
@BindView(R.id.converter_label_from)
TextInputLayout labelFrom;
@Bind(R.id.converter_edittext_from)
@BindView(R.id.converter_edittext_from)
EditTextCompat editTextFrom;
@Bind(R.id.converter_spinner_to)
@BindView(R.id.converter_spinner_to)
Spinner spinnerTo;
@Bind(R.id.converter_label_to)
@BindView(R.id.converter_label_to)
TextInputLayout labelTo;
@Bind(R.id.converter_edittext_to)
@BindView(R.id.converter_edittext_to)
EditText editTextTo;
@Bind(R.id.converter_swap_button)
@BindView(R.id.converter_swap_button)
ImageButton swapButton;
private ArrayAdapter<Named<ConvertibleDimension>> dimensionsAdapter;
private ArrayAdapter<Named<Convertible>> adapterFrom;

View File

@@ -57,7 +57,7 @@ import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.inject.Inject;
import butterknife.Bind;
import butterknife.BindView;
import butterknife.ButterKnife;
@@ -71,7 +71,7 @@ public abstract class BaseEntitiesFragment<E extends MathEntity> extends BaseFra
}
};
@Bind(R.id.entities_recyclerview)
@BindView(R.id.entities_recyclerview)
public RecyclerView recyclerView;
@Inject
Keyboard keyboard;
@@ -204,9 +204,9 @@ public abstract class BaseEntitiesFragment<E extends MathEntity> extends BaseFra
protected abstract boolean onMenuItemClicked(@Nonnull MenuItem item, @Nonnull E entity);
public class EntityViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener, View.OnCreateContextMenuListener, MenuItem.OnMenuItemClickListener {
@Bind(R.id.entity_text)
@BindView(R.id.entity_text)
TextView textView;
@Bind(R.id.entity_description)
@BindView(R.id.entity_description)
TextView descriptionView;
@Nullable
private E entity;

View File

@@ -69,7 +69,7 @@ import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.inject.Inject;
import butterknife.Bind;
import butterknife.BindView;
import butterknife.ButterKnife;
import jscl.math.function.IConstant;
@@ -86,20 +86,20 @@ public abstract class BaseFunctionFragment extends BaseDialogFragment implements
private final FloatingKeyboardWindow keyboardWindow = new FloatingKeyboardWindow(null);
@NonNull
private final KeyboardUser keyboardUser = new KeyboardUser();
@Bind(R.id.function_params)
@BindView(R.id.function_params)
public
FunctionParamsView paramsView;
@Bind(R.id.function_name_label)
@BindView(R.id.function_name_label)
TextInputLayout nameLabel;
@Bind(R.id.function_name)
@BindView(R.id.function_name)
public EditText nameView;
@Bind(R.id.function_body_label)
@BindView(R.id.function_body_label)
public TextInputLayout bodyLabel;
@Bind(R.id.function_body)
@BindView(R.id.function_body)
public EditTextCompat bodyView;
@Bind(R.id.function_description_label)
@BindView(R.id.function_description_label)
public TextInputLayout descriptionLabel;
@Bind(R.id.function_description)
@BindView(R.id.function_description)
public EditText descriptionView;
@Inject
Calculator calculator;

View File

@@ -62,7 +62,7 @@ import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.inject.Inject;
import butterknife.Bind;
import butterknife.BindView;
import butterknife.ButterKnife;
public abstract class BaseHistoryFragment extends BaseFragment {
@@ -75,7 +75,7 @@ public abstract class BaseHistoryFragment extends BaseFragment {
Bus bus;
@Inject
Typeface typeface;
@Bind(R.id.history_recyclerview)
@BindView(R.id.history_recyclerview)
RecyclerView recyclerView;
private HistoryAdapter adapter;
@@ -156,11 +156,11 @@ public abstract class BaseHistoryFragment extends BaseFragment {
public class HistoryViewHolder extends RecyclerView.ViewHolder implements View.OnCreateContextMenuListener, View.OnClickListener, MenuItem.OnMenuItemClickListener {
private static final int DATETIME_FORMAT = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_ABBREV_MONTH | DateUtils.FORMAT_ABBREV_TIME;
@Bind(R.id.history_item_value)
@BindView(R.id.history_item_value)
TextView valueView;
@Bind(R.id.history_item_comment)
@BindView(R.id.history_item_comment)
TextView commentView;
@Bind(R.id.history_item_time)
@BindView(R.id.history_item_time)
TextView timeView;
@Nullable
private HistoryState state;

View File

@@ -12,7 +12,8 @@ import android.view.LayoutInflater;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
import butterknife.Bind;
import butterknife.BindView;
import butterknife.ButterKnife;
import org.solovyev.android.calculator.AppComponent;
import org.solovyev.android.calculator.BaseDialogFragment;
@@ -32,10 +33,10 @@ public class EditHistoryFragment extends BaseDialogFragment {
boolean newState;
@Bind(R.id.history_expression)
@BindView(R.id.history_expression)
TextView expressionView;
@Bind(R.id.history_comment)
@BindView(R.id.history_comment)
EditText commentView;
public static void show(@NonNull HistoryState state, boolean newState, @NonNull FragmentManager fm) {

View File

@@ -5,7 +5,7 @@ import android.app.Application;
import android.content.SharedPreferences;
import android.support.annotation.Nullable;
import android.view.View;
import butterknife.Bind;
import butterknife.BindView;
import butterknife.ButterKnife;
import com.squareup.otto.Bus;
import com.squareup.otto.Subscribe;
@@ -24,25 +24,25 @@ import static org.solovyev.android.views.dragbutton.DragDirection.*;
public class KeyboardUi extends BaseKeyboardUi {
@Bind(R.id.cpp_button_0)
@BindView(R.id.cpp_button_0)
public DirectionDragButton button0;
@Bind(R.id.cpp_button_1)
@BindView(R.id.cpp_button_1)
public DirectionDragButton button1;
@Bind(R.id.cpp_button_2)
@BindView(R.id.cpp_button_2)
public DirectionDragButton button2;
@Bind(R.id.cpp_button_3)
@BindView(R.id.cpp_button_3)
public DirectionDragButton button3;
@Bind(R.id.cpp_button_4)
@BindView(R.id.cpp_button_4)
public DirectionDragButton button4;
@Bind(R.id.cpp_button_5)
@BindView(R.id.cpp_button_5)
public DirectionDragButton button5;
@Bind(R.id.cpp_button_6)
@BindView(R.id.cpp_button_6)
public DirectionDragButton button6;
@Bind(R.id.cpp_button_7)
@BindView(R.id.cpp_button_7)
public DirectionDragButton button7;
@Bind(R.id.cpp_button_8)
@BindView(R.id.cpp_button_8)
public DirectionDragButton button8;
@Bind(R.id.cpp_button_9)
@BindView(R.id.cpp_button_9)
public DirectionDragButton button9;
@Inject
Engine engine;
@@ -52,35 +52,35 @@ public class KeyboardUi extends BaseKeyboardUi {
Bus bus;
@Inject
PartialKeyboardUi partialUi;
@Bind(R.id.cpp_button_vars)
@BindView(R.id.cpp_button_vars)
DirectionDragButton variablesButton;
@Nullable
@Bind(R.id.cpp_button_operators)
@BindView(R.id.cpp_button_operators)
DirectionDragButton operatorsButton;
@Bind(R.id.cpp_button_functions)
@BindView(R.id.cpp_button_functions)
DirectionDragButton functionsButton;
@Bind(R.id.cpp_button_history)
@BindView(R.id.cpp_button_history)
DirectionDragButton historyButton;
@Bind(R.id.cpp_button_multiplication)
@BindView(R.id.cpp_button_multiplication)
DirectionDragButton multiplicationButton;
@Bind(R.id.cpp_button_plus)
@BindView(R.id.cpp_button_plus)
DirectionDragButton plusButton;
@Bind(R.id.cpp_button_subtraction)
@BindView(R.id.cpp_button_subtraction)
DirectionDragButton subtractionButton;
@Bind(R.id.cpp_button_division)
@BindView(R.id.cpp_button_division)
DirectionDragButton divisionButton;
@Bind(R.id.cpp_button_period)
@BindView(R.id.cpp_button_period)
DirectionDragButton periodButton;
@Bind(R.id.cpp_button_round_brackets)
@BindView(R.id.cpp_button_round_brackets)
DirectionDragButton bracketsButton;
@Nullable
@Bind(R.id.cpp_button_like)
@BindView(R.id.cpp_button_like)
DirectionDragButton likeButton;
@Nullable
@Bind(R.id.cpp_button_percent)
@BindView(R.id.cpp_button_percent)
DirectionDragButton percentButton;
@Nullable
@Bind(R.id.cpp_button_memory)
@BindView(R.id.cpp_button_memory)
DirectionDragButton memoryButton;
@Inject

View File

@@ -14,7 +14,7 @@ import org.solovyev.android.views.dragbutton.DirectionDragButton;
import javax.annotation.Nonnull;
import javax.inject.Inject;
import butterknife.Bind;
import butterknife.BindView;
import butterknife.ButterKnife;
import static org.solovyev.android.calculator.Preferences.Gui.vibrateOnKeypress;
@@ -23,19 +23,19 @@ import static org.solovyev.android.views.dragbutton.DragDirection.down;
public class PartialKeyboardUi extends BaseKeyboardUi {
@Nullable
@Bind(R.id.cpp_button_right)
@BindView(R.id.cpp_button_right)
DirectionDragButton rightButton;
@Nullable
@Bind(R.id.cpp_button_left)
@BindView(R.id.cpp_button_left)
DirectionDragButton leftButton;
@Nullable
@Bind(R.id.cpp_button_clear)
@BindView(R.id.cpp_button_clear)
DirectionDragButton clearButton;
@Nullable
@Bind(R.id.cpp_button_erase)
@BindView(R.id.cpp_button_erase)
DirectionDragButton eraseButton;
@Nullable
@Bind(R.id.cpp_button_equals)
@BindView(R.id.cpp_button_equals)
DirectionDragButton equalsButton;
@Nullable
EditorLongClickEraser longClickEraser;

View File

@@ -21,7 +21,7 @@ import org.solovyev.android.plotter.Plotter;
import javax.annotation.Nonnull;
import javax.inject.Inject;
import butterknife.Bind;
import butterknife.BindView;
import butterknife.ButterKnife;
public class PlotActivity extends BaseActivity {
@@ -32,7 +32,7 @@ public class PlotActivity extends BaseActivity {
@Inject
Plotter plotter;
@Bind(R.id.plot_view_frame)
@BindView(R.id.plot_view_frame)
PlotViewFrame plotView;
public MyFragment() {

View File

@@ -34,7 +34,7 @@ import java.util.Locale;
import javax.annotation.Nonnull;
import javax.inject.Inject;
import butterknife.Bind;
import butterknife.BindView;
import butterknife.ButterKnife;
public class PlotDimensionsFragment extends BaseDialogFragment
@@ -77,23 +77,23 @@ public class PlotDimensionsFragment extends BaseDialogFragment
@Inject
Plotter plotter;
@Bind(R.id.plot_x_min)
@BindView(R.id.plot_x_min)
EditText xMin;
@Bind(R.id.plot_x_min_label)
@BindView(R.id.plot_x_min_label)
TextInputLayout xMinLabel;
@Bind(R.id.plot_x_max)
@BindView(R.id.plot_x_max)
EditText xMax;
@Bind(R.id.plot_x_max_label)
@BindView(R.id.plot_x_max_label)
TextInputLayout xMaxLabel;
@Bind(R.id.plot_y_min)
@BindView(R.id.plot_y_min)
EditText yMin;
@Bind(R.id.plot_y_min_label)
@BindView(R.id.plot_y_min_label)
TextInputLayout yMinLabel;
@Bind(R.id.plot_y_max)
@BindView(R.id.plot_y_max)
EditText yMax;
@Bind(R.id.plot_y_max_label)
@BindView(R.id.plot_y_max_label)
TextInputLayout yMaxLabel;
@Bind(R.id.y_bounds)
@BindView(R.id.y_bounds)
View yBounds;
@NonNull
private RectF bounds = new RectF();

View File

@@ -30,7 +30,7 @@ import java.util.List;
import javax.annotation.Nonnull;
import javax.inject.Inject;
import butterknife.Bind;
import butterknife.BindView;
import jscl.math.function.CustomFunction;
import uz.shift.colorpicker.LineColorPicker;
import uz.shift.colorpicker.OnColorChangedListener;
@@ -39,17 +39,17 @@ public class PlotEditFunctionFragment extends BaseFunctionFragment
implements SeekBar.OnSeekBarChangeListener {
@Inject
Plotter plotter;
@Bind(R.id.fn_meshspec_views)
@BindView(R.id.fn_meshspec_views)
View meshSpecViews;
@Bind(R.id.fn_color_label)
@BindView(R.id.fn_color_label)
TextView colorLabel;
@Bind(R.id.fn_color_picker)
@BindView(R.id.fn_color_picker)
LineColorPicker colorPicker;
@Bind(R.id.fn_linewidth_label)
@BindView(R.id.fn_linewidth_label)
TextView lineWidthLabel;
@Bind(R.id.fn_linewidth_seekbar)
@BindView(R.id.fn_linewidth_seekbar)
SeekBar lineWidthSeekBar;
@Bind(R.id.fn_iconview)
@BindView(R.id.fn_iconview)
PlotIconView iconView;
private PlotFunction plotFunction;

View File

@@ -37,7 +37,7 @@ import java.util.List;
import javax.annotation.Nonnull;
import javax.inject.Inject;
import butterknife.Bind;
import butterknife.BindView;
import butterknife.ButterKnife;
public class PlotFunctionsFragment extends BaseDialogFragment {
@@ -107,10 +107,10 @@ public class PlotFunctionsFragment extends BaseDialogFragment {
public class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener, View.OnCreateContextMenuListener, MenuItem.OnMenuItemClickListener {
@Bind(R.id.function_icon)
@BindView(R.id.function_icon)
PlotIconView icon;
@Bind(R.id.function_name)
@BindView(R.id.function_name)
TextView name;
private PlotFunction function;

View File

@@ -7,7 +7,7 @@ import android.os.Build;
import android.preference.DialogPreference;
import android.util.AttributeSet;
import android.view.View;
import butterknife.Bind;
import butterknife.BindView;
import butterknife.ButterKnife;
import org.solovyev.android.calculator.Engine;
import org.solovyev.android.calculator.R;
@@ -19,7 +19,7 @@ import static org.solovyev.common.NumberFormatter.MIN_PRECISION;
@SuppressWarnings("unused")
public class PrecisionPreference extends DialogPreference {
@Bind(R.id.precision_seekbar)
@BindView(R.id.precision_seekbar)
DiscreteSeekBar seekBar;
{

View File

@@ -72,7 +72,7 @@ import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.inject.Inject;
import butterknife.Bind;
import butterknife.BindView;
import butterknife.ButterKnife;
import dagger.Lazy;
import jscl.math.function.IConstant;
@@ -85,9 +85,9 @@ public class EditVariableFragment extends BaseDialogFragment implements View.OnF
private final static List<Character> ACCEPTABLE_CHARACTERS = Arrays.asList(Strings.toObjects(("1234567890abcdefghijklmnopqrstuvwxyzйцукенгшщзхъфывапролджэячсмитьбюё_" + GreekFloatingKeyboard.ALPHABET).toCharArray()));
@NonNull
private final KeyboardUser keyboardUser = new KeyboardUser();
@Bind(R.id.variable_name_label)
@BindView(R.id.variable_name_label)
TextInputLayout nameLabel;
@Bind(R.id.variable_name)
@BindView(R.id.variable_name)
EditTextCompat nameView;
@NonNull
private final FloatingKeyboardWindow keyboardWindow = new FloatingKeyboardWindow(new PopupWindow.OnDismissListener() {
@@ -96,15 +96,15 @@ public class EditVariableFragment extends BaseDialogFragment implements View.OnF
nameView.setShowSoftInputOnFocusCompat(true);
}
});
@Bind(R.id.variable_keyboard_button)
@BindView(R.id.variable_keyboard_button)
Button keyboardButton;
@Bind(R.id.variable_value_label)
@BindView(R.id.variable_value_label)
TextInputLayout valueLabel;
@Bind(R.id.variable_value)
@BindView(R.id.variable_value)
EditText valueView;
@Bind(R.id.variable_exponent_button)
@BindView(R.id.variable_exponent_button)
Button exponentButton;
@Bind(R.id.variable_description)
@BindView(R.id.variable_description)
EditText descriptionView;
@Inject
Calculator calculator;

View File

@@ -11,7 +11,7 @@ import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import butterknife.Bind;
import butterknife.BindView;
import butterknife.ButterKnife;
import org.solovyev.android.calculator.AppModule;
import org.solovyev.android.calculator.FragmentTab;
@@ -37,10 +37,10 @@ public class Tabs {
@Named(AppModule.PREFS_TABS)
SharedPreferences preferences;
@Nullable
@Bind(R.id.tabs)
@BindView(R.id.tabs)
TabLayout tabLayout;
@Nullable
@Bind(R.id.viewPager)
@BindView(R.id.viewPager)
ViewPager viewPager;
private int defaultSelectedTab = -1;