Skip to content

Commit ac83ac6

Browse files
authored
Merge pull request #1358 from sultanmyrza/feature-migrate-to-capacitor-3
Feature migrate to capacitor 3
2 parents afd3947 + 6589ef4 commit ac83ac6

File tree

89 files changed

+2181
-1639
lines changed

Some content is hidden

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

89 files changed

+2181
-1639
lines changed

android/app/capacitor.build.gradle

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,19 @@ dependencies {
1212
implementation project(':capacitor-community-bluetooth-le')
1313
implementation project(':capacitor-community-http')
1414
implementation project(':capacitor-community-wifi')
15+
implementation project(':capacitor-app')
16+
implementation project(':capacitor-browser')
17+
implementation project(':capacitor-camera')
18+
implementation project(':capacitor-clipboard')
19+
implementation project(':capacitor-device')
20+
implementation project(':capacitor-filesystem')
21+
implementation project(':capacitor-geolocation')
22+
implementation project(':capacitor-local-notifications')
23+
implementation project(':capacitor-network')
24+
implementation project(':capacitor-push-notifications')
25+
implementation project(':capacitor-share')
26+
implementation project(':capacitor-splash-screen')
27+
implementation project(':capacitor-storage')
1528
implementation project(':capacitor-blob-writer')
1629

1730
}
Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,25 @@
11
{
2-
"appId": "io.numbersprotocol.capturelite",
3-
"appName": "Capture",
4-
"bundledWebRuntime": false,
5-
"npmClient": "npm",
6-
"webDir": "www",
7-
"plugins": {
8-
"SplashScreen": {
9-
"androidScaleType": "CENTER_CROP",
10-
"launchAutoHide": false
11-
},
12-
"PushNotifications": {
13-
"presentationOptions": ["badge", "sound", "alert"]
14-
},
15-
"LocalNotifications": {
16-
"smallIcon": "ic_capture_lite",
17-
"iconColor": "#564dfc"
18-
}
19-
},
20-
"cordova": {}
2+
"appId": "io.numbersprotocol.capturelite",
3+
"appName": "Capture",
4+
"bundledWebRuntime": false,
5+
"npmClient": "npm",
6+
"webDir": "www",
7+
"plugins": {
8+
"SplashScreen": {
9+
"androidScaleType": "CENTER_CROP",
10+
"launchAutoHide": false
11+
},
12+
"PushNotifications": {
13+
"presentationOptions": [
14+
"badge",
15+
"sound",
16+
"alert"
17+
]
18+
},
19+
"LocalNotifications": {
20+
"smallIcon": "ic_capture_lite",
21+
"iconColor": "#564dfc"
22+
}
23+
},
24+
"cordova": {}
2125
}
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
[
2+
{
3+
"pkg": "@capacitor-community/bluetooth-le",
4+
"classpath": "com.capacitorjs.community.plugins.bluetoothle.BluetoothLe"
5+
},
6+
{
7+
"pkg": "@capacitor-community/http",
8+
"classpath": "com.getcapacitor.plugin.http.Http"
9+
},
10+
{
11+
"pkg": "@capacitor-community/wifi",
12+
"classpath": "com.digaus.capacitor.wifi.Wifi"
13+
},
14+
{
15+
"pkg": "@capacitor/app",
16+
"classpath": "com.capacitorjs.plugins.app.AppPlugin"
17+
},
18+
{
19+
"pkg": "@capacitor/browser",
20+
"classpath": "com.capacitorjs.plugins.browser.BrowserPlugin"
21+
},
22+
{
23+
"pkg": "@capacitor/camera",
24+
"classpath": "com.capacitorjs.plugins.camera.CameraPlugin"
25+
},
26+
{
27+
"pkg": "@capacitor/clipboard",
28+
"classpath": "com.capacitorjs.plugins.clipboard.ClipboardPlugin"
29+
},
30+
{
31+
"pkg": "@capacitor/device",
32+
"classpath": "com.capacitorjs.plugins.device.DevicePlugin"
33+
},
34+
{
35+
"pkg": "@capacitor/filesystem",
36+
"classpath": "com.capacitorjs.plugins.filesystem.FilesystemPlugin"
37+
},
38+
{
39+
"pkg": "@capacitor/geolocation",
40+
"classpath": "com.capacitorjs.plugins.geolocation.GeolocationPlugin"
41+
},
42+
{
43+
"pkg": "@capacitor/local-notifications",
44+
"classpath": "com.capacitorjs.plugins.localnotifications.LocalNotificationsPlugin"
45+
},
46+
{
47+
"pkg": "@capacitor/network",
48+
"classpath": "com.capacitorjs.plugins.network.NetworkPlugin"
49+
},
50+
{
51+
"pkg": "@capacitor/push-notifications",
52+
"classpath": "com.capacitorjs.plugins.pushnotifications.PushNotificationsPlugin"
53+
},
54+
{
55+
"pkg": "@capacitor/share",
56+
"classpath": "com.capacitorjs.plugins.share.SharePlugin"
57+
},
58+
{
59+
"pkg": "@capacitor/splash-screen",
60+
"classpath": "com.capacitorjs.plugins.splashscreen.SplashScreenPlugin"
61+
},
62+
{
63+
"pkg": "@capacitor/storage",
64+
"classpath": "com.capacitorjs.plugins.storage.StoragePlugin"
65+
},
66+
{
67+
"pkg": "capacitor-blob-writer",
68+
"classpath": "com.equimaps.capacitorblobwriter.BlobWriter"
69+
}
70+
]

