Skip to content

Commit 6a6af32

Browse files
authored
Merge pull request #5 from ionic-team/cap-2
Update to Capacitor 2.0
2 parents bba18c7 + c3f0bea commit 6a6af32

16 files changed

Lines changed: 4095 additions & 2456 deletions

File tree

android/.idea/codeStyles/Project.xml

Lines changed: 116 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

android/.idea/misc.xml

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

android/app/build.gradle

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

33
android {
4-
compileSdkVersion 28
4+
compileSdkVersion rootProject.ext.compileSdkVersion
55
defaultConfig {
66
applicationId "io.ionic.starter"
7-
minSdkVersion 21
8-
targetSdkVersion 28
9-
versionCode 1
10-
versionName "1.0"
11-
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
7+
minSdkVersion rootProject.ext.minSdkVersion
8+
targetSdkVersion rootProject.ext.targetSdkVersion
9+
versionCode 2
10+
versionName "2.0"
11+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1212
}
1313
buildTypes {
1414
release {
@@ -29,11 +29,11 @@ repositories {
2929

3030
dependencies {
3131
implementation fileTree(include: ['*.jar'], dir: 'libs')
32-
implementation 'com.android.support:appcompat-v7:28.0.0'
32+
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
3333
implementation project(':capacitor-android')
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'
34+
testImplementation "junit:junit:$junitVersion"
35+
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
36+
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
3737
implementation project(':capacitor-cordova-android-plugins')
3838
}
3939

@@ -46,4 +46,4 @@ try {
4646
}
4747
} catch(Exception e) {
4848
logger.warn("google-services.json not found, google-services plugin not applied. Push Notifications won't work")
49-
}
49+
}

android/app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
android:theme="@style/AppTheme">
1212

1313
<activity
14-
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale"
14+
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode"
1515
android:name="io.ionic.starter.MainActivity"
1616
android:label="@string/title_activity_main"
1717
android:theme="@style/AppTheme.NoActionBarLaunch"
@@ -32,7 +32,7 @@
3232
</activity>
3333

3434
<provider
35-
android:name="android.support.v4.content.FileProvider"
35+
android:name="androidx.core.content.FileProvider"
3636
android:authorities="${applicationId}.fileprovider"
3737
android:exported="false"
3838
android:grantUriPermissions="true">
Lines changed: 2 additions & 2 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:app="http://schemas.android.com/apk/res-auto"
44
xmlns:tools="http://schemas.android.com/tools"
55
android:layout_width="match_parent"
@@ -9,4 +9,4 @@
99
<WebView
1010
android:layout_width="match_parent"
1111
android:layout_height="match_parent" />
12-
</android.support.design.widget.CoordinatorLayout>
12+
</androidx.coordinatorlayout.widget.CoordinatorLayout>
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<paths xmlns:android="http://schemas.android.com/apk/res/android">
33
<external-path name="my_images" path="." />
4-
</paths>
4+
<cache-path name="my_cache_images" path="." />
5+
</paths>

android/build.gradle

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,16 @@ buildscript {
77
jcenter()
88
}
99
dependencies {
10-
classpath 'com.android.tools.build:gradle:3.3.2'
11-
classpath 'com.google.gms:google-services:4.2.0'
10+
classpath 'com.android.tools.build:gradle:3.6.2'
11+
classpath 'com.google.gms:google-services:4.3.3'
1212

1313
// NOTE: Do not place your application dependencies here; they belong
1414
// in the individual module build.gradle files
1515
}
1616
}
1717

18+
apply from: "variables.gradle"
19+
1820
allprojects {
1921
repositories {
2022
google()

android/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.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Tue Jan 30 13:14:22 CST 2018
1+
#Wed Apr 15 15:01:19 CDT 2020
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip

android/variables.gradle

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
ext {
2+
minSdkVersion = 21
3+
compileSdkVersion = 29
4+
targetSdkVersion = 29
5+
androidxAppCompatVersion = '1.1.0'
6+
androidxCoreVersion = '1.2.0'
7+
androidxMaterialVersion = '1.1.0-rc02'
8+
androidxBrowserVersion = '1.2.0'
9+
androidxLocalbroadcastmanagerVersion = '1.0.0'
10+
firebaseMessagingVersion = '20.1.2'
11+
playServicesLocationVersion = '17.0.0'
12+
junitVersion = '4.12'
13+
androidxJunitVersion = '1.1.1'
14+
androidxEspressoCoreVersion = '3.2.0'
15+
cordovaAndroidVersion = '7.0.0'
16+
}

0 commit comments

Comments
 (0)