Skip to content

Commit bbed68d

Browse files
committed
issue #99: bumped project dependencies, updated configuration, removed legacy support annotations dependency from the library
1 parent 2e388d0 commit bbed68d

File tree

9 files changed

+28
-20
lines changed

9 files changed

+28
-20
lines changed

app/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@ android {
3232

3333
dependencies {
3434
implementation project(':library')
35-
implementation deps.appcompatv7
35+
implementation deps.appcompat
3636
}

app/src/main/java/com/github/pwittchen/reactivesensors/app/MainActivity.java

+14-3
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,21 @@
1717

1818
import android.content.Intent;
1919
import android.os.Bundle;
20-
import android.support.v7.app.AppCompatActivity;
21-
import android.view.View;
20+
import androidx.appcompat.app.AppCompatActivity;
2221
import com.github.pwittchen.reactivesensors.R;
23-
import com.github.pwittchen.reactivesensors.app.samples.*;
22+
import com.github.pwittchen.reactivesensors.app.samples.AccelerometerActivity;
23+
import com.github.pwittchen.reactivesensors.app.samples.AmbientTemperatureActivity;
24+
import com.github.pwittchen.reactivesensors.app.samples.GravityActivity;
25+
import com.github.pwittchen.reactivesensors.app.samples.GyroscopeActivity;
26+
import com.github.pwittchen.reactivesensors.app.samples.LightActivity;
27+
import com.github.pwittchen.reactivesensors.app.samples.LinearAccelerationActivity;
28+
import com.github.pwittchen.reactivesensors.app.samples.MagneticFieldActivity;
29+
import com.github.pwittchen.reactivesensors.app.samples.OrientationActivity;
30+
import com.github.pwittchen.reactivesensors.app.samples.PressureActivity;
31+
import com.github.pwittchen.reactivesensors.app.samples.ProximityActivity;
32+
import com.github.pwittchen.reactivesensors.app.samples.RelativeHumidityActivity;
33+
import com.github.pwittchen.reactivesensors.app.samples.RotationVectorActivity;
34+
import com.github.pwittchen.reactivesensors.app.samples.TemperatureActivity;
2435

2536
public class MainActivity extends AppCompatActivity {
2637

app/src/main/java/com/github/pwittchen/reactivesensors/app/SensorActivity.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package com.github.pwittchen.reactivesensors.app;
22

33
import android.os.Bundle;
4-
import android.support.v7.app.AppCompatActivity;
54
import android.widget.TextView;
5+
import androidx.appcompat.app.AppCompatActivity;
66
import com.github.pwittchen.reactivesensors.R;
77
import com.github.pwittchen.reactivesensors.library.ReactiveSensors;
88
import io.reactivex.rxjava3.disposables.Disposable;

build.gradle

+6-9
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,19 @@ ext {
77
compileSdkVersion = 29
88
targetSdkVersion = 29
99
buildToolsVersion = "29.0.3"
10-
kotlinVersion = "1.4.0"
10+
kotlinVersion = "1.4.2"
1111
}
1212

13-
ext.deps = [rxjava : 'io.reactivex.rxjava3:rxjava:3.0.7',
14-
rxandroid : 'io.reactivex.rxjava3:rxandroid:3.0.0',
15-
supportannotations: 'com.android.support:support-annotations:28.0.0',
16-
appcompatv7 : 'com.android.support:appcompat-v7:28.0.0',
17-
testingsupportlib : 'com.android.support.test:testing-support-lib:0.1',
18-
truth : 'com.google.truth:truth:1.0.1',
13+
ext.deps = [rxjava : 'io.reactivex.rxjava3:rxjava:3.1.6',
14+
rxandroid : 'io.reactivex.rxjava3:rxandroid:3.0.2',
15+
appcompat : 'androidx.appcompat:appcompat:1.3.1', // NOTE: newer versions may cause build errors!
16+
annotation : 'androidx.annotation:annotation:1.6.0',
17+
truth : 'com.google.truth:truth:1.1.3',
1918
kotlinstdlib : "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion",
2019
kotlingradleplugin: "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"]
2120

2221
buildscript {
2322
repositories {
24-
jcenter()
2523
google()
2624
mavenCentral()
2725
maven {
@@ -39,7 +37,6 @@ buildscript {
3937

4038
allprojects {
4139
repositories {
42-
jcenter()
4340
google()
4441
mavenCentral()
4542
maven {

config/quality.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ apply plugin: 'pmd'
55
check.dependsOn 'checkstyle', 'pmd', 'lint'
66

77
checkstyle {
8-
toolVersion = "6.0"
8+
toolVersion = "6.2"
99
}
1010

1111
task checkstyle(type: Checkstyle) {

config/quality/checkstyle/checkstyle.xml

-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@
109109
<!--<module name="InnerAssignment"/>-->
110110
<!--module name="MagicNumber"/-->
111111
<module name="MissingSwitchDefault"/>
112-
<module name="RedundantThrows"/>
113112
<module name="SimplifyBooleanExpression"/>
114113
<module name="SimplifyBooleanReturn"/>
115114

gradle.properties

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ POM_DEVELOPER_ID=pwittchen
1414
POM_DEVELOPER_NAME=Piotr Wittchen
1515

1616
org.gradle.daemon=true
17-
org.gradle.jvmargs=-XX:MaxPermSize=1024m -XX:+CMSClassUnloadingEnabled -XX:+HeapDumpOnOutOfMemoryError -Xmx2048m -XX:MaxHeapSize=3048
17+
org.gradle.jvmargs=-XX:MaxPermSize=1024m -XX:+CMSClassUnloadingEnabled -XX:+HeapDumpOnOutOfMemoryError -Xmx4608m -XX:MaxHeapSize=3048
18+
android.useAndroidX=true

library/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ android {
3636
dependencies {
3737
api deps.rxjava
3838
api deps.rxandroid
39-
implementation deps.supportannotations
39+
api deps.annotation
4040

41-
androidTestImplementation deps.testingsupportlib
41+
androidTestImplementation project(path: ':library')
4242
androidTestImplementation(deps.truth) {
4343
exclude group: 'junit' // Android has JUnit built in
4444
}

library/src/main/java/com/github/pwittchen/reactivesensors/library/ReactiveSensorEvent.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import android.hardware.Sensor;
1919
import android.hardware.SensorEvent;
2020
import android.os.Build;
21-
import android.support.annotation.RequiresApi;
21+
import androidx.annotation.RequiresApi;
2222

2323
public class ReactiveSensorEvent {
2424
private SensorEvent sensorEvent;

0 commit comments

Comments
 (0)