Skip to content

Commit 340dbcf

Browse files
committed
migrated to AndroidX
1 parent 1f1a9af commit 340dbcf

File tree

73 files changed

+331
-329
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+331
-329
lines changed

app/build.gradle

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
apply plugin: 'com.android.application'
22

33
android {
4-
compileSdkVersion 27
4+
compileSdkVersion 28
55
defaultConfig {
66
applicationId "com.flutterwave.rave_android"
77
minSdkVersion 15
8-
targetSdkVersion 27
8+
targetSdkVersion 28
99
versionCode 1
1010
versionName "1.0"
11-
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
11+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1212
}
1313
buildTypes {
1414
release {
@@ -27,12 +27,12 @@ android {
2727

2828
dependencies {
2929
implementation fileTree(include: ['*.jar'], dir: 'libs')
30-
implementation 'com.android.support:support-v4:27.1.1'
31-
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
30+
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
31+
androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', {
3232
exclude group: 'com.android.support', module: 'support-annotations'
3333
})
34-
implementation 'com.android.support:appcompat-v7:27.1.1'
35-
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
34+
implementation 'androidx.appcompat:appcompat:1.0.0'
35+
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
3636
testImplementation 'junit:junit:4.12'
3737
implementation project(':raveandroid')
3838
}

app/src/androidTest/java/com/flutterwave/rave_android/ExampleInstrumentedTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package com.flutterwave.rave_android;
22

33
import android.content.Context;
4-
import android.support.test.InstrumentationRegistry;
5-
import android.support.test.runner.AndroidJUnit4;
4+
import androidx.test.platform.app.InstrumentationRegistry;
5+
import androidx.test.ext.junit.runners.AndroidJUnit4;
66

77
import org.junit.Test;
88
import org.junit.runner.RunWith;

app/src/main/java/com/flutterwave/rave_android/MainActivity.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
import android.content.Intent;
44
import android.os.Bundle;
5-
import android.support.v7.app.AlertDialog;
6-
import android.support.v7.app.AppCompatActivity;
7-
import android.support.v7.widget.SwitchCompat;
5+
import androidx.appcompat.app.AlertDialog;
6+
import androidx.appcompat.app.AppCompatActivity;
7+
import androidx.appcompat.widget.SwitchCompat;
88
import android.util.Log;
99
import android.view.LayoutInflater;
1010
import android.view.View;

app/src/main/res/layout/activity_main.xml

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
33
xmlns:tools="http://schemas.android.com/tools"
44
android:layout_width="match_parent"
55
android:layout_height="match_parent"
@@ -21,7 +21,7 @@
2121
android:orientation="vertical"
2222
android:padding="30dp">
2323

24-
<android.support.v7.widget.SwitchCompat
24+
<androidx.appcompat.widget.SwitchCompat
2525
android:id="@+id/accountMpesaSwitch"
2626
android:layout_width="match_parent"
2727
android:layout_height="wrap_content"
@@ -30,71 +30,71 @@
3030
android:text="@string/mpesa" />
3131

3232

33-
<android.support.v7.widget.SwitchCompat
33+
<androidx.appcompat.widget.SwitchCompat
3434
android:id="@+id/isDisplayFeeSwitch"
3535
android:layout_width="match_parent"
3636
android:layout_height="wrap_content"
3737
android:layout_marginBottom="10dp"
3838
android:checked="true"
3939
android:text="@string/should_display_fee" />
4040

41-
<android.support.v7.widget.SwitchCompat
41+
<androidx.appcompat.widget.SwitchCompat
4242
android:id="@+id/shouldShowStagingLabelSwitch"
4343
android:layout_width="match_parent"
4444
android:layout_height="wrap_content"
4545
android:layout_marginBottom="10dp"
4646
android:checked="true"
4747
android:text="@string/staging" />
4848

49-
<android.support.v7.widget.SwitchCompat
49+
<androidx.appcompat.widget.SwitchCompat
5050
android:id="@+id/accountAchSwitch"
5151
android:layout_width="match_parent"
5252
android:layout_height="wrap_content"
5353
android:layout_marginBottom="10dp"
5454
android:checked="false"
5555
android:text="@string/ach" />
5656

57-
<android.support.v7.widget.SwitchCompat
57+
<androidx.appcompat.widget.SwitchCompat
5858
android:id="@+id/accountGHMobileMoneySwitch"
5959
android:layout_width="match_parent"
6060
android:layout_height="wrap_content"
6161
android:layout_marginBottom="10dp"
6262
android:checked="false"
6363
android:text="@string/ghana" />
6464

65-
<android.support.v7.widget.SwitchCompat
65+
<androidx.appcompat.widget.SwitchCompat
6666
android:id="@+id/accountUgMobileMoneySwitch"
6767
android:layout_width="match_parent"
6868
android:layout_height="wrap_content"
6969
android:layout_marginBottom="10dp"
7070
android:checked="false"
7171
android:text="@string/uganda" />
7272

73-
<android.support.v7.widget.SwitchCompat
73+
<androidx.appcompat.widget.SwitchCompat
7474
android:id="@+id/accountRwfMobileMoneySwitch"
7575
android:layout_width="match_parent"
7676
android:layout_height="wrap_content"
7777
android:layout_marginBottom="10dp"
7878
android:checked="false"
7979
android:text="@string/rwanda" />
8080

81-
<android.support.v7.widget.SwitchCompat
81+
<androidx.appcompat.widget.SwitchCompat
8282
android:id="@+id/accountZmMobileMoneySwitch"
8383
android:layout_width="match_parent"
8484
android:layout_height="wrap_content"
8585
android:layout_marginBottom="10dp"
8686
android:checked="false"
8787
android:text="@string/zambia" />
8888

89-
<android.support.v7.widget.SwitchCompat
89+
<androidx.appcompat.widget.SwitchCompat
9090
android:id="@+id/ussd_switch"
9191
android:layout_width="match_parent"
9292
android:layout_height="wrap_content"
9393
android:layout_marginBottom="10dp"
9494
android:checked="false"
9595
android:text="@string/accept_ussd_payments" />
9696

97-
<android.support.v7.widget.SwitchCompat
97+
<androidx.appcompat.widget.SwitchCompat
9898
android:id="@+id/barter_switch"
9999
android:layout_width="match_parent"
100100
android:layout_height="wrap_content"
@@ -103,7 +103,7 @@
103103
android:text="@string/accept_barter_payments" />
104104

105105

106-
<android.support.v7.widget.SwitchCompat
106+
<androidx.appcompat.widget.SwitchCompat
107107
android:id="@+id/addSubAccountsSwitch"
108108
android:layout_width="match_parent"
109109
android:layout_height="wrap_content"
@@ -151,15 +151,15 @@
151151

152152
</LinearLayout>
153153

154-
<android.support.v7.widget.SwitchCompat
154+
<androidx.appcompat.widget.SwitchCompat
155155
android:id="@+id/bankTransferSwitch"
156156
android:layout_width="match_parent"
157157
android:layout_height="wrap_content"
158158
android:layout_marginBottom="10dp"
159159
android:checked="false"
160160
android:text="@string/bank_transfer" />
161161

162-
<android.support.v7.widget.SwitchCompat
162+
<androidx.appcompat.widget.SwitchCompat
163163
android:id="@+id/isPermanentSwitch"
164164
android:layout_width="match_parent"
165165
android:layout_height="wrap_content"
@@ -171,7 +171,7 @@
171171
android:visibility="gone"
172172
tools:visibility="visible" />
173173

174-
<android.support.v7.widget.SwitchCompat
174+
<androidx.appcompat.widget.SwitchCompat
175175
android:id="@+id/setExpirySwitch"
176176
android:layout_width="match_parent"
177177
android:layout_height="wrap_content"
@@ -217,23 +217,23 @@
217217

218218
</LinearLayout>
219219

220-
<android.support.v7.widget.SwitchCompat
220+
<androidx.appcompat.widget.SwitchCompat
221221
android:id="@+id/accountfrancMobileMoneySwitch"
222222
android:layout_width="match_parent"
223223
android:layout_height="wrap_content"
224224
android:layout_marginBottom="10dp"
225225
android:checked="false"
226226
android:text="@string/francophone" />
227227

228-
<android.support.v7.widget.SwitchCompat
228+
<androidx.appcompat.widget.SwitchCompat
229229
android:id="@+id/accountUkbankSwitch"
230230
android:layout_width="match_parent"
231231
android:layout_height="wrap_content"
232232
android:layout_marginBottom="10dp"
233233
android:checked="false"
234234
android:text="@string/uk_bank" />
235235

236-
<android.support.v7.widget.SwitchCompat
236+
<androidx.appcompat.widget.SwitchCompat
237237
android:id="@+id/accountSaBankSwitch"
238238
android:layout_width="match_parent"
239239
android:layout_height="wrap_content"
@@ -242,39 +242,39 @@
242242
android:text="@string/sa_bank" />
243243

244244

245-
<android.support.v7.widget.SwitchCompat
245+
<androidx.appcompat.widget.SwitchCompat
246246
android:id="@+id/cardPaymentSwitch"
247247
android:layout_width="match_parent"
248248
android:layout_height="wrap_content"
249249
android:layout_marginBottom="10dp"
250250
android:checked="true"
251251
android:text="@string/accept_card_payments" />
252252

253-
<android.support.v7.widget.SwitchCompat
253+
<androidx.appcompat.widget.SwitchCompat
254254
android:id="@+id/allowSavedCardsSwitch"
255255
android:layout_width="match_parent"
256256
android:layout_height="wrap_content"
257257
android:layout_marginBottom="10dp"
258258
android:checked="true"
259259
android:text="@string/allow_saved_cards" />
260260

261-
<android.support.v7.widget.SwitchCompat
261+
<androidx.appcompat.widget.SwitchCompat
262262
android:id="@+id/accountPaymentSwitch"
263263
android:layout_width="match_parent"
264264
android:layout_height="wrap_content"
265265
android:layout_marginBottom="10dp"
266266
android:checked="true"
267267
android:text="@string/accept_account_payments" />
268268

269-
<android.support.v7.widget.SwitchCompat
269+
<androidx.appcompat.widget.SwitchCompat
270270
android:id="@+id/isPreAuthSwitch"
271271
android:layout_width="match_parent"
272272
android:layout_height="wrap_content"
273273
android:layout_marginBottom="10dp"
274274
android:checked="false"
275275
android:text="Pre Auth Charge" />
276276

277-
<android.support.v7.widget.SwitchCompat
277+
<androidx.appcompat.widget.SwitchCompat
278278
android:id="@+id/isLiveSwitch"
279279
android:layout_width="match_parent"
280280
android:layout_height="wrap_content"
@@ -390,4 +390,4 @@
390390

391391
</ScrollView>
392392

393-
</android.support.design.widget.CoordinatorLayout>
393+
</androidx.coordinatorlayout.widget.CoordinatorLayout>

gradle.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
# Specifies the JVM arguments used for the daemon process.
1111
# The setting is particularly useful for tweaking memory settings.
12+
android.enableJetifier=true
13+
android.useAndroidX=true
1214
org.gradle.jvmargs=-Xmx1536m
1315

1416
# When configured, Gradle will run in incubating parallel mode.

raveandroid/build.gradle

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ apply plugin: 'com.github.dcendents.android-maven'
33
group = 'com.github.flutterwave'
44

55
android {
6-
compileSdkVersion 27
6+
compileSdkVersion 28
77

88
defaultConfig {
99
minSdkVersion 15
10-
targetSdkVersion 27
10+
targetSdkVersion 28
1111
versionCode 1
1212
versionName "1.0.43"
1313

14-
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
14+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1515

1616
}
1717
buildTypes {
@@ -32,32 +32,32 @@ android {
3232

3333
dependencies {
3434
implementation fileTree(dir: 'libs', include: ['*.jar'])
35-
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
35+
androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', {
3636
exclude group: 'com.android.support', module: 'support-annotations'
3737
})
38-
implementation 'com.android.support:appcompat-v7:27.1.1'
39-
implementation 'com.android.support:design:27.1.1'
40-
implementation 'com.android.support:support-v4:27.1.1'
38+
implementation 'androidx.appcompat:appcompat:1.0.0'
39+
implementation 'com.google.android.material:material:1.0.0'
40+
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
4141
implementation 'com.squareup.picasso:picasso:2.71828'
4242
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
4343
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
4444
implementation 'com.squareup.okhttp3:logging-interceptor:3.9.1'
45-
implementation 'org.parceler:parceler-api:1.1.9'
46-
annotationProcessor 'org.parceler:parceler:1.1.9'
45+
implementation 'org.parceler:parceler-api:1.1.12'
46+
annotationProcessor 'org.parceler:parceler:1.1.12'
4747
implementation 'com.squareup.retrofit2:converter-scalars:2.1.0'
4848
implementation 'com.scottyab:aescrypt:0.0.1'
4949
testImplementation 'junit:junit:4.12'
5050
// dagger 2
5151
implementation 'com.google.dagger:dagger:2.17'
5252
annotationProcessor 'com.google.dagger:dagger-compiler:2.17'
53-
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
53+
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
5454

5555
testImplementation 'com.google.dagger:dagger:2.17'
5656
testAnnotationProcessor 'com.google.dagger:dagger-compiler:2.17'
5757
testImplementation 'org.mockito:mockito-core:2.25.0'
5858
testImplementation 'org.mockito:mockito-inline:2.13.0'
5959

60-
implementation 'com.android.support:cardview-v7:27.1.1'
60+
implementation 'androidx.cardview:cardview:1.0.0'
6161

6262

6363
}

raveandroid/src/androidTest/java/com/flutterwave/raveandroid/ExampleInstrumentedTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package com.flutterwave.raveandroid;
22

33
import android.content.Context;
4-
import android.support.test.InstrumentationRegistry;
5-
import android.support.test.runner.AndroidJUnit4;
4+
import androidx.test.platform.app.InstrumentationRegistry;
5+
import androidx.test.ext.junit.runners.AndroidJUnit4;
66

77
import org.junit.Test;
88
import org.junit.runner.RunWith;

raveandroid/src/main/java/com/flutterwave/raveandroid/MainPagerAdapter.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package com.flutterwave.raveandroid;
22

3-
import android.support.v4.app.Fragment;
4-
import android.support.v4.app.FragmentManager;
5-
import android.support.v4.app.FragmentPagerAdapter;
3+
import androidx.fragment.app.Fragment;
4+
import androidx.fragment.app.FragmentManager;
5+
import androidx.fragment.app.FragmentPagerAdapter;
66

77
import java.util.ArrayList;
88
import java.util.List;

raveandroid/src/main/java/com/flutterwave/raveandroid/RaveFragment.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package com.flutterwave.raveandroid;
22

33

4-
import android.support.v4.app.Fragment;
4+
import androidx.fragment.app.Fragment;
55

66
/**
77
* Created by hamzafetuga on 21/07/2017.

0 commit comments

Comments
 (0)