Skip to content

Commit 3c1da1a

Browse files
mtjinhalfhp
authored andcommitted
upgrade gradle version and refactoring code in a line that doesn't affect the program (#99)
1 parent 8ad3fca commit 3c1da1a

File tree

8 files changed

+25
-19
lines changed

8 files changed

+25
-19
lines changed

androidplot-core/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ dependencies {
9292

9393
implementation 'com.halfhp.fig:figlib:1.0.7'
9494
implementation 'com.android.support:support-annotations:28.0.0'
95-
testImplementation "org.mockito:mockito-core:2.13.0"
95+
testImplementation "org.mockito:mockito-core:3.0.0"
9696
testImplementation group: 'junit', name: 'junit', version: '4.12'
97-
testImplementation "org.robolectric:robolectric:4.0.1"
97+
testImplementation "org.robolectric:robolectric:4.2.1"
9898

9999
// temp fix for:
100100
// https://github.com/robolectric/robolectric/issues/1932

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ buildscript {
3838
}
3939

4040
dependencies {
41-
classpath 'com.android.tools.build:gradle:3.4.2'
41+
classpath 'com.android.tools.build:gradle:3.5.3'
4242
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
43-
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.0'
43+
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
4444
classpath 'com.dicedmelon.gradle:jacoco-android:0.1.4'
4545
}
4646
}

demoapp/src/main/java/com/androidplot/demos/BarPlotExampleActivity.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import java.text.ParsePosition;
2323
import java.util.Arrays;
2424

25+
import android.annotation.SuppressLint;
2526
import android.app.Activity;
2627
import android.graphics.Color;
2728
import android.graphics.Paint;
@@ -86,6 +87,7 @@ private enum SeriesSize {
8687

8788
private Pair<Integer, XYSeries> selection;
8889

90+
@SuppressLint("ClickableViewAccessibility")
8991
@Override
9092
public void onCreate(Bundle savedInstanceState) {
9193

demoapp/src/main/java/com/androidplot/demos/DynamicXYPlotActivity.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,8 @@ public void notifyObservers() {
138138
private static final int MAX_AMP_SEED = 100;
139139
private static final int MIN_AMP_SEED = 10;
140140
private static final int AMP_STEP = 1;
141-
public static final int SINE1 = 0;
142-
public static final int SINE2 = 1;
141+
static final int SINE1 = 0;
142+
static final int SINE2 = 1;
143143
private static final int SAMPLE_SIZE = 31;
144144
private int phase = 0;
145145
private int sinAmp = 1;
@@ -150,7 +150,7 @@ public void notifyObservers() {
150150
notifier = new MyObservable();
151151
}
152152

153-
public void stopThread() {
153+
void stopThread() {
154154
keepRunning = false;
155155
}
156156

@@ -181,18 +181,18 @@ public void run() {
181181
}
182182
}
183183

184-
public int getItemCount(int series) {
184+
int getItemCount(int series) {
185185
return SAMPLE_SIZE;
186186
}
187187

188-
public Number getX(int series, int index) {
188+
Number getX(int series, int index) {
189189
if (index >= SAMPLE_SIZE) {
190190
throw new IllegalArgumentException();
191191
}
192192
return index;
193193
}
194194

195-
public Number getY(int series, int index) {
195+
Number getY(int series, int index) {
196196
if (index >= SAMPLE_SIZE) {
197197
throw new IllegalArgumentException();
198198
}
@@ -208,7 +208,7 @@ public Number getY(int series, int index) {
208208
}
209209
}
210210

211-
public void addObserver(Observer observer) {
211+
void addObserver(Observer observer) {
212212
notifier.addObserver(observer);
213213
}
214214

@@ -223,7 +223,7 @@ class SampleDynamicSeries implements XYSeries {
223223
private int seriesIndex;
224224
private String title;
225225

226-
public SampleDynamicSeries(SampleDynamicXYDatasource datasource, int seriesIndex, String title) {
226+
SampleDynamicSeries(SampleDynamicXYDatasource datasource, int seriesIndex, String title) {
227227
this.datasource = datasource;
228228
this.seriesIndex = seriesIndex;
229229
this.title = title;

demoapp/src/main/java/com/androidplot/demos/ECGExample.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public static class MyFadeFormatter extends AdvancedLineAndPointRenderer.Formatt
8282

8383
private int trailSize;
8484

85-
public MyFadeFormatter(int trailSize) {
85+
MyFadeFormatter(int trailSize) {
8686
this.trailSize = trailSize;
8787
}
8888

@@ -125,7 +125,7 @@ public static class ECGModel implements XYSeries {
125125
* @param size Sample size contained within this model
126126
* @param updateFreqHz Frequency at which new samples are added to the model
127127
*/
128-
public ECGModel(int size, int updateFreqHz) {
128+
ECGModel(int size, int updateFreqHz) {
129129
data = new Number[size];
130130
for(int i = 0; i < data.length; i++) {
131131
data[i] = 0;
@@ -176,7 +176,7 @@ public void run() {
176176
});
177177
}
178178

179-
public void start(final WeakReference<AdvancedLineAndPointRenderer> rendererRef) {
179+
void start(final WeakReference<AdvancedLineAndPointRenderer> rendererRef) {
180180
this.rendererRef = rendererRef;
181181
keepRunning = true;
182182
thread.start();

demoapp/src/main/java/com/androidplot/demos/ListViewActivity.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ protected void generateData() {
7878
double bp = Math.random();
7979

8080
LineAndPointFormatter lpf = new LineAndPointFormatter(
81-
Color.rgb(new Double(rl * 255).intValue(),
82-
new Double(gl * 255).intValue(), new Double(bl * 255).intValue()),
83-
Color.rgb(new Double(rp * 255).intValue(),
84-
new Double(gp * 255).intValue(), new Double(bp * 255).intValue()),
81+
Color.rgb(Double.valueOf(rl * 255).intValue(),
82+
Double.valueOf(gl * 255).intValue(), Double.valueOf(bl * 255).intValue()),
83+
Color.rgb(Double.valueOf(rp * 255).intValue(),
84+
Double.valueOf(gp * 255).intValue(), Double.valueOf(bp * 255).intValue()),
8585
null, null);
8686

8787
// for fun, configure interpolation on the formatter:

demoapp/src/main/java/com/androidplot/demos/SimplePieChartActivity.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
import android.animation.Animator;
2020
import android.animation.ValueAnimator;
21+
import android.annotation.SuppressLint;
2122
import android.app.Activity;
2223
import android.graphics.*;
2324
import android.os.Bundle;
@@ -52,6 +53,7 @@ public class SimplePieChartActivity extends Activity
5253
private Segment s3;
5354
private Segment s4;
5455

56+
@SuppressLint("ClickableViewAccessibility")
5557
@Override
5658
public void onCreate(Bundle savedInstanceState)
5759
{

demoapp/src/main/java/com/androidplot/demos/TimeSeriesActivity.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
package com.androidplot.demos;
1818

19+
import android.annotation.SuppressLint;
1920
import android.app.Activity;
2021
import android.graphics.Color;
2122
import android.graphics.DashPathEffect;
@@ -102,6 +103,7 @@ public void onCreate(Bundle savedInstanceState) {
102103
// create a simple date format that draws on the year portion of our timestamp.
103104
// see http://download.oracle.com/javase/1.4.2/docs/api/java/text/SimpleDateFormat.html
104105
// for a full description of SimpleDateFormat.
106+
@SuppressLint("SimpleDateFormat")
105107
private final SimpleDateFormat dateFormat = new SimpleDateFormat("MMM yyyy");
106108

107109
@Override

0 commit comments

Comments
 (0)