Skip to content

Commit a7f520e

Browse files
authored
Merge pull request #9 from ionic-team/cap-2.0
Update to Capacitor 2.0
2 parents 9aa8a5a + 31dd453 commit a7f520e

File tree

13 files changed

+2622
-1744
lines changed

13 files changed

+2622
-1744
lines changed

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.pg.ng.cap"
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.pg.ng.cap.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">

android/app/src/main/assets/capacitor.config.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"appId": "io.ionic.pg.ng.cap",
3-
"appName": "Photo Gallery Ng Cap",
2+
"appId": "io.ionic.demo.pg.cap.ng",
3+
"appName": "Photo Gallery Cap Ng",
44
"bundledWebRuntime": false,
55
"npmClient": "npm",
66
"webDir": "www",
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: 3 additions & 1 deletion
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'
10+
classpath 'com.android.tools.build:gradle:3.6.2'
1111
classpath 'com.google.gms:google-services:4.2.0'
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 16:15:29 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+
}

ios/App/App.xcodeproj/project.pbxproj

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@
127127
TargetAttributes = {
128128
504EC3031FED79650016851F = {
129129
CreatedOnToolsVersion = 9.2;
130+
LastSwiftMigration = 1140;
130131
ProvisioningStyle = Automatic;
131132
};
132133
};
@@ -350,12 +351,13 @@
350351
INFOPLIST_FILE = App/Info.plist;
351352
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
352353
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
354+
MARKETING_VERSION = 2.0;
353355
OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\"";
354356
PRODUCT_BUNDLE_IDENTIFIER = io.ionic.demo.pg.cap.ng;
355357
PRODUCT_NAME = "$(TARGET_NAME)";
356358
PROVISIONING_PROFILE_SPECIFIER = "";
357359
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG USE_PUSH";
358-
SWIFT_VERSION = 4.2;
360+
SWIFT_VERSION = 5.0;
359361
TARGETED_DEVICE_FAMILY = "1,2";
360362
};
361363
name = Debug;
@@ -371,11 +373,12 @@
371373
INFOPLIST_FILE = App/Info.plist;
372374
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
373375
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
376+
MARKETING_VERSION = 2.0;
374377
PRODUCT_BUNDLE_IDENTIFIER = io.ionic.demo.pg.cap.ng;
375378
PRODUCT_NAME = "$(TARGET_NAME)";
376379
PROVISIONING_PROFILE_SPECIFIER = "";
377380
SWIFT_ACTIVE_COMPILATION_CONDITIONS = USE_PUSH;
378-
SWIFT_VERSION = 4.2;
381+
SWIFT_VERSION = 5.0;
379382
TARGETED_DEVICE_FAMILY = "1,2";
380383
};
381384
name = Release;

ios/App/App/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<key>CFBundlePackageType</key>
1818
<string>APPL</string>
1919
<key>CFBundleShortVersionString</key>
20-
<string>1.0</string>
20+
<string>$(MARKETING_VERSION)</string>
2121
<key>CFBundleURLTypes</key>
2222
<array>
2323
<dict>

0 commit comments

Comments
 (0)