File tree Expand file tree Collapse file tree 27 files changed +90
-70
lines changed Expand file tree Collapse file tree 27 files changed +90
-70
lines changed Original file line number Diff line number Diff line change 47
47
steps :
48
48
- checkout
49
49
- run :
50
- command : ./gradlew clean build -b capacitor/build.gradle
50
+ command : ./gradlew clean build -b capacitor/build.gradle -Pandroid.useAndroidX=true -Pandroid.enableJetifier=true
51
51
working_directory : /tmp/workspace/android
52
52
53
53
workflows :
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ android {
8
8
targetSdkVersion 29
9
9
versionCode 1
10
10
versionName " 1.0"
11
- testInstrumentationRunner " android.support .test.runner.AndroidJUnitRunner"
11
+ testInstrumentationRunner " androidx .test.runner.AndroidJUnitRunner"
12
12
}
13
13
buildTypes {
14
14
release {
@@ -29,11 +29,11 @@ repositories {
29
29
30
30
dependencies {
31
31
implementation fileTree(include : [' *.jar' ], dir : ' libs' )
32
- implementation ' com.android.support :appcompat-v7:28 .0.0'
32
+ implementation ' androidx.appcompat :appcompat:1 .0.0'
33
33
implementation project(' :capacitor-android' )
34
34
testImplementation ' junit:junit:4.12'
35
- androidTestImplementation ' com.android.support. test:runner :1.0.2 '
36
- androidTestImplementation ' com.android.support. test.espresso:espresso-core:3.0.2 '
35
+ androidTestImplementation ' androidx. test.ext:junit :1.1.1 '
36
+ androidTestImplementation ' androidx. test.espresso:espresso-core:3.1.0 '
37
37
implementation project(' :capacitor-cordova-android-plugins' )
38
38
}
39
39
Original file line number Diff line number Diff line change 32
32
</activity >
33
33
34
34
<provider
35
- android : name =" android.support.v4 .content.FileProvider"
35
+ android : name =" androidx.core .content.FileProvider"
36
36
android : authorities =" ${applicationId}.fileprovider"
37
37
android : exported =" false"
38
38
android : grantUriPermissions =" true" >
Original file line number Diff line number Diff line change 1
1
<?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"
3
3
xmlns : app =" http://schemas.android.com/apk/res-auto"
4
4
xmlns : tools =" http://schemas.android.com/tools"
5
5
android : layout_width =" match_parent"
9
9
<WebView
10
10
android : layout_width =" match_parent"
11
11
android : layout_height =" match_parent" />
12
- </android .support.design .widget.CoordinatorLayout>
12
+ </androidx .coordinatorlayout .widget.CoordinatorLayout>
Original file line number Diff line number Diff line change @@ -15,3 +15,7 @@ org.gradle.jvmargs=-Xmx1536m
15
15
# This option should only be used with decoupled projects. More details, visit
16
16
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17
17
# org.gradle.parallel=true
18
+
19
+ # Supports AndroidX
20
+ android.useAndroidX =true
21
+ android.enableJetifier =true
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ android {
21
21
targetSdkVersion 29
22
22
versionCode 1
23
23
versionName " 1.0"
24
- testInstrumentationRunner " android.support .test.runner.AndroidJUnitRunner"
24
+ testInstrumentationRunner " androidx .test.runner.AndroidJUnitRunner"
25
25
}
26
26
buildTypes {
27
27
release {
@@ -42,15 +42,15 @@ repositories {
42
42
43
43
dependencies {
44
44
implementation fileTree(dir : ' libs' , include : [' *.jar' ])
45
- implementation ' com.android.support :appcompat-v7:28 .0.0'
46
- implementation ' com.android.support:support-compat:28.0 .0'
47
- implementation ' com.android.support:design:28.0.0 '
48
- implementation ' com.android.support:customtabs:28.0 .0'
45
+ implementation ' androidx.appcompat :appcompat:1 .0.0'
46
+ implementation ' androidx.core:core:1.2 .0'
47
+ implementation ' com.google. android.material:material:1.1.0-rc02 '
48
+ implementation ' androidx.browser:browser:1.2 .0'
49
49
implementation ' com.google.firebase:firebase-messaging:18.0.0'
50
50
implementation ' com.google.android.gms:play-services-location:16.0.0'
51
51
testImplementation ' junit:junit:4.12'
52
- androidTestImplementation ' com.android.support. test:runner :1.0.2 '
53
- androidTestImplementation ' com.android.support. test.espresso:espresso-core:3.0.2 '
52
+ androidTestImplementation ' androidx. test.ext:junit :1.1.1 '
53
+ androidTestImplementation ' androidx. test.espresso:espresso-core:3.1.0 '
54
54
implementation ' org.apache.cordova:framework:7.0.0'
55
55
}
56
56
Original file line number Diff line number Diff line change 4
4
import android .content .Context ;
5
5
import android .content .Intent ;
6
6
import android .os .Bundle ;
7
- import android .support .v7 .app .AppCompatActivity ;
8
7
import android .util .Log ;
9
8
import android .webkit .WebView ;
9
+
10
+ import androidx .appcompat .app .AppCompatActivity ;
11
+
10
12
import com .getcapacitor .android .R ;
11
13
import com .getcapacitor .cordova .MockCordovaInterfaceImpl ;
12
14
import com .getcapacitor .cordova .MockCordovaWebViewImpl ;
Original file line number Diff line number Diff line change 6
6
import android .content .DialogInterface ;
7
7
import android .os .Handler ;
8
8
import android .os .Looper ;
9
- import android .support .v4 .app .ActivityCompat ;
10
- import android .support .v7 .app .AppCompatActivity ;
11
9
import android .widget .EditText ;
12
10
11
+ import androidx .appcompat .app .AppCompatActivity ;
12
+
13
13
import com .getcapacitor .ui .ModalsBottomSheetDialogFragment ;
14
14
15
15
import org .json .JSONException ;
Original file line number Diff line number Diff line change 6
6
import android .content .pm .PackageInfo ;
7
7
import android .content .pm .PackageManager ;
8
8
import android .os .Bundle ;
9
- import android .support .v4 .app .ActivityCompat ;
10
- import android .support .v7 .app .AppCompatActivity ;
11
9
import android .util .Log ;
10
+
11
+ import androidx .appcompat .app .AppCompatActivity ;
12
+ import androidx .core .app .ActivityCompat ;
13
+
12
14
import org .json .JSONException ;
13
15
import org .json .JSONObject ;
14
16
Original file line number Diff line number Diff line change 5
5
import android .graphics .Color ;
6
6
import android .net .Uri ;
7
7
import android .os .Bundle ;
8
- import android .support .customtabs .CustomTabsCallback ;
9
- import android .support .customtabs .CustomTabsClient ;
10
- import android .support .customtabs .CustomTabsIntent ;
11
- import android .support .customtabs .CustomTabsServiceConnection ;
12
- import android .support .customtabs .CustomTabsSession ;
13
8
import android .util .Log ;
9
+
10
+ import androidx .browser .customtabs .CustomTabsCallback ;
11
+ import androidx .browser .customtabs .CustomTabsClient ;
12
+ import androidx .browser .customtabs .CustomTabsIntent ;
13
+ import androidx .browser .customtabs .CustomTabsServiceConnection ;
14
+ import androidx .browser .customtabs .CustomTabsSession ;
15
+
14
16
import com .getcapacitor .JSArray ;
15
17
import com .getcapacitor .JSObject ;
16
18
import com .getcapacitor .NativePlugin ;
Original file line number Diff line number Diff line change 10
10
import android .os .Bundle ;
11
11
import android .os .Environment ;
12
12
import android .provider .MediaStore ;
13
- import android .support .v4 .content .FileProvider ;
14
13
import android .util .Base64 ;
15
14
import android .util .Log ;
15
+
16
+ import androidx .core .content .FileProvider ;
17
+
16
18
import com .getcapacitor .Dialogs ;
17
19
import com .getcapacitor .FileUtils ;
18
20
import com .getcapacitor .JSObject ;
Original file line number Diff line number Diff line change 1
1
package com .getcapacitor .plugin ;
2
2
3
- import android .annotation .SuppressLint ;
4
3
import android .app .Activity ;
5
- import android .app .Dialog ;
6
- import android .graphics .Color ;
7
- import android .support .annotation .NonNull ;
8
- import android .support .design .widget .BottomSheetBehavior ;
9
- import android .support .design .widget .BottomSheetDialogFragment ;
10
- import android .support .design .widget .CoordinatorLayout ;
11
- import android .util .Log ;
12
- import android .view .View ;
13
- import android .view .Window ;
14
- import android .widget .LinearLayout ;
15
- import android .widget .TextView ;
16
-
17
- import com .getcapacitor .Bridge ;
4
+
18
5
import com .getcapacitor .Dialogs ;
19
6
import com .getcapacitor .JSArray ;
20
7
import com .getcapacitor .JSObject ;
24
11
import com .getcapacitor .PluginMethod ;
25
12
import com .getcapacitor .ui .ModalsBottomSheetDialogFragment ;
26
13
27
- import org .json .JSONException ;
28
- import org .json .JSONObject ;
29
-
30
- import java .util .List ;
31
-
32
14
/**
33
15
* Common popup modals
34
16
*/
Original file line number Diff line number Diff line change 2
2
3
3
import android .Manifest ;
4
4
import android .content .pm .PackageManager ;
5
- import android .support .v4 .app .NotificationManagerCompat ;
6
- import android .support .v4 .content .ContextCompat ;
5
+
6
+ import androidx .core .app .NotificationManagerCompat ;
7
+ import androidx .core .content .ContextCompat ;
7
8
8
9
import com .getcapacitor .JSObject ;
9
10
import com .getcapacitor .NativePlugin ;
Original file line number Diff line number Diff line change 10
10
import android .os .Build ;
11
11
import android .os .Bundle ;
12
12
import android .service .notification .StatusBarNotification ;
13
- import android . support . v4 .app .NotificationCompat ;
13
+ import androidx . core .app .NotificationCompat ;
14
14
import android .net .Uri ;
15
15
16
-
17
16
import android .util .Log ;
17
+
18
18
import com .getcapacitor .Bridge ;
19
19
import com .getcapacitor .JSArray ;
20
20
import com .getcapacitor .JSObject ;
Original file line number Diff line number Diff line change 2
2
3
3
import android .content .Intent ;
4
4
import android .net .Uri ;
5
- import android .support .v4 .content .FileProvider ;
6
5
import android .webkit .MimeTypeMap ;
7
6
7
+ import androidx .core .content .FileProvider ;
8
+
8
9
import com .getcapacitor .NativePlugin ;
9
10
import com .getcapacitor .Plugin ;
10
11
import com .getcapacitor .PluginCall ;
Original file line number Diff line number Diff line change 5
5
import android .content .Context ;
6
6
import android .content .Intent ;
7
7
import android .content .IntentFilter ;
8
- import android . support . v4 . content . LocalBroadcastManager ;
9
- import android . util . Log ;
8
+
9
+ import androidx . localbroadcastmanager . content . LocalBroadcastManager ;
10
10
11
11
import com .getcapacitor .Bridge ;
12
12
import com .getcapacitor .JSObject ;
Original file line number Diff line number Diff line change 2
2
3
3
import android .app .IntentService ;
4
4
import android .content .Intent ;
5
- import android .support .v4 .content .LocalBroadcastManager ;
6
5
import android .util .Log ;
6
+
7
+ import androidx .localbroadcastmanager .content .LocalBroadcastManager ;
8
+
7
9
import com .getcapacitor .LogUtils ;
8
10
9
11
public class BackgroundTaskService extends IntentService {
Original file line number Diff line number Diff line change 3
3
import android .app .Activity ;
4
4
import android .net .Uri ;
5
5
import android .os .Environment ;
6
- import android .support .v4 .content .FileProvider ;
7
6
import android .util .Log ;
8
7
8
+ import androidx .core .content .FileProvider ;
9
+
9
10
import com .getcapacitor .LogUtils ;
10
11
11
12
import java .io .File ;
Original file line number Diff line number Diff line change 10
10
import android .net .Uri ;
11
11
import android .os .Build ;
12
12
import android .os .Bundle ;
13
- import android .support .annotation .NonNull ;
14
- import android .support .annotation .Nullable ;
15
- import android .support .v4 .app .NotificationCompat ;
16
- import android .support .v4 .app .NotificationManagerCompat ;
17
- import android .support .v4 .app .RemoteInput ;
18
13
import android .util .Log ;
14
+
15
+ import androidx .annotation .NonNull ;
16
+ import androidx .annotation .Nullable ;
17
+ import androidx .core .app .NotificationCompat ;
18
+ import androidx .core .app .NotificationManagerCompat ;
19
+ import androidx .core .app .RemoteInput ;
20
+
19
21
import com .getcapacitor .JSObject ;
20
22
import com .getcapacitor .LogUtils ;
21
23
import com .getcapacitor .PluginCall ;
27
29
import java .util .Date ;
28
30
import java .util .List ;
29
31
32
+ import static androidx .core .app .NotificationCompat .VISIBILITY_PRIVATE ;
33
+
30
34
/**
31
35
* Contains implementations for all notification actions
32
36
*/
Original file line number Diff line number Diff line change 8
8
import android .graphics .BitmapFactory ;
9
9
import android .net .Uri ;
10
10
import android .os .StrictMode ;
11
- import android .support .v4 .content .FileProvider ;
12
11
import android .util .Log ;
12
+
13
+ import androidx .core .content .FileProvider ;
14
+
13
15
import com .getcapacitor .LogUtils ;
14
16
15
17
import java .io .File ;
Original file line number Diff line number Diff line change 3
3
import android .annotation .SuppressLint ;
4
4
import android .app .Dialog ;
5
5
import android .graphics .Color ;
6
- import android .support .annotation .NonNull ;
7
- import android .support .design .widget .BottomSheetBehavior ;
8
- import android .support .design .widget .BottomSheetDialogFragment ;
9
- import android .support .design .widget .CoordinatorLayout ;
10
6
import android .util .Log ;
11
7
import android .view .View ;
12
8
import android .view .Window ;
13
9
import android .widget .LinearLayout ;
14
10
import android .widget .TextView ;
11
+
12
+ import androidx .annotation .NonNull ;
13
+ import androidx .coordinatorlayout .widget .CoordinatorLayout ;
14
+
15
15
import com .getcapacitor .JSArray ;
16
16
import com .getcapacitor .JSObject ;
17
17
import com .getcapacitor .LogUtils ;
18
+ import com .google .android .material .bottomsheet .BottomSheetBehavior ;
19
+ import com .google .android .material .bottomsheet .BottomSheetDialogFragment ;
20
+
18
21
import org .json .JSONException ;
19
22
import org .json .JSONObject ;
20
23
Original file line number Diff line number Diff line change 1
1
<?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"
3
3
xmlns : app =" http://schemas.android.com/apk/res-auto"
4
4
xmlns : tools =" http://schemas.android.com/tools"
5
5
android : layout_width =" match_parent"
12
12
android : layout_width =" fill_parent"
13
13
android : layout_height =" fill_parent" />
14
14
15
- </android .support.design .widget.CoordinatorLayout>
15
+ </androidx .coordinatorlayout .widget.CoordinatorLayout>
Original file line number Diff line number Diff line change @@ -15,3 +15,7 @@ org.gradle.jvmargs=-Xmx1536m
15
15
# This option should only be used with decoupled projects. More details, visit
16
16
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17
17
# org.gradle.parallel=true
18
+
19
+ # Supports AndroidX
20
+ android.useAndroidX =true
21
+ android.enableJetifier =true
Original file line number Diff line number Diff line change 1
1
<?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"
3
3
xmlns : app =" http://schemas.android.com/apk/res-auto"
4
4
xmlns : tools =" http://schemas.android.com/tools"
5
5
android : layout_width =" match_parent"
6
6
android : layout_height =" match_parent"
7
7
tools : context =" com.getcapacitor.myapp.MainActivity"
8
8
>
9
9
10
- </android .support.design .widget.CoordinatorLayout>
10
+ </androidx .coordinatorlayout .widget.CoordinatorLayout>
Original file line number Diff line number Diff line change @@ -15,3 +15,7 @@ org.gradle.jvmargs=-Xmx1536m
15
15
# This option should only be used with decoupled projects. More details, visit
16
16
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17
17
# org.gradle.parallel=true
18
+
19
+ # Supports AndroidX
20
+ android.useAndroidX =true
21
+ android.enableJetifier =true
Original file line number Diff line number Diff line change @@ -15,3 +15,7 @@ org.gradle.jvmargs=-Xmx1536m
15
15
# This option should only be used with decoupled projects. More details, visit
16
16
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17
17
# org.gradle.parallel=true
18
+
19
+ # Supports AndroidX
20
+ android.useAndroidX =true
21
+ android.enableJetifier =true
You can’t perform that action at this time.
0 commit comments