Skip to content
This repository was archived by the owner on Jun 27, 2020. It is now read-only.
Merged
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
17 changes: 6 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,26 @@ language: android
jdk: oraclejdk8
android:
components:
# Uncomment the lines below if you want to
# use the latest revision of Android SDK Tools
- platform-tools
- tools

# The BuildTools version used by your project
- build-tools-25.0.2
- build-tools-26.0.2

# The SDK version used to compile your project
- android-25
- android-21
- android-26

# Additional components
- extra-google-google_play_services
- extra-google-m2repository
- extra-android-m2repository
- addon-google_apis-google-19
- addon-google_apis-google-26

# Specify at least one system image,
# if you need to run emulator(s) during your tests
- sys-img-armeabi-v7a-android-19
- sys-img-x86-android-17
- sys-img-armeabi-v7a-android-21

# Emulator Management: Create, Start and Wait
before_script:
- echo no | android create avd --force -n test -t android-19 --abi armeabi-v7a
- echo no | android create avd --force -n test -t android-21 --abi armeabi-v7a
- emulator -avd test -no-skin -no-audio -no-window &
- android-wait-for-emulator
- adb shell input keyevent 82 &
Expand Down
26 changes: 12 additions & 14 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,22 @@ repositories {
maven { url 'https://maven.fabric.io/public' }
}

apply plugin: 'com.neenbedankt.android-apt'

android {
compileSdkVersion 25
buildToolsVersion '25.0.2'
compileSdkVersion 26
buildToolsVersion '26.0.2'
defaultConfig {
applicationId 'com.blogspot.e_kanivets.moneytracker'
minSdkVersion 17
targetSdkVersion 25
targetSdkVersion 26
versionCode 20
versionName '1.8.3'
}
signingConfigs {
releaseConfig {
storeFile file('mt_keystore.jks');
storePassword('moneytracker');
storeFile file('mt_keystore.jks')
storePassword('moneytracker')
keyAlias 'moneytracker'
keyPassword 'moneytracker';
keyPassword 'moneytracker'
}
}
buildTypes {
Expand Down Expand Up @@ -64,13 +62,13 @@ dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])

compile('com.crashlytics.sdk.android:crashlytics:2.6.5@aar') {
transitive = true;
transitive = true
}

