Skip to content

Commit abdf3aa

Browse files
authored
Upgrade to Capacitor 6 (#355)
* Upgrade to Capacitor 6 * chore: change version + readme
1 parent c4a550f commit abdf3aa

File tree

8 files changed

+190
-106
lines changed

8 files changed

+190
-106
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<h1 align="center">CapacitorGoogleAuth</h1>
22
<p align="center"><strong><code>@codetrix-studio/capacitor-google-auth</code></strong></p>
3-
<p align="center"><strong>CAPACITOR 5</strong></p>
3+
<p align="center"><strong>CAPACITOR 6</strong></p>
44
<p align="center">
55
Capacitor plugin for Google Auth.
66
</p>
@@ -342,6 +342,8 @@ Install version 3.4.x:
342342
npm i --save @codetrix-studio/capacitor-google-auth@^3.4
343343
```
344344

345+
Follow instruction for you project [Updating to Capacitor 6](https://capacitorjs.com/docs/next/updating/6-0).
346+
345347
#### Migrate from 3.2.x to 3.3.x
346348

347349
Install version 3.3.x:

android/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@ buildscript {
1111
google()
1212
}
1313
dependencies {
14-
classpath 'com.android.tools.build:gradle:8.0.0'
15-
classpath 'com.google.gms:google-services:4.3.15'
14+
classpath 'com.android.tools.build:gradle:8.2.1'
15+
classpath 'com.google.gms:google-services:4.4.0'
1616
}
1717
}
1818

1919
apply plugin: 'com.android.library'
2020

2121
android {
2222
namespace "com.codetrixstudio.capacitor.GoogleAuth.capacitorgoogleauth"
23-
compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 33
23+
compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 34
2424
defaultConfig {
2525
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 22
26-
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 33
26+
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 34
2727
versionCode 1
2828
versionName "1.0"
2929
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
1.73 KB
Binary file not shown.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-all.zip
44
networkTimeout=10000
5+
validateDistributionUrl=true
56
zipStoreBase=GRADLE_USER_HOME
67
zipStorePath=wrapper/dists

android/gradlew

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,6 @@ done
8585
APP_BASE_NAME=${0##*/}
8686
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
8787

88-
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
89-
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
90-
9188
# Use the maximum available, or set MAX_FD != -1 to use that value.
9289
MAX_FD=maximum
9390

@@ -133,10 +130,13 @@ location of your Java installation."
133130
fi
134131
else
135132
JAVACMD=java
136-
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
133+
if ! command -v java >/dev/null 2>&1
134+
then
135+
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
137136
138137
Please set the JAVA_HOME variable in your environment to match the
139138
location of your Java installation."
139+
fi
140140
fi
141141

142142
# Increase the maximum file descriptors if we can.
@@ -197,6 +197,10 @@ if "$cygwin" || "$msys" ; then
197197
done
198198
fi
199199

200+
201+
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
202+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
203+
200204
# Collect all arguments for the java command;
201205
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
202206
# shell script including quotes and variable substitutions, so put them in

ios/Plugin/Plugin.m

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
#import <Foundation/Foundation.h>
22
#import <Capacitor/Capacitor.h>
33

4-
// Define the plugin using the CAP_PLUGIN Macro, and
5-
// each method the plugin supports using the CAP_PLUGIN_METHOD macro.
6-
CAP_PLUGIN(GoogleAuth, "GoogleAuth",
7-
CAP_PLUGIN_METHOD(signIn, CAPPluginReturnPromise);
8-
CAP_PLUGIN_METHOD(refresh, CAPPluginReturnPromise);
9-
CAP_PLUGIN_METHOD(signOut, CAPPluginReturnPromise);
10-
CAP_PLUGIN_METHOD(initialize, CAPPluginReturnPromise);
11-
)
4+
// Define the plugin using the CAP_PLUGIN Macro
5+
CAP_PLUGIN(GoogleAuth, "GoogleAuth")

0 commit comments

Comments
 (0)