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

@ -23,7 +23,6 @@
apply plugin: 'com.android.application' apply plugin: 'com.android.application'
apply plugin: 'maven' apply plugin: 'maven'
apply plugin: 'signing' apply plugin: 'signing'
apply plugin: 'com.neenbedankt.android-apt'
android { android {
compileSdkVersion versions.sdk.compile compileSdkVersion versions.sdk.compile
@ -61,65 +60,68 @@ android {
sourceCompatibility JavaVersion.VERSION_1_7 sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7 targetCompatibility JavaVersion.VERSION_1_7
} }
defaultConfig {
javaCompileOptions {
annotationProcessorOptions {
arguments = ['library': 'true']
}
}
}
} }
dependencies { dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs') implementation "com.android.support:support-v4:${versions.supportLib}"
compile "com.android.support:support-v4:${versions.supportLib}" implementation "com.android.support:appcompat-v7:${versions.supportLib}"
compile "com.android.support:appcompat-v7:${versions.supportLib}" implementation "com.android.support:design:${versions.supportLib}"
compile "com.android.support:design:${versions.supportLib}" implementation('ch.acra:acra:4.7.0') {
compile('ch.acra:acra:4.7.0') {
exclude group: 'org.json' exclude group: 'org.json'
} }
compile ':measure:' implementation ':measure:'
compile ':square-otto:1.3.9-SNAPSHOT' implementation ':square-otto:1.3.9-SNAPSHOT'
apt ':square-otto-compiler:1.3.9-SNAPSHOT' annotationProcessor ':square-otto:1.3.9-SNAPSHOT'
apt 'com.squareup:javapoet:1.5.1' annotationProcessor ':square-otto-compiler:1.3.9-SNAPSHOT'
compile project(':dragbutton') annotationProcessor 'com.squareup:javapoet:1.5.1'
compile(project(':jscl')) { implementation project(':dragbutton')
implementation(project(':jscl')) {
exclude(module: 'xercesImpl') exclude(module: 'xercesImpl')
} }
compile 'org.solovyev.android:checkout:1.0.1' implementation 'org.solovyev.android:checkout:1.0.1'
compile 'org.solovyev.android:material:0.1.4@aar' implementation 'org.solovyev.android:material:0.1.4@aar'
compile "com.google.android.gms:play-services-ads:${versions.gpsLib}" implementation "com.google.android.gms:play-services-ads:${versions.gpsLib}"
compile "com.google.android.gms:play-services-base:${versions.gpsLib}" implementation "com.google.android.gms:play-services-base:${versions.gpsLib}"
compile "com.google.android.gms:play-services-analytics:${versions.gpsLib}" implementation "com.google.android.gms:play-services-analytics:${versions.gpsLib}"
compile(name: 'plotter', ext: 'aar') implementation(name: 'plotter', ext: 'aar')
compile 'com.google.guava:guava:20.0' implementation 'com.google.guava:guava:20.0'
compile('org.simpleframework:simple-xml:2.6.1') { implementation('org.simpleframework:simple-xml:2.6.1') {
exclude(module: 'stax') exclude(module: 'stax')
exclude(module: 'stax-api') exclude(module: 'stax-api')
exclude(module: 'xpp3') exclude(module: 'xpp3')
} }
compile 'com.jakewharton:butterknife:7.0.1' implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
compile 'com.google.dagger:dagger:2.0.2' implementation 'com.google.dagger:dagger:2.0.2'
apt "com.google.dagger:dagger-compiler:2.0.2" annotationProcessor "com.google.dagger:dagger-compiler:2.0.2"
compile 'javax.annotation:jsr250-api:1.0' implementation 'javax.annotation:jsr250-api:1.0'
testCompile 'junit:junit:4.12' testImplementation 'junit:junit:4.12'
testCompile 'net.sf.opencsv:opencsv:2.0' testImplementation 'net.sf.opencsv:opencsv:2.0'
testCompile 'org.mockito:mockito-core:1.9.0' testImplementation 'org.mockito:mockito-core:1.9.0'
testCompile 'org.robolectric:robolectric:3.4.2' testImplementation 'org.robolectric:robolectric:3.4.2'
testCompile 'org.mockito:mockito-all:1.9.5' testImplementation 'org.mockito:mockito-all:1.9.5'
testCompile 'org.skyscreamer:jsonassert:1.2.3' testImplementation 'org.skyscreamer:jsonassert:1.2.3'
testCompile(name: 'org.apache.http.legacy', ext: 'jar') testImplementation(name: 'org.apache.http.legacy', ext: 'jar')
androidTestCompile "com.android.support:support-annotations:${versions.supportLib}" androidTestImplementation "com.android.support:support-annotations:${versions.supportLib}"
androidTestCompile 'com.android.support.test:runner:0.5' androidTestImplementation'com.android.support.test:runner:0.5'
androidTestCompile 'com.android.support.test:rules:0.5' androidTestImplementation'com.android.support.test:rules:0.5'
androidTestCompile 'org.hamcrest:hamcrest-library:1.3' androidTestImplementation'org.hamcrest:hamcrest-library:1.3'
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
// use version of jsr305 provided by Checkout // use version of jsr305 provided by Checkout
exclude group: 'com.google.code.findbugs', module: 'jsr305' exclude group: 'com.google.code.findbugs', module: 'jsr305'
})} })}
apt {
arguments {
'otto.generate' 'anonymous'
}
}
tasks.withType(Test) { tasks.withType(Test) {
scanForTestClasses = false scanForTestClasses = false
include "**/*Test.class" include "**/*Test.class"

View File

@ -36,7 +36,7 @@ import javax.annotation.Nonnull;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import javax.inject.Inject; import javax.inject.Inject;
import butterknife.Bind; import butterknife.BindView;
import butterknife.ButterKnife; import butterknife.ButterKnife;
import dagger.Lazy; import dagger.Lazy;
@ -58,13 +58,13 @@ public abstract class BaseActivity extends AppCompatActivity implements SharedPr
Lazy<Ga> ga; Lazy<Ga> ga;
@Inject @Inject
Typeface typeface; Typeface typeface;
@Bind(R.id.main) @BindView(R.id.main)
ViewGroup mainView; ViewGroup mainView;
@Nullable @Nullable
@Bind(R.id.toolbar) @BindView(R.id.toolbar)
Toolbar toolbar; Toolbar toolbar;
@Nullable @Nullable
@Bind(R.id.fab) @BindView(R.id.fab)
FloatingActionButton fab; FloatingActionButton fab;
@Nonnull @Nonnull
private Preferences.Gui.Theme theme = Preferences.Gui.Theme.material_theme; 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.MenuItem;
import android.view.View; import android.view.View;
import android.widget.FrameLayout; import android.widget.FrameLayout;
import butterknife.Bind; import butterknife.BindView;
import jscl.AngleUnit; import jscl.AngleUnit;
import jscl.NumeralBase; import jscl.NumeralBase;
import org.solovyev.android.calculator.converter.ConverterFragment; import org.solovyev.android.calculator.converter.ConverterFragment;
@ -65,11 +65,11 @@ public class CalculatorActivity extends BaseActivity implements View.OnClickList
@Inject @Inject
StartupHelper startupHelper; StartupHelper startupHelper;
@Nullable @Nullable
@Bind(R.id.partial_keyboard) @BindView(R.id.partial_keyboard)
View partialKeyboard; View partialKeyboard;
@Bind(R.id.editor) @BindView(R.id.editor)
FrameLayout editor; FrameLayout editor;
@Bind(R.id.main_menu) @BindView(R.id.main_menu)
View mainMenuButton; View mainMenuButton;
private boolean useBackAsPrevious; private boolean useBackAsPrevious;

View File

@ -30,7 +30,8 @@ import android.support.annotation.Nullable;
import android.support.annotation.StringRes; import android.support.annotation.StringRes;
import android.support.v7.app.AlertDialog; import android.support.v7.app.AlertDialog;
import android.view.*; import android.view.*;
import butterknife.Bind;
import butterknife.BindView;
import butterknife.ButterKnife; import butterknife.ButterKnife;
import com.squareup.otto.Bus; import com.squareup.otto.Bus;
import jscl.NumeralBase; 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; DisplayView displayView;
@Inject @Inject
SharedPreferences preferences; SharedPreferences preferences;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -62,7 +62,7 @@ import javax.annotation.Nonnull;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import javax.inject.Inject; import javax.inject.Inject;
import butterknife.Bind; import butterknife.BindView;
import butterknife.ButterKnife; import butterknife.ButterKnife;
public abstract class BaseHistoryFragment extends BaseFragment { public abstract class BaseHistoryFragment extends BaseFragment {
@ -75,7 +75,7 @@ public abstract class BaseHistoryFragment extends BaseFragment {
Bus bus; Bus bus;
@Inject @Inject
Typeface typeface; Typeface typeface;
@Bind(R.id.history_recyclerview) @BindView(R.id.history_recyclerview)
RecyclerView recyclerView; RecyclerView recyclerView;
private HistoryAdapter adapter; 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 { 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; 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; TextView valueView;
@Bind(R.id.history_item_comment) @BindView(R.id.history_item_comment)
TextView commentView; TextView commentView;
@Bind(R.id.history_item_time) @BindView(R.id.history_item_time)
TextView timeView; TextView timeView;
@Nullable @Nullable
private HistoryState state; private HistoryState state;

View File

@ -12,7 +12,8 @@ import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.widget.EditText; import android.widget.EditText;
import android.widget.TextView; import android.widget.TextView;
import butterknife.Bind;
import butterknife.BindView;
import butterknife.ButterKnife; import butterknife.ButterKnife;
import org.solovyev.android.calculator.AppComponent; import org.solovyev.android.calculator.AppComponent;
import org.solovyev.android.calculator.BaseDialogFragment; import org.solovyev.android.calculator.BaseDialogFragment;
@ -32,10 +33,10 @@ public class EditHistoryFragment extends BaseDialogFragment {
boolean newState; boolean newState;
@Bind(R.id.history_expression) @BindView(R.id.history_expression)
TextView expressionView; TextView expressionView;
@Bind(R.id.history_comment) @BindView(R.id.history_comment)
EditText commentView; EditText commentView;
public static void show(@NonNull HistoryState state, boolean newState, @NonNull FragmentManager fm) { 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.content.SharedPreferences;
import android.support.annotation.Nullable; import android.support.annotation.Nullable;
import android.view.View; import android.view.View;
import butterknife.Bind; import butterknife.BindView;
import butterknife.ButterKnife; import butterknife.ButterKnife;
import com.squareup.otto.Bus; import com.squareup.otto.Bus;
import com.squareup.otto.Subscribe; import com.squareup.otto.Subscribe;
@ -24,25 +24,25 @@ import static org.solovyev.android.views.dragbutton.DragDirection.*;
public class KeyboardUi extends BaseKeyboardUi { public class KeyboardUi extends BaseKeyboardUi {
@Bind(R.id.cpp_button_0) @BindView(R.id.cpp_button_0)
public DirectionDragButton button0; public DirectionDragButton button0;
@Bind(R.id.cpp_button_1) @BindView(R.id.cpp_button_1)
public DirectionDragButton button1; public DirectionDragButton button1;
@Bind(R.id.cpp_button_2) @BindView(R.id.cpp_button_2)
public DirectionDragButton button2; public DirectionDragButton button2;
@Bind(R.id.cpp_button_3) @BindView(R.id.cpp_button_3)
public DirectionDragButton button3; public DirectionDragButton button3;
@Bind(R.id.cpp_button_4) @BindView(R.id.cpp_button_4)
public DirectionDragButton button4; public DirectionDragButton button4;
@Bind(R.id.cpp_button_5) @BindView(R.id.cpp_button_5)
public DirectionDragButton button5; public DirectionDragButton button5;
@Bind(R.id.cpp_button_6) @BindView(R.id.cpp_button_6)
public DirectionDragButton button6; public DirectionDragButton button6;
@Bind(R.id.cpp_button_7) @BindView(R.id.cpp_button_7)
public DirectionDragButton button7; public DirectionDragButton button7;
@Bind(R.id.cpp_button_8) @BindView(R.id.cpp_button_8)
public DirectionDragButton button8; public DirectionDragButton button8;
@Bind(R.id.cpp_button_9) @BindView(R.id.cpp_button_9)
public DirectionDragButton button9; public DirectionDragButton button9;
@Inject @Inject
Engine engine; Engine engine;
@ -52,35 +52,35 @@ public class KeyboardUi extends BaseKeyboardUi {
Bus bus; Bus bus;
@Inject @Inject
PartialKeyboardUi partialUi; PartialKeyboardUi partialUi;
@Bind(R.id.cpp_button_vars) @BindView(R.id.cpp_button_vars)
DirectionDragButton variablesButton; DirectionDragButton variablesButton;
@Nullable @Nullable
@Bind(R.id.cpp_button_operators) @BindView(R.id.cpp_button_operators)
DirectionDragButton operatorsButton; DirectionDragButton operatorsButton;
@Bind(R.id.cpp_button_functions) @BindView(R.id.cpp_button_functions)
DirectionDragButton functionsButton; DirectionDragButton functionsButton;
@Bind(R.id.cpp_button_history) @BindView(R.id.cpp_button_history)
DirectionDragButton historyButton; DirectionDragButton historyButton;
@Bind(R.id.cpp_button_multiplication) @BindView(R.id.cpp_button_multiplication)
DirectionDragButton multiplicationButton; DirectionDragButton multiplicationButton;
@Bind(R.id.cpp_button_plus) @BindView(R.id.cpp_button_plus)
DirectionDragButton plusButton; DirectionDragButton plusButton;
@Bind(R.id.cpp_button_subtraction) @BindView(R.id.cpp_button_subtraction)
DirectionDragButton subtractionButton; DirectionDragButton subtractionButton;
@Bind(R.id.cpp_button_division) @BindView(R.id.cpp_button_division)
DirectionDragButton divisionButton; DirectionDragButton divisionButton;
@Bind(R.id.cpp_button_period) @BindView(R.id.cpp_button_period)
DirectionDragButton periodButton; DirectionDragButton periodButton;
@Bind(R.id.cpp_button_round_brackets) @BindView(R.id.cpp_button_round_brackets)
DirectionDragButton bracketsButton; DirectionDragButton bracketsButton;
@Nullable @Nullable
@Bind(R.id.cpp_button_like) @BindView(R.id.cpp_button_like)
DirectionDragButton likeButton; DirectionDragButton likeButton;
@Nullable @Nullable
@Bind(R.id.cpp_button_percent) @BindView(R.id.cpp_button_percent)
DirectionDragButton percentButton; DirectionDragButton percentButton;
@Nullable @Nullable
@Bind(R.id.cpp_button_memory) @BindView(R.id.cpp_button_memory)
DirectionDragButton memoryButton; DirectionDragButton memoryButton;
@Inject @Inject

View File

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

View File

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

View File

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

View File

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

View File

@ -37,7 +37,7 @@ import java.util.List;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
import javax.inject.Inject; import javax.inject.Inject;
import butterknife.Bind; import butterknife.BindView;
import butterknife.ButterKnife; import butterknife.ButterKnife;
public class PlotFunctionsFragment extends BaseDialogFragment { 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 { 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; PlotIconView icon;
@Bind(R.id.function_name) @BindView(R.id.function_name)
TextView name; TextView name;
private PlotFunction function; private PlotFunction function;

View File

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

View File

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

View File

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

View File

@ -52,7 +52,6 @@ public class ValueOfFormatter<T> implements Formatter<T> {
return (ValueOfFormatter<T>) nullableFormatter; return (ValueOfFormatter<T>) nullableFormatter;
} }
@edu.umd.cs.findbugs.annotations.SuppressWarnings(value = {"NP_LOAD_OF_KNOWN_NULL_VALUE"}, justification = "If 'processNulls' is true => must result 'null'")
@Override @Override
public String formatValue(@Nullable T t) throws IllegalArgumentException { public String formatValue(@Nullable T t) throws IllegalArgumentException {
if (t == null) { if (t == null) {

View File

@ -1,29 +1,23 @@
buildscript { buildscript {
repositories { repositories {
google()
jcenter() jcenter()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:2.3.3' classpath 'com.android.tools.build:gradle:3.1.2'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4'
} }
ext { ext {
versions = [supportLib: "25.3.1", versions = [supportLib: "27.1.1",
gpsLib : "11.0.2", gpsLib : "11.0.2",
sdk : [compile: 25, buildTools: "25.0.3", min: 19, target: 25]] sdk : [compile: 27, buildTools: "27.0.3", min: 19, target: 27]]
} }
} }
allprojects { allprojects {
repositories { repositories {
google()
jcenter() jcenter()
def androidHome = System.getenv("ANDROID_HOME")
maven {
url "$androidHome/extras/android/m2repository/"
}
maven {
url "$androidHome/extras/google/m2repository/"
}
flatDir { flatDir {
dirs 'misc/libs' dirs 'misc/libs'

View File

@ -18,7 +18,6 @@ android {
} }
dependencies { dependencies {
compile fileTree(dir: 'libs', include: ['*.jar']) implementation "com.android.support:appcompat-v7:${versions.supportLib}"
compile "com.android.support:appcompat-v7:${versions.supportLib}" implementation "com.android.support:support-annotations:${versions.supportLib}"
compile "com.android.support:support-annotations:${versions.supportLib}"
} }

View File

@ -1,6 +1,6 @@
#Sat Apr 15 12:12:25 CEST 2017 #Sun Apr 29 18:31:04 CEST 2018
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip

View File

@ -23,13 +23,12 @@
apply plugin: 'java' apply plugin: 'java'
dependencies { dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs') implementation 'com.google.code.findbugs:jsr305:2.0.3'
compile 'com.google.code.findbugs:annotations:2.0.1' implementation 'xerces:xercesImpl:2.8.0'
compile 'xerces:xercesImpl:2.8.0' implementation 'com.google.guava:guava:20.0'
compile 'com.google.guava:guava:20.0'
testCompile 'junit:junit:4.12' testImplementation 'junit:junit:4.12'
testCompile 'net.sf.opencsv:opencsv:2.0' testImplementation 'net.sf.opencsv:opencsv:2.0'
} }
sourceSets { sourceSets {

View File

@ -24,7 +24,6 @@ public class FixedCapacityListMessageRegistry implements MessageRegistry {
this.messages = new ArrayList<Message>(capacity); this.messages = new ArrayList<Message>(capacity);
} }
@edu.umd.cs.findbugs.annotations.SuppressWarnings(value = {"VO_VOLATILE_INCREMENT"}, justification = "NotThreadSafe - outer synchronization")
public void addMessage(@Nonnull Message message) { public void addMessage(@Nonnull Message message) {
if (!this.messages.contains(message)) { if (!this.messages.contains(message)) {
if (this.size <= this.capacity) { if (this.size <= this.capacity) {
@ -37,7 +36,6 @@ public class FixedCapacityListMessageRegistry implements MessageRegistry {
} }
} }
@edu.umd.cs.findbugs.annotations.SuppressWarnings(value = {"VO_VOLATILE_INCREMENT"}, justification = "NotThreadSafe - outer synchronization")
@Nonnull @Nonnull
public Message getMessage() { public Message getMessage() {
if (hasMessage()) { if (hasMessage()) {

View File

@ -4,10 +4,9 @@ apply plugin: 'application'
mainClassName = 'org.solovyev.android.translations.Android' mainClassName = 'org.solovyev.android.translations.Android'
dependencies { dependencies {
compile fileTree(dir: 'libs', include: ['*.jar']) implementation 'commons-cli:commons-cli:1.3'
compile 'commons-cli:commons-cli:1.3' implementation 'org.apache.httpcomponents:httpclient:4.5.1'
compile 'org.apache.httpcomponents:httpclient:4.5.1' implementation 'org.json:json:20151123'
compile 'org.json:json:20151123' implementation 'org.simpleframework:simple-xml:2.7.1'
compile 'org.simpleframework:simple-xml:2.7.1' implementation 'commons-cli:commons-cli:1.3.1'
compile 'commons-cli:commons-cli:1.3.1'
} }