android/app/src/main/java/io/numbersprotocol/capturelite/MainActivity.java

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@
55
import com.getcapacitor.BridgeActivity;
66
import com.getcapacitor.Plugin;
77

8-
import com.equimaps.capacitorblobwriter.BlobWriter;
9-
import com.capacitorjs.community.plugins.bluetoothle.BluetoothLe;
10-
import com.digaus.capacitor.wifi.Wifi;
11-
import com.getcapacitor.plugin.http.Http;
12-
138
import java.util.ArrayList;
149
import android.content.res.Configuration;
1510
import android.webkit.WebSettings;
@@ -41,18 +36,4 @@ public void onResume() {
4136
super.onResume();
4237
setDarkMode();
4338
}
44-
45-
@Override
46-
public void onCreate(Bundle savedInstanceState) {
47-
super.onCreate(savedInstanceState);
48-
49-
// Initializes the Bridge
50-
this.init(savedInstanceState, new ArrayList<Class<? extends Plugin>>() {{
51-
// Additional plugins you've installed go here
52-
add(BlobWriter.class);
53-
add(BluetoothLe.class);
54-
add(Wifi.class);
55-
add(Http.class);
56-
}});
57-
}
5839
}

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ buildscript {
77
jcenter()
88
}
99
dependencies {
10-
classpath 'com.android.tools.build:gradle:4.0.1'
10+
classpath 'com.android.tools.build:gradle:4.2.0'
1111
classpath 'com.google.gms:google-services:4.3.3'
1212

1313
// NOTE: Do not place your application dependencies here; they belong

android/capacitor.settings.gradle

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,44 @@ project(':capacitor-community-http').projectDir = new File('../node_modules/@cap
1111
include ':capacitor-community-wifi'
1212
project(':capacitor-community-wifi').projectDir = new File('../node_modules/@capacitor-community/wifi/android')
1313

14+
include ':capacitor-app'
15+
project(':capacitor-app').projectDir = new File('../node_modules/@capacitor/app/android')
16+
17+
include ':capacitor-browser'
18+
project(':capacitor-browser').projectDir = new File('../node_modules/@capacitor/browser/android')
19+
20+
include ':capacitor-camera'
21+
project(':capacitor-camera').projectDir = new File('../node_modules/@capacitor/camera/android')
22+
23+
include ':capacitor-clipboard'
24+
project(':capacitor-clipboard').projectDir = new File('../node_modules/@capacitor/clipboard/android')
25+
26+
include ':capacitor-device'
27+
project(':capacitor-device').projectDir = new File('../node_modules/@capacitor/device/android')
28+
29+
include ':capacitor-filesystem'
30+
project(':capacitor-filesystem').projectDir = new File('../node_modules/@capacitor/filesystem/android')
31+
32+
include ':capacitor-geolocation'
33+
project(':capacitor-geolocation').projectDir = new File('../node_modules/@capacitor/geolocation/android')
34+
35+
include ':capacitor-local-notifications'
36+
project(':capacitor-local-notifications').projectDir = new File('../node_modules/@capacitor/local-notifications/android')
37+
38+
include ':capacitor-network'
39+
project(':capacitor-network').projectDir = new File('../node_modules/@capacitor/network/android')
40+
41+
include ':capacitor-push-notifications'
42+
project(':capacitor-push-notifications').projectDir = new File('../node_modules/@capacitor/push-notifications/android')
43+
44+
include ':capacitor-share'
45+
project(':capacitor-share').projectDir = new File('../node_modules/@capacitor/share/android')
46+
47+
include ':capacitor-splash-screen'
48+
project(':capacitor-splash-screen').projectDir = new File('../node_modules/@capacitor/splash-screen/android')
49+
50+
include ':capacitor-storage'
51+
project(':capacitor-storage').projectDir = new File('../node_modules/@capacitor/storage/android')
52+
1453
include ':capacitor-blob-writer'
1554
project(':capacitor-blob-writer').projectDir = new File('../node_modules/capacitor-blob-writer/android')
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Fri Sep 25 10:04:21 CST 2020
1+
#Sat Feb 12 17:09:14 CST 2022
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-6.1.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip

android/variables.gradle

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,13 @@ ext {
22
minSdkVersion = 21
33
compileSdkVersion = 30
44
targetSdkVersion = 30
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'
5+
androidxActivityVersion = '1.2.0'
6+
androidxAppCompatVersion = '1.2.0'
7+
androidxCoordinatorLayoutVersion = '1.1.0'
8+
androidxCoreVersion = '1.3.2'
9+
androidxFragmentVersion = '1.3.0'
10+
junitVersion = '4.13.1'
11+
androidxJunitVersion = '1.1.2'
12+
androidxEspressoCoreVersion = '3.3.0'
1513
cordovaAndroidVersion = '7.0.0'
1614
}

ios/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44

55
App/build
66
App/Pods
7-
App/public
7+
App/App/public
88
App/Podfile.lock
9+
DerivedData
910
xcuserdata
1011

1112
# Cordova plugins for Capacitor

ios/App/App.xcodeproj/project.pbxproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
504EC30D1FED79650016851F /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 504EC30B1FED79650016851F /* Main.storyboard */; };
1414
504EC30F1FED79650016851F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 504EC30E1FED79650016851F /* Assets.xcassets */; };
1515
504EC3121FED79650016851F /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 504EC3101FED79650016851F /* LaunchScreen.storyboard */; };
16-
50B271D11FEDC1A000F3C39B /* public in Resources */ = {isa = PBXBuildFile; fileRef = 50B271D01FEDC1A000F3C39B /* public */; };
1716
A084ECDBA7D38E1E42DFC39D /* Pods_App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AF277DCFFFF123FFC6DF26C7 /* Pods_App.framework */; };
1817
DE095D00277AF00900242276 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = DE095CFF277AF00900242276 /* GoogleService-Info.plist */; };
18+
DE28999027B790A900F6581C /* public in Resources */ = {isa = PBXBuildFile; fileRef = DE28998F27B790A900F6581C /* public */; };
1919
/* End PBXBuildFile section */
2020