compile 'com.android.support:support-v4:25.1.0'
compile 'com.android.support:appcompat-v7:25.1.0'
compile 'com.android.support:design:25.1.0'
compile 'com.jakewharton:butterknife:7.0.1' // View annotation bindings
compile 'com.android.support:support-v4:26.1.0'
compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.android.support:design:26.1.0'
compile 'com.jakewharton:butterknife:8.5.1' // View annotation bindings
compile 'com.google.dagger:dagger:2.0.1' // Dependency injection tool
compile 'com.github.PhilJay:MPAndroidChart:v2.2.4' // Charts
compile 'com.jakewharton.timber:timber:4.1.2' // Advanced logging tool
Expand All @@ -82,6 +80,6 @@ dependencies {
androidTestCompile 'com.crittercism.dexmaker:dexmaker:1.4'
androidTestCompile 'com.crittercism.dexmaker:dexmaker-dx:1.4'
androidTestCompile 'com.crittercism.dexmaker:dexmaker-mockito:1.4'
apt 'com.google.dagger:dagger-compiler:2.0.1'
annotationProcessor 'com.google.dagger:dagger-compiler:2.0.1'
provided 'org.glassfish:javax.annotation:10.0-b28'
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,16 @@ public void testGetTable() throws Exception {
}

public void testContentValues() throws Exception {
Account account = new Account(-1, "title1", 100, "NON", 30);
Account account = new Account(-1, "title1", 100, "NON", 30, 0, false, 0);

ContentValues expected = new ContentValues();
expected.put(DbHelper.TITLE_COLUMN, "title1");
expected.put(DbHelper.CUR_SUM_COLUMN, 100L);
expected.put(DbHelper.CURRENCY_COLUMN, "NON");
expected.put(DbHelper.DECIMALS_COLUMN, 30L);
expected.put(DbHelper.GOAL_COLUMN, 0.0);
expected.put(DbHelper.ARCHIVED_COLUMN, false);
expected.put(DbHelper.COLOR_COLUMN, 0);

ContentValues actual = repo.contentValues(account);

Expand All @@ -71,7 +74,7 @@ public void testGetListFromCursor() throws Exception {
Mockito.when(mockCursor.getString(4)).thenReturn("NON");

List<Account> expected = new ArrayList<>();
expected.add(new Account(1, "title", 100, "NON", 0));
expected.add(new Account(1, "title", 100, "NON", 0, 0, false, 0));

assertEquals(expected, repo.getListFromCursor(mockCursor));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
import com.blogspot.e_kanivets.moneytracker.R;
import com.blogspot.e_kanivets.moneytracker.activity.base.BaseBackActivity;

import butterknife.Bind;
import butterknife.BindView;

public class AboutActivity extends BaseBackActivity {
@Bind(R.id.tv_about)
@BindView(R.id.tv_about)
TextView tvAbout;

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

import javax.inject.Inject;

import butterknife.Bind;
import butterknife.BindView;

public class ReportActivity extends BaseBackActivity {
@SuppressWarnings("unused")
Expand All @@ -43,9 +43,9 @@ public class ReportActivity extends BaseBackActivity {

private ShortSummaryPresenter shortSummaryPresenter;

@Bind(R.id.spinner_currency)
@BindView(R.id.spinner_currency)
AppCompatSpinner spinnerCurrency;
@Bind(R.id.exp_list_view)
@BindView(R.id.exp_list_view)
ExpandableListView expandableListView;

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

import javax.inject.Inject;

import butterknife.Bind;
import butterknife.BindView;
import butterknife.OnClick;
import butterknife.OnItemClick;

Expand All @@ -32,7 +32,7 @@ public class AccountsActivity extends BaseBackActivity {

private AccountsSummaryPresenter summaryPresenter;

@Bind(R.id.list_view)
@BindView(R.id.list_view)
ListView listView;

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

import javax.inject.Inject;

import butterknife.Bind;
import butterknife.BindView;

public class AddAccountActivity extends BaseBackActivity {
@SuppressWarnings("unused")
Expand All @@ -33,13 +33,13 @@ public class AddAccountActivity extends BaseBackActivity {

private IValidator<Account> accountValidator;

@Bind(R.id.content)
@BindView(R.id.content)
View contentView;
@Bind(R.id.et_title)
@BindView(R.id.et_title)
EditText etTitle;
@Bind(R.id.et_init_sum)
@BindView(R.id.et_init_sum)
EditText etInitSum;
@Bind(R.id.spinner)
@BindView(R.id.spinner)
AppCompatSpinner spinner;

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

import javax.inject.Inject;

import butterknife.Bind;
import butterknife.BindView;
import butterknife.OnClick;

public class EditAccountActivity extends BaseBackActivity {
Expand All @@ -26,11 +26,11 @@ public class EditAccountActivity extends BaseBackActivity {

private Account account;

@Bind(R.id.et_title)
@BindView(R.id.et_title)
EditText etTitle;
@Bind(R.id.et_goal)
@BindView(R.id.et_goal)
EditText etGoal;
@Bind(R.id.view_color)
@BindView(R.id.view_color)
View viewColor;

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

import javax.inject.Inject;

import butterknife.Bind;
import butterknife.BindView;

public class TransferActivity extends BaseBackActivity {
@SuppressWarnings("unused")
Expand All @@ -37,15 +37,15 @@ public class TransferActivity extends BaseBackActivity {

private List<Account> accountList;

@Bind(R.id.content)
@BindView(R.id.content)
View contentView;
@Bind(R.id.spinner_from)
@BindView(R.id.spinner_from)
AppCompatSpinner spinnerFrom;
@Bind(R.id.spinner_to)
@BindView(R.id.spinner_to)
AppCompatSpinner spinnerTo;
@Bind(R.id.et_from_amount)
@BindView(R.id.et_from_amount)
EditText etFromAmount;
@Bind(R.id.et_to_amount)
@BindView(R.id.et_to_amount)
EditText etToAmount;

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import com.blogspot.e_kanivets.moneytracker.activity.exchange_rate.ExchangeRatesActivity;
import com.blogspot.e_kanivets.moneytracker.util.AnswersProxy;

import butterknife.Bind;
import butterknife.BindView;

/**
* Base implementation of {@link android.support.v7.app.AppCompatActivity} to encapsulate Navigation
Expand All @@ -35,9 +35,9 @@ public abstract class BaseDrawerActivity extends BaseActivity
private static final int REQUEST_IMPORT_EXPORT = 4;
protected static final int REQUEST_BACKUP = 5;

@Bind(R.id.drawer_layout)
@BindView(R.id.drawer_layout)
DrawerLayout drawer;
@Bind(R.id.nav_view)
@BindView(R.id.nav_view)
protected NavigationView navigationView;

protected abstract void update();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

import javax.inject.Inject;

import butterknife.Bind;
import butterknife.BindView;

public class ChartsActivity extends BaseBackActivity {

Expand All @@ -34,9 +34,9 @@ public class ChartsActivity extends BaseBackActivity {
@Inject
CurrencyController currencyController;

@Bind(R.id.tabs)
@BindView(R.id.tabs)
TabLayout tabLayout;
@Bind(R.id.view_pager)
@BindView(R.id.view_pager)
ViewPager viewPager;

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import com.github.mikephil.charting.charts.BarChart;
import com.github.mikephil.charting.data.BarData;

import butterknife.Bind;
import butterknife.BindView;
import butterknife.ButterKnife;

/**
Expand All @@ -31,7 +31,7 @@ public class GraphFragment extends Fragment {
@Nullable
private String noDataText;

@Bind(R.id.bar_chart)
@BindView(R.id.bar_chart)
BarChart barChart;

public GraphFragment() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import com.blogspot.e_kanivets.moneytracker.adapter.MonthSummaryAdapter;
import com.blogspot.e_kanivets.moneytracker.report.chart.IMonthReport;

import butterknife.Bind;
import butterknife.BindView;
import butterknife.ButterKnife;

/**
Expand All @@ -26,7 +26,7 @@ public class SummaryFragment extends Fragment {
@Nullable
private IMonthReport monthReport;

@Bind(R.id.list_view)
@BindView(R.id.list_view)
ListView listView;

public SummaryFragment() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

import javax.inject.Inject;

import butterknife.Bind;
import butterknife.BindView;

public class AddExchangeRateActivity extends BaseBackActivity {
@SuppressWarnings("unused")
Expand All @@ -44,15 +44,15 @@ public class AddExchangeRateActivity extends BaseBackActivity {
@Nullable
private ExchangeRatePair exchangeRatePair;

@Bind(R.id.content)
@BindView(R.id.content)
View contentView;
@Bind(R.id.spinner_from_currency)
@BindView(R.id.spinner_from_currency)
AppCompatSpinner spinnerFromCurrency;
@Bind(R.id.spinner_to_currency)
@BindView(R.id.spinner_to_currency)
AppCompatSpinner spinnerToCurrency;
@Bind(R.id.et_buy)
@BindView(R.id.et_buy)
EditText etBuy;
@Bind(R.id.et_sell)
@BindView(R.id.et_sell)
EditText etSell;

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

import javax.inject.Inject;

import butterknife.Bind;
import butterknife.BindView;
import butterknife.OnClick;
import butterknife.OnItemClick;

Expand All @@ -37,7 +37,7 @@ public class ExchangeRatesActivity extends BaseBackActivity {

private List<ExchangeRatePair> exchangeRateList;

@Bind(R.id.list_view)
@BindView(R.id.list_view)
ListView listView;

@Override
Expand Down
Loading