Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: update to Capacitor 5 #355

Merged
merged 8 commits into from
Apr 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .changeset/gorgeous-tomatoes-sniff.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
"@capacitor-firebase/analytics": major
"@capacitor-firebase/app": major
"@capacitor-firebase/app-check": major
"@capacitor-firebase/authentication": major
"@capacitor-firebase/crashlytics": major
"@capacitor-firebase/messaging": major
"@capacitor-firebase/performance": major
"@capacitor-firebase/remote-config": major
---

feat!: update to Capacitor 5
2,866 changes: 1,813 additions & 1,053 deletions package-lock.json

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@
],
"scripts": {
"verify": "npm run verify:android && npm run verify:ios && npm run verify:web",
"verify:android": "turbo run verify:android --concurrency=1",
"verify:ios": "turbo run verify:ios --concurrency=1",
"verify:web": "turbo run verify:web",
"verify:android": "turbo run verify:android --concurrency=1 --no-cache",
"verify:ios": "turbo run verify:ios --concurrency=1 --no-cache",
"verify:web": "turbo run verify:web --no-cache",
"lint": "turbo run lint",
"fmt": "turbo run fmt",
"docgen": "turbo run docgen",
"build": "turbo run build",
"affected:verify": "npm run affected:verify:android && npm run affected:verify:ios && npm run affected:verify:web",
"affected:verify:android": "turbo run verify:android --since=origin/main --concurrency=1",
"affected:verify:ios": "turbo run verify:ios --since=origin/main --concurrency=1",
"affected:verify:web": "turbo run verify:web --since=origin/main",
"affected:verify:android": "turbo run verify:android --since=origin/main --concurrency=1 --no-cache",
"affected:verify:ios": "turbo run verify:ios --since=origin/main --concurrency=1 --no-cache",
"affected:verify:web": "turbo run verify:web --since=origin/main --no-cache",
"affected:lint": "turbo run lint --since=origin/main",
"affected:fmt": "turbo run fmt --since=origin/main",
"affected:docgen": "turbo run docgen --since=origin/main",
Expand Down
13 changes: 13 additions & 0 deletions packages/analytics/BREAKING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,21 @@ This is a comprehensive list of the breaking changes introduced in the major ver

## Versions

- [Version 5.x.x](#version-5xx)
- [Version 1.x.x](#version-1xx)

## Version 5.x.x

### Capacitor 5

This plugin now supports Capacitor 5 only. Please run `npx cap sync` after updating this package.

If you want to use this plugin with Capacitor 4, please install version `1.4.0`:

```
npm i @capacitor-firebase/analytics@1.4.0
```

## Version 1.x.x

### Capacitor 4
Expand Down
13 changes: 7 additions & 6 deletions packages/analytics/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ext {
junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.4.2'
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.3'
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.4.0'
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.6.1'
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.5'
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.5.1'
firebaseAnalyticsVersion = project.hasProperty('firebaseAnalyticsVersion') ? rootProject.ext.firebaseAnalyticsVersion : '21.2.0'
}

Expand All @@ -12,17 +12,18 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.1'
classpath 'com.android.tools.build:gradle:7.4.1'
}
}

apply plugin: 'com.android.library'

android {
compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 32
namespace "io.capawesome.capacitorjs.plugins.firebase.analytics"
compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 33
defaultConfig {
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 22
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 32
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 33
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand Down
2 changes: 0 additions & 2 deletions packages/analytics/android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,3 @@ org.gradle.jvmargs=-Xmx1536m
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
3 changes: 1 addition & 2 deletions packages/analytics/android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="io.capawesome.capacitorjs.plugins.firebase.analytics">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public void run() {
);
}

public void logEvent(@NonNull String key, JSONObject json) {
public void logEvent(@NonNull String key, @Nullable JSONObject json) {
Bundle bundle = FirebaseAnalyticsHelper.createBundleFromJson(json);
analyticsInstance.logEvent(key, bundle);
}
Expand Down
12 changes: 6 additions & 6 deletions packages/analytics/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@capacitor-firebase/analytics",
"version": "1.4.0",
"version": "4.0.0",
"description": "Capacitor plugin for Firebase Analytics.",
"main": "dist/plugin.cjs.js",
"module": "dist/esm/index.js",
Expand Down Expand Up @@ -55,11 +55,11 @@
"prepublishOnly": "npm run build"
},
"devDependencies": {
"@capacitor/android": "4.0.1",
"@capacitor/cli": "4.0.1",
"@capacitor/core": "4.0.1",
"@capacitor/android": "5.0.0-beta.1",
"@capacitor/cli": "5.0.0-beta.1",
"@capacitor/core": "5.0.0-beta.1",
"@capacitor/docgen": "0.2.1",
"@capacitor/ios": "4.0.1",
"@capacitor/ios": "5.0.0-beta.1",
"@ionic/eslint-config": "0.3.0",
"@ionic/prettier-config": "1.0.1",
"@ionic/swiftlint-config": "1.1.2",
Expand All @@ -73,7 +73,7 @@
"typescript": "4.1.5"
},
"peerDependencies": {
"@capacitor/core": "^4.0.0",
"@capacitor/core": "^5.0.0-beta.1",
"firebase": "^9.0.0"
},
"peerDependenciesMeta": {
Expand Down
16 changes: 16 additions & 0 deletions packages/app-check/BREAKING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
# Breaking Changes

This is a comprehensive list of the breaking changes introduced in the major version releases of Capacitor Firebase App Check plugin.

## Versions

- [Version 5.x.x](#version-5xx)

## Version 5.x.x

### Capacitor 5

This plugin now supports Capacitor 5 only. Please run `npx cap sync` after updating this package.

If you want to use this plugin with Capacitor 4, please install version `1.4.0`:

```
npm i @capacitor-firebase/app-check@1.4.0
```
13 changes: 7 additions & 6 deletions packages/app-check/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ext {
junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.4.2'
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.3'
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.4.0'
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.6.1'
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.5'
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.5.1'
firebaseAppCheckPlayIntegrityVersion = project.hasProperty('firebaseAppCheckPlayIntegrityVersion') ? rootProject.ext.firebaseAppCheckPlayIntegrityVersion : '16.1.0'
firebaseAppCheckDebugVersion = project.hasProperty('firebaseAppCheckDebugVersion') ? rootProject.ext.firebaseAppCheckDebugVersion : '16.1.0'
}
Expand All @@ -13,17 +13,18 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.1'
classpath 'com.android.tools.build:gradle:7.4.1'
}
}

apply plugin: 'com.android.library'

android {
compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 32
namespace "io.capawesome.capacitorjs.plugins.firebase.appcheck"
compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 33
defaultConfig {
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 22
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 32
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 33
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand Down
2 changes: 0 additions & 2 deletions packages/app-check/android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,3 @@ org.gradle.jvmargs=-Xmx1536m
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
3 changes: 1 addition & 2 deletions packages/app-check/android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="io.capawesome.capacitorjs.plugins.firebase.appcheck">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
</manifest>
12 changes: 6 additions & 6 deletions packages/app-check/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@capacitor-firebase/app-check",
"version": "1.4.0",
"version": "4.0.0",
"description": "Capacitor plugin for Firebase App Check.",
"main": "dist/plugin.cjs.js",
"module": "dist/esm/index.js",
Expand Down Expand Up @@ -55,11 +55,11 @@
"prepublishOnly": "npm run build"
},
"devDependencies": {
"@capacitor/android": "4.0.1",
"@capacitor/cli": "4.0.1",
"@capacitor/core": "4.0.1",
"@capacitor/android": "5.0.0-beta.1",
"@capacitor/cli": "5.0.0-beta.1",
"@capacitor/core": "5.0.0-beta.1",
"@capacitor/docgen": "0.2.1",
"@capacitor/ios": "4.0.1",
"@capacitor/ios": "5.0.0-beta.1",
"@ionic/eslint-config": "0.3.0",
"@ionic/prettier-config": "1.0.1",
"@ionic/swiftlint-config": "1.1.2",
Expand All @@ -73,7 +73,7 @@
"typescript": "4.1.5"
},
"peerDependencies": {
"@capacitor/core": "^4.0.0",
"@capacitor/core": "^5.0.0-beta.1",
"firebase": "^9.0.0"
},
"peerDependenciesMeta": {
Expand Down
13 changes: 13 additions & 0 deletions packages/app/BREAKING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,21 @@ This is a comprehensive list of the breaking changes introduced in the major ver

## Versions

- [Version 5.x.x](#version-5xx)
- [Version 1.x.x](#version-1xx)

## Version 5.x.x

### Capacitor 5

This plugin now supports Capacitor 5 only. Please run `npx cap sync` after updating this package.

If you want to use this plugin with Capacitor 4, please install version `1.4.0`:

```
npm i @capacitor-firebase/app@1.4.0
```

## Version 1.x.x

### Capacitor 4
Expand Down
13 changes: 7 additions & 6 deletions packages/app/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ext {
junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.4.2'
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.3'
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.4.0'
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.6.1'
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.5'
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.5.1'
firebaseCommonVersion = project.hasProperty('firebaseCommonVersion') ? rootProject.ext.firebaseCommonVersion : '20.2.0'
}

Expand All @@ -12,17 +12,18 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.1'
classpath 'com.android.tools.build:gradle:7.4.1'
}
}

apply plugin: 'com.android.library'

android {
compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 32
namespace "io.capawesome.capacitorjs.plugins.firebase.app"
compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 33
defaultConfig {
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 22
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 32
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 33
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand Down
2 changes: 0 additions & 2 deletions packages/app/android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,3 @@ org.gradle.jvmargs=-Xmx1536m
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
3 changes: 1 addition & 2 deletions packages/app/android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="io.capawesome.capacitorjs.plugins.firebase.app">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
</manifest>
12 changes: 6 additions & 6 deletions packages/app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@capacitor-firebase/app",
"version": "1.4.0",
"version": "4.0.0",
"description": "Capacitor plugin for Firebase App.",
"main": "dist/plugin.cjs.js",
"module": "dist/esm/index.js",
Expand Down Expand Up @@ -55,11 +55,11 @@
"prepublishOnly": "npm run build"
},
"devDependencies": {
"@capacitor/android": "4.0.1",
"@capacitor/cli": "4.0.1",
"@capacitor/core": "4.0.1",
"@capacitor/android": "5.0.0-beta.1",
"@capacitor/cli": "5.0.0-beta.1",
"@capacitor/core": "5.0.0-beta.1",
"@capacitor/docgen": "0.2.1",
"@capacitor/ios": "4.0.1",
"@capacitor/ios": "5.0.0-beta.1",
"@ionic/eslint-config": "0.3.0",
"@ionic/prettier-config": "1.0.1",
"@ionic/swiftlint-config": "1.1.2",
Expand All @@ -73,7 +73,7 @@
"typescript": "4.1.5"
},
"peerDependencies": {
"@capacitor/core": "^4.0.0",
"@capacitor/core": "^5.0.0-beta.1",
"firebase": "^9.0.0"
},
"peerDependenciesMeta": {
Expand Down
Loading