2121
/* Begin PBXFileReference section */
@@ -28,10 +28,10 @@
2828
504EC30E1FED79650016851F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
2929
504EC3111FED79650016851F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
3030
504EC3131FED79650016851F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
31-
50B271D01FEDC1A000F3C39B /* public */ = {isa = PBXFileReference; lastKnownFileType = folder; path = public; sourceTree = SOURCE_ROOT; };
3231
AF277DCFFFF123FFC6DF26C7 /* Pods_App.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_App.framework; sourceTree = BUILT_PRODUCTS_DIR; };
3332
AF51FD2D460BCFE21FA515B2 /* Pods-App.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-App.release.xcconfig"; path = "Pods/Target Support Files/Pods-App/Pods-App.release.xcconfig"; sourceTree = "<group>"; };
3433
DE095CFF277AF00900242276 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
34+
DE28998F27B790A900F6581C /* public */ = {isa = PBXFileReference; lastKnownFileType = folder; path = public; sourceTree = "<group>"; };
3535
FC68EB0AF532CFC21C3344DD /* Pods-App.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-App.debug.xcconfig"; path = "Pods/Target Support Files/Pods-App/Pods-App.debug.xcconfig"; sourceTree = "<group>"; };
3636
/* End PBXFileReference section */
3737

@@ -76,6 +76,7 @@
7676
504EC3061FED79650016851F /* App */ = {
7777
isa = PBXGroup;
7878
children = (
79+
DE28998F27B790A900F6581C /* public */,
7980
3A9F028D2565C4AD00C28730 /* App.entitlements */,
8081
50379B222058CBB4000EE86E /* capacitor.config.json */,
8182
504EC3071FED79650016851F /* AppDelegate.swift */,
@@ -85,7 +86,6 @@
8586
504EC3101FED79650016851F /* LaunchScreen.storyboard */,
8687
504EC3131FED79650016851F /* Info.plist */,
8788
2FAD9762203C412B000D30F8 /* config.xml */,
88-
50B271D01FEDC1A000F3C39B /* public */,
8989
);
9090
path = App;
9191
sourceTree = "<group>";
@@ -161,12 +161,12 @@
161161
buildActionMask = 2147483647;
162162
files = (
163163
504EC3121FED79650016851F /* LaunchScreen.storyboard in Resources */,
164-
50B271D11FEDC1A000F3C39B /* public in Resources */,
165164
504EC30F1FED79650016851F /* Assets.xcassets in Resources */,
166165
50379B232058CBB4000EE86E /* capacitor.config.json in Resources */,
167166
504EC30D1FED79650016851F /* Main.storyboard in Resources */,
168167
2FAD9763203C412B000D30F8 /* config.xml in Resources */,
169168
DE095D00277AF00900242276 /* GoogleService-Info.plist in Resources */,
169+
DE28999027B790A900F6581C /* public in Resources */,
170170
);
171171
runOnlyForDeploymentPostprocessing = 0;
172172
};
@@ -361,7 +361,7 @@
361361
CURRENT_PROJECT_VERSION = 2;
362362
DEVELOPMENT_TEAM = G7NB5YCKAP;
363363
INFOPLIST_FILE = App/Info.plist;
364-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
364+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
365365
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
366366
MARKETING_VERSION = 0.17.0;
367367
OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\"";
@@ -386,7 +386,7 @@
386386
CURRENT_PROJECT_VERSION = 2;
387387
DEVELOPMENT_TEAM = G7NB5YCKAP;
388388
INFOPLIST_FILE = App/Info.plist;
389-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
389+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
390390
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
391391
MARKETING_VERSION = 0.17.0;
392392
PRODUCT_BUNDLE_IDENTIFIER = io.numbersprotocol.capturelite;

0 commit comments

Comments
 (0)