Skip to content

Commit 68e2531

Browse files
author
Matthias Prost
authored
fix: upgrade capacitor to v3 and changed api endpoint (#21)
* fix: upgrade capacitor to v3 and changed api endpoint * fix: android required files
1 parent 22bbede commit 68e2531

40 files changed

+1919
-1624
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ $RECYCLE.BIN/
3333
Thumbs.db
3434
UserInterfaceState.xcuserstate
3535

36-
environments/
36+
src/environments/

android/app/build.gradle

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ android {
66
applicationId "com.matthiasprost.scalewaymanager"
77
minSdkVersion rootProject.ext.minSdkVersion
88
targetSdkVersion rootProject.ext.targetSdkVersion
9-
versionCode 20206
10-
versionName "2.2.6"
9+
versionCode 20300
10+
versionName "2.3.0"
1111
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1212
}
1313
buildTypes {
@@ -25,6 +25,8 @@ repositories {
2525
}
2626

2727
dependencies {
28+
implementation "androidx.core:core-splashscreen:$coreSplashScreenVersion"
29+
implementation "androidx.coordinatorlayout:coordinatorlayout:$androidxCoordinatorLayoutVersion"
2830
implementation fileTree(include: ['*.jar'], dir: 'libs')
2931
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
3032
implementation project(':capacitor-android')

android/app/capacitor.build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ android {
99

1010
apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle"
1111
dependencies {
12-
12+
implementation project(':capacitor-status-bar')
1313
implementation "com.squareup.okhttp3:okhttp-urlconnection:3.10.0"
14-
implementation "com.android.support:support-v4:28.+"
14+
implementation "com.android.support:support-v4:27.+"
1515
}
1616

1717

android/app/src/main/AndroidManifest.xml

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

1313
<activity
14+
android:exported="true"
1415
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode"
1516
android:name="com.matthiasprost.scalewaymanager.MainActivity"
1617
android:label="@string/title_activity_main"
Lines changed: 37 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,39 @@
11
{
2-
"appId": "com.matthiasprost.scalewaymanager",
3-
"appName": "Scaleway Manager",
4-
"bundledWebRuntime": false,
5-
"npmClient": "npm",
6-
"webDir": "www",
7-
"plugins": {
8-
"SplashScreen": {
9-
"launchAutoHide": false
10-
}
11-
},
12-
"cordova": {
13-
"preferences": {
14-
"ScrollEnabled": "false",
15-
"android-minSdkVersion": "19",
16-
"BackupWebStorage": "none",
17-
"SplashMaintainAspectRatio": "true",
18-
"FadeSplashScreenDuration": "300",
19-
"SplashShowOnlyFirstTime": "false",
20-
"SplashScreen": "screen",
21-
"SplashScreenDelay": "3000",
22-
"StatusBarOverlaysWebView": "true",
23-
"ShowSplashScreenSpinner": "false",
24-
"WKWebViewOnly": "true"
25-
}
26-
}
2+
"appId": "com.matthiasprost.scalewaymanager",
3+
"appName": "Scaleway Manager",
4+
"bundledWebRuntime": false,
5+
"npmClient": "yarn",
6+
"webDir": "www",
7+
"plugins": {
8+
"SplashScreen": {
9+
"launchShowDuration": 3000,
10+
"launchAutoHide": true,
11+
"backgroundColor": "#ffffffff",
12+
"androidSplashResourceName": "splash",
13+
"androidScaleType": "CENTER_CROP",
14+
"showSpinner": true,
15+
"androidSpinnerStyle": "large",
16+
"iosSpinnerStyle": "small",
17+
"spinnerColor": "#999999",
18+
"splashFullScreen": true,
19+
"splashImmersive": true,
20+
"layoutName": "launch_screen",
21+
"useDialog": true
22+
}
23+
},
24+
"cordova": {
25+
"preferences": {
26+
"ScrollEnabled": "false",
27+
"android-minSdkVersion": "19",
28+
"BackupWebStorage": "none",
29+
"SplashMaintainAspectRatio": "true",
30+
"FadeSplashScreenDuration": "300",
31+
"SplashShowOnlyFirstTime": "false",
32+
"SplashScreen": "screen",
33+
"SplashScreenDelay": "3000",
34+
"StatusBarOverlaysWebView": "true",
35+
"ShowSplashScreenSpinner": "false",
36+
"WKWebViewOnly": "true"
37+
}
38+
}
2739
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[
2+
{
3+
"pkg": "@capacitor/status-bar",
4+
"classpath": "com.capacitorjs.plugins.statusbar.StatusBarPlugin"
5+
}
6+
]

android/app/src/main/java/com/matthiasprost/scalewaymanager/MainActivity.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,5 @@
88
import java.util.ArrayList;
99

1010
public class MainActivity extends BridgeActivity {
11-
@Override
12-
public void onCreate(Bundle savedInstanceState) {
13-
super.onCreate(savedInstanceState);
1411

15-
// Initializes the Bridge
16-
this.init(savedInstanceState, new ArrayList<Class<? extends Plugin>>() {{
17-
// Additional plugins you've installed go here
18-
// Ex: add(TotallyAwesomePlugin.class);
19-
}});
20-
}
2112
}

android/app/src/main/res/values/styles.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
<item name="colorAccent">@color/colorAccent</item>
1010
</style>
1111

12-
<style name="AppTheme.NoActionBar" parent="Theme.AppCompat.NoActionBar">
12+
<style name="AppTheme.NoActionBar" parent="Theme.AppCompat.DayNight.NoActionBar">
1313
<item name="windowActionBar">false</item>
1414
<item name="windowNoTitle">true</item>
1515
<item name="android:background">@null</item>
1616
</style>
1717

1818

19-
<style name="AppTheme.NoActionBarLaunch" parent="AppTheme.NoActionBar">
19+
<style name="AppTheme.NoActionBarLaunch" parent="Theme.SplashScreen">
2020
<item name="android:background">@drawable/splash</item>
2121
</style>
2222
</resources>

android/build.gradle

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ buildscript {
44

55
repositories {
66
google()
7-
jcenter()
7+
mavenCentral()
88
}
99
dependencies {
10-
classpath 'com.android.tools.build:gradle:4.2.0'
11-
classpath 'com.google.gms:google-services:4.3.3'
10+
classpath 'com.android.tools.build:gradle:7.2.1'
11+
classpath 'com.google.gms:google-services:4.3.13'
1212

1313
// NOTE: Do not place your application dependencies here; they belong
1414
// in the individual module build.gradle files
@@ -20,10 +20,11 @@ apply from: "variables.gradle"
2020
allprojects {
2121
repositories {
2222
google()
23-
jcenter()
23+
mavenCentral()
2424
}
2525
}
2626

2727
task clean(type: Delete) {
2828
delete rootProject.buildDir
2929
}
30+

android/capacitor.settings.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
// DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN
22
include ':capacitor-android'
33
project(':capacitor-android').projectDir = new File('../node_modules/@capacitor/android/capacitor')
4+
5+
include ':capacitor-status-bar'
6+
project(':capacitor-status-bar').projectDir = new File('../node_modules/@capacitor/status-bar/android')

0 commit comments

Comments
 (0)