From 213103d212129cef5fecca8fd19df8a73a1a14a0 Mon Sep 17 00:00:00 2001 From: jcesarmobile Date: Fri, 15 Nov 2024 16:23:58 +0100 Subject: [PATCH 01/13] chore(android): Update default value of androidxCoreVersion (#2238) --- share/android/build.gradle | 2 +- status-bar/android/build.gradle | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/share/android/build.gradle b/share/android/build.gradle index 84ad0e448..5b4703486 100644 --- a/share/android/build.gradle +++ b/share/android/build.gradle @@ -2,7 +2,7 @@ ext { capacitorVersion = System.getenv('CAPACITOR_VERSION') junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2' androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.0' - androidxCoreVersion = project.hasProperty('androidxCoreVersion') ? rootProject.ext.androidxCoreVersion : '1.13.1' + androidxCoreVersion = project.hasProperty('androidxCoreVersion') ? rootProject.ext.androidxCoreVersion : '1.15.0' androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.2.1' androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.6.1' } diff --git a/status-bar/android/build.gradle b/status-bar/android/build.gradle index 161c6362c..ca75910d2 100644 --- a/status-bar/android/build.gradle +++ b/status-bar/android/build.gradle @@ -1,7 +1,7 @@ ext { capacitorVersion = System.getenv('CAPACITOR_VERSION') junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2' - androidxCoreVersion = project.hasProperty('androidxCoreVersion') ? rootProject.ext.androidxCoreVersion : '1.13.1' + androidxCoreVersion = project.hasProperty('androidxCoreVersion') ? rootProject.ext.androidxCoreVersion : '1.15.0' androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.0' androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.2.1' androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.6.1' From ebdb19346e629f53504624aade11371d72b11a6c Mon Sep 17 00:00:00 2001 From: jcesarmobile Date: Fri, 15 Nov 2024 16:48:37 +0100 Subject: [PATCH 02/13] refactor(text-zoom): don't use deprecated Plugins object (#2237) --- text-zoom/src/ios.ts | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/text-zoom/src/ios.ts b/text-zoom/src/ios.ts index 6aa7ec0a5..3b307a244 100644 --- a/text-zoom/src/ios.ts +++ b/text-zoom/src/ios.ts @@ -1,11 +1,4 @@ -import { Plugins } from '@capacitor/core'; - -import type { - GetPreferredResult, - GetResult, - SetOptions, - TextZoomPlugin, -} from './definitions'; +import type { GetResult, SetOptions, TextZoomPlugin } from './definitions'; export class TextZoomIOS implements TextZoomPlugin { static readonly TEXT_SIZE_REGEX = /(\d+)%/; @@ -17,8 +10,8 @@ export class TextZoomIOS implements TextZoomPlugin { return { value }; } - async getPreferred(): Promise { - return Plugins.TextZoom.getPreferred(); + async getPreferred(): Promise { + throw 'Native implementation will be used'; } async set(options: SetOptions): Promise { From 8db00701fcd067c8da37c8c7bfd219d15aac716e Mon Sep 17 00:00:00 2001 From: Eric Horodyski Date: Wed, 20 Nov 2024 09:55:56 -0500 Subject: [PATCH 03/13] refactor(statusbar): update getStatusBarHeight --- .../plugins/statusbar/StatusBar.java | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/status-bar/android/src/main/java/com/capacitorjs/plugins/statusbar/StatusBar.java b/status-bar/android/src/main/java/com/capacitorjs/plugins/statusbar/StatusBar.java index 1a903d133..a6570d4c1 100644 --- a/status-bar/android/src/main/java/com/capacitorjs/plugins/statusbar/StatusBar.java +++ b/status-bar/android/src/main/java/com/capacitorjs/plugins/statusbar/StatusBar.java @@ -1,9 +1,11 @@ package com.capacitorjs.plugins.statusbar; import android.graphics.Color; +import android.os.Build; import android.util.DisplayMetrics; import android.view.View; import android.view.Window; +import android.view.WindowInsets; import android.view.WindowManager; import androidx.appcompat.app.AppCompatActivity; import androidx.core.view.ViewCompat; @@ -113,15 +115,19 @@ private String getStyle() { } private int getStatusBarHeight() { - int statusbarHeight = 0; - int resourceId = activity.getApplicationContext().getResources().getIdentifier("status_bar_height", "dimen", "android"); - if (resourceId > 0) { - statusbarHeight = (int) activity.getApplicationContext().getResources().getDimension(resourceId); + DisplayMetrics metrics = activity.getResources().getDisplayMetrics(); + + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { + WindowInsets insets = activity.getWindowManager().getCurrentWindowMetrics().getWindowInsets(); + return (int) (insets.getInsets(WindowInsets.Type.statusBars()).top / metrics.density); } - DisplayMetrics metrics = activity.getApplicationContext().getResources().getDisplayMetrics(); - float densityDpi = metrics.density; + WindowInsets insets = activity.getWindow().getDecorView().getRootWindowInsets(); + if (insets != null) { + return (int) (insets.getSystemWindowInsetTop() / metrics.density); + } - return (int) (statusbarHeight / densityDpi); + // Fallback if the insets are not available + return 0; } } From 8449b188496d710699bc6f5bc031a28f44e29fbe Mon Sep 17 00:00:00 2001 From: jcesarmobile Date: Thu, 21 Nov 2024 09:16:01 +0100 Subject: [PATCH 04/13] feat(device)!: remove disk size related information (#2251) --- device/README.md | 37 ---------------- .../capacitorjs/plugins/device/Device.java | 22 ---------- .../plugins/device/DevicePlugin.java | 4 -- device/ios/Sources/DevicePlugin/Device.swift | 42 ------------------- .../Sources/DevicePlugin/DevicePlugin.swift | 7 ---- device/src/__tests__/useragent.spec.ts | 4 +- device/src/definitions.ts | 38 ----------------- 7 files changed, 1 insertion(+), 153 deletions(-) diff --git a/device/README.md b/device/README.md index 56c7d3947..39b6c154f 100644 --- a/device/README.md +++ b/device/README.md @@ -9,39 +9,6 @@ npm install @capacitor/device npx cap sync ``` -## Apple Privacy Manifest Requirements - -Apple mandates that app developers now specify approved reasons for API usage to enhance user privacy. By May 1st, 2024, it's required to include these reasons when submitting apps to the App Store Connect. - -When using this specific plugin in your app, you must create a `PrivacyInfo.xcprivacy` file in `/ios/App` or use the VS Code Extension to generate it, specifying the usage reasons. - -For detailed steps on how to do this, please see the [Capacitor Docs](https://capacitorjs.com/docs/ios/privacy-manifest). - -**For this plugin, the required dictionary key is [NSPrivacyAccessedAPICategoryDiskSpace](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api#4278397) and the recommended reason is [85F4.1](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api#4278397).** - -### Example PrivacyInfo.xcprivacy - -```xml - - - - - NSPrivacyAccessedAPITypes - - - - NSPrivacyAccessedAPIType - NSPrivacyAccessedAPICategoryDiskSpace - NSPrivacyAccessedAPITypeReasons - - 85F4.1 - - - - - -``` - ## Example Plugin Usage ```typescript @@ -176,10 +143,6 @@ Get the device's current language locale tag. | **`manufacturer`** | string | The manufacturer of the device. | 1.0.0 | | **`isVirtual`** | boolean | Whether the app is running in a simulator/emulator. | 1.0.0 | | **`memUsed`** | number | Approximate memory used by the current app, in bytes. Divide by 1048576 to get the number of MBs used. | 1.0.0 | -| **`diskFree`** | number | How much free disk space is available on the normal data storage path for the os, in bytes. On Android it returns the free disk space on the "system" partition holding the core Android OS. On iOS this value is not accurate. | 1.0.0 | -| **`diskTotal`** | number | The total size of the normal data storage path for the OS, in bytes. On Android it returns the disk space on the "system" partition holding the core Android OS. | 1.0.0 | -| **`realDiskFree`** | number | How much free disk space is available on the normal data storage, in bytes. | 1.1.0 | -| **`realDiskTotal`** | number | The total size of the normal data storage path, in bytes. | 1.1.0 | | **`webViewVersion`** | string | The web view browser version | 1.0.0 | diff --git a/device/android/src/main/java/com/capacitorjs/plugins/device/Device.java b/device/android/src/main/java/com/capacitorjs/plugins/device/Device.java index 477268c10..40d997550 100644 --- a/device/android/src/main/java/com/capacitorjs/plugins/device/Device.java +++ b/device/android/src/main/java/com/capacitorjs/plugins/device/Device.java @@ -7,8 +7,6 @@ import android.content.pm.PackageManager; import android.os.BatteryManager; import android.os.Build; -import android.os.Environment; -import android.os.StatFs; import android.provider.Settings; import android.webkit.WebView; @@ -26,26 +24,6 @@ public long getMemUsed() { return usedMem; } - public long getDiskFree() { - StatFs statFs = new StatFs(Environment.getRootDirectory().getAbsolutePath()); - return statFs.getAvailableBlocksLong() * statFs.getBlockSizeLong(); - } - - public long getDiskTotal() { - StatFs statFs = new StatFs(Environment.getRootDirectory().getAbsolutePath()); - return statFs.getBlockCountLong() * statFs.getBlockSizeLong(); - } - - public long getRealDiskFree() { - StatFs statFs = new StatFs(Environment.getDataDirectory().getAbsolutePath()); - return statFs.getAvailableBlocksLong() * statFs.getBlockSizeLong(); - } - - public long getRealDiskTotal() { - StatFs statFs = new StatFs(Environment.getDataDirectory().getAbsolutePath()); - return statFs.getBlockCountLong() * statFs.getBlockSizeLong(); - } - public String getPlatform() { return "android"; } diff --git a/device/android/src/main/java/com/capacitorjs/plugins/device/DevicePlugin.java b/device/android/src/main/java/com/capacitorjs/plugins/device/DevicePlugin.java index 9fed0725d..13f621353 100644 --- a/device/android/src/main/java/com/capacitorjs/plugins/device/DevicePlugin.java +++ b/device/android/src/main/java/com/capacitorjs/plugins/device/DevicePlugin.java @@ -32,10 +32,6 @@ public void getInfo(PluginCall call) { JSObject r = new JSObject(); r.put("memUsed", implementation.getMemUsed()); - r.put("diskFree", implementation.getDiskFree()); - r.put("diskTotal", implementation.getDiskTotal()); - r.put("realDiskFree", implementation.getRealDiskFree()); - r.put("realDiskTotal", implementation.getRealDiskTotal()); r.put("model", android.os.Build.MODEL); r.put("operatingSystem", "android"); r.put("osVersion", android.os.Build.VERSION.RELEASE); diff --git a/device/ios/Sources/DevicePlugin/Device.swift b/device/ios/Sources/DevicePlugin/Device.swift index cf2a0e832..22c194609 100644 --- a/device/ios/Sources/DevicePlugin/Device.swift +++ b/device/ios/Sources/DevicePlugin/Device.swift @@ -21,48 +21,6 @@ import UIKit } } - /** - * Get free disk space - */ - public func getFreeDiskSize() -> Int64? { - let paths = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true) - if let dictionary = try? FileManager.default.attributesOfFileSystem(forPath: paths.last!) { - if let freeSize = dictionary[FileAttributeKey.systemFreeSize] as? NSNumber { - return freeSize.int64Value - } - } - return nil - } - - /** - * Get real free disk space - */ - public func getRealFreeDiskSize() -> Int64? { - do { - let values = try URL(fileURLWithPath: NSHomeDirectory() as String).resourceValues(forKeys: [URLResourceKey.volumeAvailableCapacityForImportantUsageKey]) - if let available = values.volumeAvailableCapacityForImportantUsage { - return available - } else { - return nil - } - } catch { - return nil - } - } - - /** - * Get total disk size - */ - public func getTotalDiskSize() -> Int64? { - let paths = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true) - if let dictionary = try? FileManager.default.attributesOfFileSystem(forPath: paths.last!) { - if let freeSize = dictionary[FileAttributeKey.systemSize] as? NSNumber { - return freeSize.int64Value - } - } - return nil - } - public func getLanguageCode() -> String { return String(Locale.preferredLanguages[0].prefix(2)) } diff --git a/device/ios/Sources/DevicePlugin/DevicePlugin.swift b/device/ios/Sources/DevicePlugin/DevicePlugin.swift index 7b18c82ef..b340a7468 100644 --- a/device/ios/Sources/DevicePlugin/DevicePlugin.swift +++ b/device/ios/Sources/DevicePlugin/DevicePlugin.swift @@ -34,17 +34,10 @@ public class DevicePlugin: CAPPlugin, CAPBridgedPlugin { #endif let memUsed = implementation.getMemoryUsage() - let diskFree = implementation.getFreeDiskSize() ?? 0 - let realDiskFree = implementation.getRealFreeDiskSize() ?? 0 - let diskTotal = implementation.getTotalDiskSize() ?? 0 let systemVersionNum = implementation.getSystemVersionInt() ?? 0 call.resolve([ "memUsed": memUsed, - "diskFree": diskFree, - "diskTotal": diskTotal, - "realDiskFree": realDiskFree, - "realDiskTotal": diskTotal, "name": UIDevice.current.name, "model": modelName, "operatingSystem": "ios", diff --git a/device/src/__tests__/useragent.spec.ts b/device/src/__tests__/useragent.spec.ts index 35fa58c59..69df133b1 100644 --- a/device/src/__tests__/useragent.spec.ts +++ b/device/src/__tests__/useragent.spec.ts @@ -1,11 +1,9 @@ -import type { WebPluginConfig } from '@capacitor/core'; import { test } from 'uvu'; import * as assert from 'uvu/assert'; import { DeviceWeb } from '../web'; -const config: WebPluginConfig = { name: 'DevicePlugin' }; -const web = new DeviceWeb(config); +const web = new DeviceWeb(); test('Chrome', () => { // Mock empty navigator/window objects diff --git a/device/src/definitions.ts b/device/src/definitions.ts index fd64be9a2..bbe39d611 100644 --- a/device/src/definitions.ts +++ b/device/src/definitions.ts @@ -99,44 +99,6 @@ export interface DeviceInfo { */ memUsed?: number; - /** - * How much free disk space is available on the normal data storage - * path for the os, in bytes. - * - * On Android it returns the free disk space on the "system" - * partition holding the core Android OS. - * On iOS this value is not accurate. - * - * @deprecated Use `realDiskFree`. - * @since 1.0.0 - */ - diskFree?: number; - - /** - * The total size of the normal data storage path for the OS, in bytes. - * - * On Android it returns the disk space on the "system" - * partition holding the core Android OS. - * - * @deprecated Use `realDiskTotal`. - * @since 1.0.0 - */ - diskTotal?: number; - - /** - * How much free disk space is available on the normal data storage, in bytes. - * - * @since 1.1.0 - */ - realDiskFree?: number; - - /** - * The total size of the normal data storage path, in bytes. - * - * @since 1.1.0 - */ - realDiskTotal?: number; - /** * The web view browser version * From 00a6214701caf0d96995a956cc07636edc08ad0e Mon Sep 17 00:00:00 2001 From: jcesarmobile Date: Fri, 22 Nov 2024 19:01:34 +0100 Subject: [PATCH 05/13] chore(geolocation): Update playServicesLocationVersion default value (#2257) --- geolocation/README.md | 2 +- geolocation/android/build.gradle | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/geolocation/README.md b/geolocation/README.md index 2c2f86313..e390eac52 100644 --- a/geolocation/README.md +++ b/geolocation/README.md @@ -36,7 +36,7 @@ Read about [Setting Permissions](https://capacitorjs.com/docs/android/configurat This plugin will use the following project variables (defined in your app's `variables.gradle` file): -- `playServicesLocationVersion` version of `com.google.android.gms:play-services-location` (default: `21.1.0`) +- `playServicesLocationVersion` version of `com.google.android.gms:play-services-location` (default: `21.3.0`) ## Example diff --git a/geolocation/android/build.gradle b/geolocation/android/build.gradle index 31e2b7564..013a6ff4d 100644 --- a/geolocation/android/build.gradle +++ b/geolocation/android/build.gradle @@ -4,7 +4,7 @@ ext { androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.0' androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.2.1' androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.6.1' - playServicesLocationVersion = project.hasProperty('playServicesLocationVersion') ? rootProject.ext.playServicesLocationVersion : '21.1.0' + playServicesLocationVersion = project.hasProperty('playServicesLocationVersion') ? rootProject.ext.playServicesLocationVersion : '21.3.0' } buildscript { From c9b685ed43bc9251a278defc48e780177ea3e349 Mon Sep 17 00:00:00 2001 From: jcesarmobile Date: Fri, 22 Nov 2024 19:09:46 +0100 Subject: [PATCH 06/13] chore(browser): Update androidxBrowserVersion default value (#2256) --- browser/README.md | 2 +- browser/android/build.gradle | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/browser/README.md b/browser/README.md index 0c6a744d1..ac7553a67 100644 --- a/browser/README.md +++ b/browser/README.md @@ -17,7 +17,7 @@ npx cap sync This plugin will use the following project variables (defined in your app's `variables.gradle` file): -- `androidxBrowserVersion`: version of `androidx.browser:browser` (default: `1.7.0`) +- `androidxBrowserVersion`: version of `androidx.browser:browser` (default: `1.8.0`) ## Example diff --git a/browser/android/build.gradle b/browser/android/build.gradle index d5098ac19..dae05b3a4 100644 --- a/browser/android/build.gradle +++ b/browser/android/build.gradle @@ -4,7 +4,7 @@ ext { androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.0' androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.2.1' androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.6.1' - androidxBrowserVersion = project.hasProperty('androidxBrowserVersion') ? rootProject.ext.androidxBrowserVersion : '1.7.0' + androidxBrowserVersion = project.hasProperty('androidxBrowserVersion') ? rootProject.ext.androidxBrowserVersion : '1.8.0' } buildscript { From fabb46ebd559cf485edad88736f78d3e4fe1a24c Mon Sep 17 00:00:00 2001 From: jcesarmobile Date: Fri, 22 Nov 2024 19:16:58 +0100 Subject: [PATCH 07/13] chore(camera): Update androidx Material and ExifInterface default values (#2255) --- camera/README.md | 4 ++-- camera/android/build.gradle | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/camera/README.md b/camera/README.md index 49a48d096..9ad234eee 100644 --- a/camera/README.md +++ b/camera/README.md @@ -68,8 +68,8 @@ Additionally, because the Camera API launches a separate Activity to handle taki This plugin will use the following project variables (defined in your app's `variables.gradle` file): -- `androidxExifInterfaceVersion`: version of `androidx.exifinterface:exifinterface` (default: `1.3.6`) -- `androidxMaterialVersion`: version of `com.google.android.material:material` (default: `1.10.0`) +- `androidxExifInterfaceVersion`: version of `androidx.exifinterface:exifinterface` (default: `1.3.7`) +- `androidxMaterialVersion`: version of `com.google.android.material:material` (default: `1.12.0`) ## PWA Notes diff --git a/camera/android/build.gradle b/camera/android/build.gradle index 34bda0ae0..98f17df6a 100644 --- a/camera/android/build.gradle +++ b/camera/android/build.gradle @@ -3,9 +3,9 @@ ext { junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2' androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.0' androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.6.1' - androidxExifInterfaceVersion = project.hasProperty('androidxExifInterfaceVersion') ? rootProject.ext.androidxExifInterfaceVersion : '1.3.6' + androidxExifInterfaceVersion = project.hasProperty('androidxExifInterfaceVersion') ? rootProject.ext.androidxExifInterfaceVersion : '1.3.7' androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.2.1' - androidxMaterialVersion = project.hasProperty('androidxMaterialVersion') ? rootProject.ext.androidxMaterialVersion : '1.10.0' + androidxMaterialVersion = project.hasProperty('androidxMaterialVersion') ? rootProject.ext.androidxMaterialVersion : '1.12.0' } buildscript { From fe1b05cb07f623c0629cdc7cca4186b2ad7db476 Mon Sep 17 00:00:00 2001 From: jcesarmobile Date: Fri, 22 Nov 2024 19:21:17 +0100 Subject: [PATCH 08/13] chore(action-sheet): Update androidxMaterialVersion default value (#2254) --- action-sheet/README.md | 2 +- action-sheet/android/build.gradle | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/action-sheet/README.md b/action-sheet/README.md index 2c9872ed1..b72498423 100644 --- a/action-sheet/README.md +++ b/action-sheet/README.md @@ -13,7 +13,7 @@ npx cap sync This plugin will use the following project variables (defined in your app's `variables.gradle` file): -- `androidxMaterialVersion`: version of `com.google.android.material:material` (default: `1.10.0`) +- `androidxMaterialVersion`: version of `com.google.android.material:material` (default: `1.12.0`) ## PWA Notes diff --git a/action-sheet/android/build.gradle b/action-sheet/android/build.gradle index 96ceb4473..872de35ad 100644 --- a/action-sheet/android/build.gradle +++ b/action-sheet/android/build.gradle @@ -2,7 +2,7 @@ ext { capacitorVersion = System.getenv('CAPACITOR_VERSION') junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2' androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.0' - androidxMaterialVersion = project.hasProperty('androidxMaterialVersion') ? rootProject.ext.androidxMaterialVersion : '1.10.0' + androidxMaterialVersion = project.hasProperty('androidxMaterialVersion') ? rootProject.ext.androidxMaterialVersion : '1.12.0' androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.2.1' androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.6.1' } From 3002f53066e82323668cf4174340c2c9c0645499 Mon Sep 17 00:00:00 2001 From: jcesarmobile Date: Fri, 22 Nov 2024 19:27:12 +0100 Subject: [PATCH 09/13] refactor(haptics)!: remove unused and deprecated code (#2250) --- .../capacitorjs/plugins/haptics/Haptics.java | 8 +++---- haptics/src/definitions.ts | 24 ------------------- 2 files changed, 3 insertions(+), 29 deletions(-) diff --git a/haptics/android/src/main/java/com/capacitorjs/plugins/haptics/Haptics.java b/haptics/android/src/main/java/com/capacitorjs/plugins/haptics/Haptics.java index e9f182e68..392aa4190 100644 --- a/haptics/android/src/main/java/com/capacitorjs/plugins/haptics/Haptics.java +++ b/haptics/android/src/main/java/com/capacitorjs/plugins/haptics/Haptics.java @@ -10,12 +10,10 @@ public class Haptics { - private Context context; private boolean selectionStarted = false; private final Vibrator vibrator; Haptics(Context context) { - this.context = context; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { VibratorManager vibratorManager = (VibratorManager) context.getSystemService(Context.VIBRATOR_MANAGER_SERVICE); this.vibrator = vibratorManager.getDefaultVibrator(); @@ -43,8 +41,8 @@ private void vibratePre26(int duration) { } @SuppressWarnings({ "deprecation" }) - private void vibratePre26(long[] pattern, int repeat) { - vibrator.vibrate(pattern, repeat); + private void vibratePre26(long[] pattern) { + vibrator.vibrate(pattern, -1); } public void selectionStart() { @@ -65,7 +63,7 @@ public void performHaptics(HapticsVibrationType type) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { vibrator.vibrate(VibrationEffect.createWaveform(type.getTimings(), type.getAmplitudes(), -1)); } else { - vibratePre26(type.getOldSDKPattern(), -1); + vibratePre26(type.getOldSDKPattern()); } } } diff --git a/haptics/src/definitions.ts b/haptics/src/definitions.ts index 01389a6d6..aa9f61b8f 100644 --- a/haptics/src/definitions.ts +++ b/haptics/src/definitions.ts @@ -124,27 +124,3 @@ export interface VibrateOptions { */ duration: number; } - -/** - * @deprecated Use `ImpactOptions`. - * @since 1.0.0 - */ -export type HapticsImpactOptions = ImpactOptions; - -/** - * @deprecated Use `NotificationOptions`. - * @since 1.0.0 - */ -export type HapticsNotificationOptions = NotificationOptions; - -/** - * @deprecated Use `NotificationType`. - * @since 1.0.0 - */ -export const HapticsNotificationType = NotificationType; - -/** - * @deprecated Use `ImpactStyle`. - * @since 1.0.0 - */ -export const HapticsImpactStyle = ImpactStyle; From b65958ea9cb4c3463c2c8f06ff9e027895c12efb Mon Sep 17 00:00:00 2001 From: jcesarmobile Date: Fri, 22 Nov 2024 19:39:10 +0100 Subject: [PATCH 10/13] chore: Update rollup to 4.x (#2246) --- action-sheet/package.json | 4 ++-- action-sheet/{rollup.config.js => rollup.config.mjs} | 0 app-launcher/package.json | 4 ++-- app-launcher/{rollup.config.js => rollup.config.mjs} | 0 app/package.json | 4 ++-- app/{rollup.config.js => rollup.config.mjs} | 0 browser/package.json | 4 ++-- browser/{rollup.config.js => rollup.config.mjs} | 0 camera/package.json | 4 ++-- camera/{rollup.config.js => rollup.config.mjs} | 0 clipboard/package.json | 4 ++-- clipboard/{rollup.config.js => rollup.config.mjs} | 0 device/package.json | 4 ++-- device/{rollup.config.js => rollup.config.mjs} | 0 dialog/package.json | 4 ++-- dialog/{rollup.config.js => rollup.config.mjs} | 0 filesystem/package.json | 4 ++-- filesystem/{rollup.config.js => rollup.config.mjs} | 0 geolocation/package.json | 4 ++-- geolocation/{rollup.config.js => rollup.config.mjs} | 0 haptics/package.json | 4 ++-- haptics/{rollup.config.js => rollup.config.mjs} | 0 keyboard/package.json | 4 ++-- keyboard/{rollup.config.js => rollup.config.mjs} | 0 local-notifications/package.json | 4 ++-- local-notifications/{rollup.config.js => rollup.config.mjs} | 0 motion/package.json | 4 ++-- motion/{rollup.config.js => rollup.config.mjs} | 0 network/package.json | 4 ++-- network/{rollup.config.js => rollup.config.mjs} | 0 preferences/package.json | 4 ++-- preferences/{rollup.config.js => rollup.config.mjs} | 0 push-notifications/package.json | 4 ++-- push-notifications/{rollup.config.js => rollup.config.mjs} | 0 screen-orientation/package.json | 4 ++-- screen-orientation/{rollup.config.js => rollup.config.mjs} | 0 screen-reader/package.json | 4 ++-- screen-reader/{rollup.config.js => rollup.config.mjs} | 0 share/package.json | 4 ++-- share/{rollup.config.js => rollup.config.mjs} | 0 splash-screen/package.json | 4 ++-- splash-screen/{rollup.config.js => rollup.config.mjs} | 0 status-bar/package.json | 4 ++-- status-bar/{rollup.config.js => rollup.config.mjs} | 0 text-zoom/package.json | 4 ++-- text-zoom/{rollup.config.js => rollup.config.mjs} | 0 toast/package.json | 4 ++-- toast/{rollup.config.js => rollup.config.mjs} | 0 48 files changed, 48 insertions(+), 48 deletions(-) rename action-sheet/{rollup.config.js => rollup.config.mjs} (100%) rename app-launcher/{rollup.config.js => rollup.config.mjs} (100%) rename app/{rollup.config.js => rollup.config.mjs} (100%) rename browser/{rollup.config.js => rollup.config.mjs} (100%) rename camera/{rollup.config.js => rollup.config.mjs} (100%) rename clipboard/{rollup.config.js => rollup.config.mjs} (100%) rename device/{rollup.config.js => rollup.config.mjs} (100%) rename dialog/{rollup.config.js => rollup.config.mjs} (100%) rename filesystem/{rollup.config.js => rollup.config.mjs} (100%) rename geolocation/{rollup.config.js => rollup.config.mjs} (100%) rename haptics/{rollup.config.js => rollup.config.mjs} (100%) rename keyboard/{rollup.config.js => rollup.config.mjs} (100%) rename local-notifications/{rollup.config.js => rollup.config.mjs} (100%) rename motion/{rollup.config.js => rollup.config.mjs} (100%) rename network/{rollup.config.js => rollup.config.mjs} (100%) rename preferences/{rollup.config.js => rollup.config.mjs} (100%) rename push-notifications/{rollup.config.js => rollup.config.mjs} (100%) rename screen-orientation/{rollup.config.js => rollup.config.mjs} (100%) rename screen-reader/{rollup.config.js => rollup.config.mjs} (100%) rename share/{rollup.config.js => rollup.config.mjs} (100%) rename splash-screen/{rollup.config.js => rollup.config.mjs} (100%) rename status-bar/{rollup.config.js => rollup.config.mjs} (100%) rename text-zoom/{rollup.config.js => rollup.config.mjs} (100%) rename toast/{rollup.config.js => rollup.config.mjs} (100%) diff --git a/action-sheet/package.json b/action-sheet/package.json index b3c5c19de..f4be91986 100644 --- a/action-sheet/package.json +++ b/action-sheet/package.json @@ -40,7 +40,7 @@ "prettier": "prettier \"**/*.{css,html,ts,js,java}\"", "swiftlint": "node-swiftlint", "docgen": "docgen --api ActionSheetPlugin --output-readme README.md --output-json dist/docs.json", - "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js", + "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs", "clean": "rimraf ./dist", "watch": "tsc --watch", "prepublishOnly": "npm run build", @@ -58,7 +58,7 @@ "prettier": "~2.3.0", "prettier-plugin-java": "~1.0.2", "rimraf": "^3.0.0", - "rollup": "^2.29.0", + "rollup": "^4.26.0", "swiftlint": "^1.0.1", "typescript": "~4.1.5" }, diff --git a/action-sheet/rollup.config.js b/action-sheet/rollup.config.mjs similarity index 100% rename from action-sheet/rollup.config.js rename to action-sheet/rollup.config.mjs diff --git a/app-launcher/package.json b/app-launcher/package.json index c3e8fb697..1fa548712 100644 --- a/app-launcher/package.json +++ b/app-launcher/package.json @@ -40,7 +40,7 @@ "prettier": "prettier \"**/*.{css,html,ts,js,java}\"", "swiftlint": "node-swiftlint", "docgen": "docgen --api AppLauncherPlugin --output-readme README.md --output-json dist/docs.json", - "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js", + "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs", "clean": "rimraf ./dist", "watch": "tsc --watch", "prepublishOnly": "npm run build", @@ -58,7 +58,7 @@ "prettier": "~2.3.0", "prettier-plugin-java": "~1.0.2", "rimraf": "^3.0.2", - "rollup": "^2.32.0", + "rollup": "^4.26.0", "swiftlint": "^1.0.1", "typescript": "~4.1.5" }, diff --git a/app-launcher/rollup.config.js b/app-launcher/rollup.config.mjs similarity index 100% rename from app-launcher/rollup.config.js rename to app-launcher/rollup.config.mjs diff --git a/app/package.json b/app/package.json index afaba9c50..ea81a0cfc 100644 --- a/app/package.json +++ b/app/package.json @@ -40,7 +40,7 @@ "prettier": "prettier \"**/*.{css,html,ts,js,java}\"", "swiftlint": "node-swiftlint", "docgen": "docgen --api AppPlugin --output-readme README.md", - "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js", + "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs", "clean": "rimraf ./dist", "watch": "tsc --watch", "prepublishOnly": "npm run build", @@ -58,7 +58,7 @@ "prettier": "~2.3.0", "prettier-plugin-java": "~1.0.2", "rimraf": "^3.0.0", - "rollup": "^2.29.0", + "rollup": "^4.26.0", "swiftlint": "^1.0.1", "typescript": "~4.1.5" }, diff --git a/app/rollup.config.js b/app/rollup.config.mjs similarity index 100% rename from app/rollup.config.js rename to app/rollup.config.mjs diff --git a/browser/package.json b/browser/package.json index 625de4368..68e9d6a3c 100644 --- a/browser/package.json +++ b/browser/package.json @@ -40,7 +40,7 @@ "prettier": "prettier \"**/*.{css,html,ts,js,java}\"", "swiftlint": "node-swiftlint", "docgen": "docgen --api BrowserPlugin --output-readme README.md --output-json dist/docs.json", - "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js", + "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs", "clean": "rimraf ./dist", "watch": "tsc --watch", "prepublishOnly": "npm run build", @@ -58,7 +58,7 @@ "prettier": "~2.3.0", "prettier-plugin-java": "~1.0.2", "rimraf": "^3.0.0", - "rollup": "^2.29.0", + "rollup": "^4.26.0", "swiftlint": "^1.0.1", "typescript": "~4.1.5" }, diff --git a/browser/rollup.config.js b/browser/rollup.config.mjs similarity index 100% rename from browser/rollup.config.js rename to browser/rollup.config.mjs diff --git a/camera/package.json b/camera/package.json index 25e766ac9..442547034 100644 --- a/camera/package.json +++ b/camera/package.json @@ -40,7 +40,7 @@ "prettier": "prettier \"**/*.{css,html,ts,js,java}\"", "swiftlint": "node-swiftlint", "docgen": "docgen --api CameraPlugin --output-readme README.md --output-json dist/docs.json", - "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js", + "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs", "clean": "rimraf ./dist", "watch": "tsc --watch", "prepublishOnly": "npm run build", @@ -58,7 +58,7 @@ "prettier": "~2.3.0", "prettier-plugin-java": "~1.0.2", "rimraf": "^3.0.0", - "rollup": "^2.29.0", + "rollup": "^4.26.0", "swiftlint": "^1.0.1", "typescript": "~4.1.5" }, diff --git a/camera/rollup.config.js b/camera/rollup.config.mjs similarity index 100% rename from camera/rollup.config.js rename to camera/rollup.config.mjs diff --git a/clipboard/package.json b/clipboard/package.json index f25336b2c..606f9057a 100644 --- a/clipboard/package.json +++ b/clipboard/package.json @@ -40,7 +40,7 @@ "prettier": "prettier \"**/*.{css,html,ts,js,java}\"", "swiftlint": "node-swiftlint", "docgen": "docgen --api ClipboardPlugin --output-readme README.md --output-json dist/docs.json", - "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js", + "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs", "clean": "rimraf ./dist", "watch": "tsc --watch", "prepublishOnly": "npm run build", @@ -58,7 +58,7 @@ "prettier": "~2.3.0", "prettier-plugin-java": "~1.0.2", "rimraf": "^3.0.0", - "rollup": "^2.29.0", + "rollup": "^4.26.0", "swiftlint": "^1.0.1", "typescript": "~4.1.5" }, diff --git a/clipboard/rollup.config.js b/clipboard/rollup.config.mjs similarity index 100% rename from clipboard/rollup.config.js rename to clipboard/rollup.config.mjs diff --git a/device/package.json b/device/package.json index 11299d3e0..382266fe7 100644 --- a/device/package.json +++ b/device/package.json @@ -41,7 +41,7 @@ "prettier": "prettier \"**/*.{css,html,ts,js,java}\"", "swiftlint": "node-swiftlint", "docgen": "docgen --api DevicePlugin --output-readme README.md --output-json dist/docs.json", - "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js", + "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs", "clean": "rimraf ./dist", "watch": "tsc --watch", "prepublishOnly": "npm run build", @@ -60,7 +60,7 @@ "prettier": "~2.3.0", "prettier-plugin-java": "~1.0.2", "rimraf": "^3.0.0", - "rollup": "^2.29.0", + "rollup": "^4.26.0", "swiftlint": "^1.0.1", "ts-node": "^9.1.1", "typescript": "~4.1.5", diff --git a/device/rollup.config.js b/device/rollup.config.mjs similarity index 100% rename from device/rollup.config.js rename to device/rollup.config.mjs diff --git a/dialog/package.json b/dialog/package.json index 1950f4b9d..252df93da 100644 --- a/dialog/package.json +++ b/dialog/package.json @@ -40,7 +40,7 @@ "prettier": "prettier \"**/*.{css,html,ts,js,java}\"", "swiftlint": "node-swiftlint", "docgen": "docgen --api DialogPlugin --output-readme README.md --output-json dist/docs.json", - "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js", + "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs", "clean": "rimraf ./dist", "watch": "tsc --watch", "prepublishOnly": "npm run build", @@ -58,7 +58,7 @@ "prettier": "~2.3.0", "prettier-plugin-java": "~1.0.2", "rimraf": "^3.0.0", - "rollup": "^2.29.0", + "rollup": "^4.26.0", "swiftlint": "^1.0.1", "typescript": "~4.1.5" }, diff --git a/dialog/rollup.config.js b/dialog/rollup.config.mjs similarity index 100% rename from dialog/rollup.config.js rename to dialog/rollup.config.mjs diff --git a/filesystem/package.json b/filesystem/package.json index 1c6cbd9c0..032e2f576 100644 --- a/filesystem/package.json +++ b/filesystem/package.json @@ -40,7 +40,7 @@ "prettier": "prettier \"**/*.{css,html,ts,js,java}\"", "swiftlint": "node-swiftlint", "docgen": "docgen --api FilesystemPlugin --output-readme README.md --output-json dist/docs.json", - "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js", + "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs", "clean": "rimraf ./dist", "watch": "tsc --watch", "prepublishOnly": "npm run build", @@ -58,7 +58,7 @@ "prettier": "~2.3.0", "prettier-plugin-java": "~1.0.2", "rimraf": "^3.0.0", - "rollup": "^2.29.0", + "rollup": "^4.26.0", "swiftlint": "^1.0.1", "typescript": "~4.1.5" }, diff --git a/filesystem/rollup.config.js b/filesystem/rollup.config.mjs similarity index 100% rename from filesystem/rollup.config.js rename to filesystem/rollup.config.mjs diff --git a/geolocation/package.json b/geolocation/package.json index 38bc2630d..bccfbf104 100644 --- a/geolocation/package.json +++ b/geolocation/package.json @@ -40,7 +40,7 @@ "prettier": "prettier \"**/*.{css,html,ts,js,java}\"", "swiftlint": "node-swiftlint", "docgen": "docgen --api GeolocationPlugin --output-readme README.md --output-json dist/docs.json", - "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js", + "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs", "clean": "rimraf ./dist", "watch": "tsc --watch", "prepublishOnly": "npm run build", @@ -58,7 +58,7 @@ "prettier": "~2.3.0", "prettier-plugin-java": "~1.0.2", "rimraf": "^3.0.0", - "rollup": "^2.29.0", + "rollup": "^4.26.0", "swiftlint": "^1.0.1", "typescript": "~4.1.5" }, diff --git a/geolocation/rollup.config.js b/geolocation/rollup.config.mjs similarity index 100% rename from geolocation/rollup.config.js rename to geolocation/rollup.config.mjs diff --git a/haptics/package.json b/haptics/package.json index a91c29c05..a97bbff6e 100644 --- a/haptics/package.json +++ b/haptics/package.json @@ -40,7 +40,7 @@ "prettier": "prettier \"**/*.{css,html,ts,js,java}\"", "swiftlint": "node-swiftlint", "docgen": "docgen --api HapticsPlugin --output-readme README.md --output-json dist/docs.json", - "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js", + "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs", "clean": "rimraf ./dist", "watch": "tsc --watch", "prepublishOnly": "npm run build", @@ -58,7 +58,7 @@ "prettier": "~2.3.0", "prettier-plugin-java": "~1.0.2", "rimraf": "^3.0.0", - "rollup": "^2.29.0", + "rollup": "^4.26.0", "swiftlint": "^1.0.1", "typescript": "~4.1.5" }, diff --git a/haptics/rollup.config.js b/haptics/rollup.config.mjs similarity index 100% rename from haptics/rollup.config.js rename to haptics/rollup.config.mjs diff --git a/keyboard/package.json b/keyboard/package.json index 659d3024e..9baf19d09 100644 --- a/keyboard/package.json +++ b/keyboard/package.json @@ -40,7 +40,7 @@ "prettier": "prettier \"**/*.{css,html,ts,js,java}\"", "swiftlint": "node-swiftlint", "docgen": "docgen --api KeyboardPlugin --output-readme README.md --output-json dist/docs.json", - "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js", + "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs", "clean": "rimraf ./dist", "watch": "tsc --watch", "prepublishOnly": "npm run build", @@ -59,7 +59,7 @@ "prettier": "~2.3.0", "prettier-plugin-java": "~1.0.2", "rimraf": "^3.0.0", - "rollup": "^2.29.0", + "rollup": "^4.26.0", "swiftlint": "^1.0.1", "typescript": "~4.1.5" }, diff --git a/keyboard/rollup.config.js b/keyboard/rollup.config.mjs similarity index 100% rename from keyboard/rollup.config.js rename to keyboard/rollup.config.mjs diff --git a/local-notifications/package.json b/local-notifications/package.json index f0e1436e9..caac24c79 100644 --- a/local-notifications/package.json +++ b/local-notifications/package.json @@ -40,7 +40,7 @@ "prettier": "prettier \"**/*.{css,html,ts,js,java}\"", "swiftlint": "node-swiftlint", "docgen": "docgen --api LocalNotificationsPlugin --output-readme README.md --output-json dist/docs.json", - "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js", + "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs", "clean": "rimraf ./dist", "watch": "tsc --watch", "prepublishOnly": "npm run build", @@ -59,7 +59,7 @@ "prettier": "~2.3.0", "prettier-plugin-java": "~1.0.2", "rimraf": "^3.0.0", - "rollup": "^2.29.0", + "rollup": "^4.26.0", "swiftlint": "^1.0.1", "typescript": "~4.1.5" }, diff --git a/local-notifications/rollup.config.js b/local-notifications/rollup.config.mjs similarity index 100% rename from local-notifications/rollup.config.js rename to local-notifications/rollup.config.mjs diff --git a/motion/package.json b/motion/package.json index 4972c1841..4a8a66630 100644 --- a/motion/package.json +++ b/motion/package.json @@ -33,7 +33,7 @@ "eslint": "eslint . --ext ts", "prettier": "prettier \"**/*.{css,html,ts,js,java}\"", "docgen": "docgen --api MotionPlugin --output-readme README.md --output-json dist/docs.json", - "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js", + "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs", "clean": "rimraf ./dist", "watch": "tsc --watch", "prepublishOnly": "npm run build" @@ -49,7 +49,7 @@ "prettier": "~2.3.0", "prettier-plugin-java": "~1.0.2", "rimraf": "^3.0.0", - "rollup": "^2.29.0", + "rollup": "^4.26.0", "typescript": "~4.1.5" }, "peerDependencies": { diff --git a/motion/rollup.config.js b/motion/rollup.config.mjs similarity index 100% rename from motion/rollup.config.js rename to motion/rollup.config.mjs diff --git a/network/package.json b/network/package.json index f1071314a..456865bac 100644 --- a/network/package.json +++ b/network/package.json @@ -40,7 +40,7 @@ "prettier": "prettier \"**/*.{css,html,ts,js,java}\"", "swiftlint": "node-swiftlint", "docgen": "docgen --api NetworkPlugin --output-readme README.md --output-json dist/docs.json", - "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js", + "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs", "clean": "rimraf ./dist", "watch": "tsc --watch", "prepublishOnly": "npm run build", @@ -58,7 +58,7 @@ "prettier": "~2.3.0", "prettier-plugin-java": "~1.0.2", "rimraf": "^3.0.0", - "rollup": "^2.29.0", + "rollup": "^4.26.0", "swiftlint": "^1.0.1", "typescript": "~4.1.5" }, diff --git a/network/rollup.config.js b/network/rollup.config.mjs similarity index 100% rename from network/rollup.config.js rename to network/rollup.config.mjs diff --git a/preferences/package.json b/preferences/package.json index b0c00931a..b90af112d 100644 --- a/preferences/package.json +++ b/preferences/package.json @@ -40,7 +40,7 @@ "prettier": "prettier \"**/*.{css,html,ts,js,java}\"", "swiftlint": "node-swiftlint", "docgen": "docgen --api PreferencesPlugin --output-readme README.md --output-json dist/docs.json", - "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js", + "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs", "clean": "rimraf ./dist", "watch": "tsc --watch", "prepublishOnly": "npm run build", @@ -58,7 +58,7 @@ "prettier": "~2.3.0", "prettier-plugin-java": "~1.0.2", "rimraf": "^3.0.0", - "rollup": "^2.29.0", + "rollup": "^4.26.0", "swiftlint": "^1.0.1", "typescript": "~4.1.5" }, diff --git a/preferences/rollup.config.js b/preferences/rollup.config.mjs similarity index 100% rename from preferences/rollup.config.js rename to preferences/rollup.config.mjs diff --git a/push-notifications/package.json b/push-notifications/package.json index 761c18658..5d5d2018a 100644 --- a/push-notifications/package.json +++ b/push-notifications/package.json @@ -40,7 +40,7 @@ "prettier": "prettier \"**/*.{css,html,ts,js,java}\"", "swiftlint": "node-swiftlint", "docgen": "docgen --api PushNotificationsPlugin --output-readme README.md --output-json dist/docs.json", - "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js", + "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs", "clean": "rimraf ./dist", "watch": "tsc --watch", "prepublishOnly": "npm run build", @@ -59,7 +59,7 @@ "prettier": "~2.3.0", "prettier-plugin-java": "~1.0.2", "rimraf": "^3.0.0", - "rollup": "^2.29.0", + "rollup": "^4.26.0", "swiftlint": "^1.0.1", "typescript": "~4.1.5" }, diff --git a/push-notifications/rollup.config.js b/push-notifications/rollup.config.mjs similarity index 100% rename from push-notifications/rollup.config.js rename to push-notifications/rollup.config.mjs diff --git a/screen-orientation/package.json b/screen-orientation/package.json index f32f33a4f..c599bda10 100644 --- a/screen-orientation/package.json +++ b/screen-orientation/package.json @@ -40,7 +40,7 @@ "prettier": "prettier \"**/*.{css,html,ts,js,java}\"", "swiftlint": "node-swiftlint", "docgen": "docgen --api ScreenOrientationPlugin --output-readme README.md --output-json dist/docs.json", - "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js", + "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs", "clean": "rimraf ./dist", "watch": "tsc --watch", "prepublishOnly": "npm run build", @@ -58,7 +58,7 @@ "prettier": "~2.3.0", "prettier-plugin-java": "~1.0.2", "rimraf": "^3.0.0", - "rollup": "^2.29.0", + "rollup": "^4.26.0", "swiftlint": "^1.0.1", "typescript": "~4.1.5" }, diff --git a/screen-orientation/rollup.config.js b/screen-orientation/rollup.config.mjs similarity index 100% rename from screen-orientation/rollup.config.js rename to screen-orientation/rollup.config.mjs diff --git a/screen-reader/package.json b/screen-reader/package.json index 9ca2b1f5d..b6d992a67 100644 --- a/screen-reader/package.json +++ b/screen-reader/package.json @@ -40,7 +40,7 @@ "prettier": "prettier \"**/*.{css,html,ts,js,java}\"", "swiftlint": "node-swiftlint", "docgen": "docgen --api ScreenReaderPlugin --output-readme README.md --output-json dist/docs.json", - "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js", + "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs", "clean": "rimraf ./dist", "watch": "tsc --watch", "prepublishOnly": "npm run build", @@ -58,7 +58,7 @@ "prettier": "~2.3.0", "prettier-plugin-java": "~1.0.2", "rimraf": "^3.0.0", - "rollup": "^2.29.0", + "rollup": "^4.26.0", "swiftlint": "^1.0.1", "typescript": "~4.1.5" }, diff --git a/screen-reader/rollup.config.js b/screen-reader/rollup.config.mjs similarity index 100% rename from screen-reader/rollup.config.js rename to screen-reader/rollup.config.mjs diff --git a/share/package.json b/share/package.json index 07f50a4f8..1b631db4a 100644 --- a/share/package.json +++ b/share/package.json @@ -40,7 +40,7 @@ "prettier": "prettier \"**/*.{css,html,ts,js,java}\"", "swiftlint": "node-swiftlint", "docgen": "docgen --api SharePlugin --output-readme README.md --output-json dist/docs.json", - "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js", + "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs", "clean": "rimraf ./dist", "watch": "tsc --watch", "prepublishOnly": "npm run build", @@ -58,7 +58,7 @@ "prettier": "~2.3.0", "prettier-plugin-java": "~1.0.2", "rimraf": "^3.0.0", - "rollup": "^2.29.0", + "rollup": "^4.26.0", "swiftlint": "^1.0.1", "typescript": "~4.1.5" }, diff --git a/share/rollup.config.js b/share/rollup.config.mjs similarity index 100% rename from share/rollup.config.js rename to share/rollup.config.mjs diff --git a/splash-screen/package.json b/splash-screen/package.json index 504a26529..649fc84f1 100644 --- a/splash-screen/package.json +++ b/splash-screen/package.json @@ -40,7 +40,7 @@ "prettier": "prettier \"**/*.{css,html,ts,js,java}\"", "swiftlint": "node-swiftlint", "docgen": "docgen --api SplashScreenPlugin --output-readme README.md --output-json dist/docs.json", - "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js", + "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs", "clean": "rimraf ./dist", "watch": "tsc --watch", "prepublishOnly": "npm run build", @@ -59,7 +59,7 @@ "prettier": "~2.3.0", "prettier-plugin-java": "~1.0.2", "rimraf": "^3.0.2", - "rollup": "^2.32.0", + "rollup": "^4.26.0", "swiftlint": "^1.0.1", "typescript": "~4.1.5" }, diff --git a/splash-screen/rollup.config.js b/splash-screen/rollup.config.mjs similarity index 100% rename from splash-screen/rollup.config.js rename to splash-screen/rollup.config.mjs diff --git a/status-bar/package.json b/status-bar/package.json index 8d275ee9a..fd3d03aa2 100644 --- a/status-bar/package.json +++ b/status-bar/package.json @@ -40,7 +40,7 @@ "prettier": "prettier \"**/*.{css,html,ts,js,java}\"", "swiftlint": "node-swiftlint", "docgen": "docgen --api StatusBarPlugin --output-readme README.md --output-json dist/docs.json", - "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js", + "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs", "clean": "rimraf ./dist", "watch": "tsc --watch", "prepublishOnly": "npm run build", @@ -58,7 +58,7 @@ "prettier": "~2.3.0", "prettier-plugin-java": "~1.0.2", "rimraf": "^3.0.0", - "rollup": "^2.29.0", + "rollup": "^4.26.0", "swiftlint": "^1.0.1", "typescript": "~4.1.5" }, diff --git a/status-bar/rollup.config.js b/status-bar/rollup.config.mjs similarity index 100% rename from status-bar/rollup.config.js rename to status-bar/rollup.config.mjs diff --git a/text-zoom/package.json b/text-zoom/package.json index b27abb705..e2ad66e29 100644 --- a/text-zoom/package.json +++ b/text-zoom/package.json @@ -40,7 +40,7 @@ "prettier": "prettier \"**/*.{css,html,ts,js,java}\"", "swiftlint": "node-swiftlint", "docgen": "docgen --api TextZoomPlugin --output-readme README.md --output-json dist/docs.json", - "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js", + "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs", "clean": "rimraf ./dist", "watch": "tsc --watch", "prepublishOnly": "npm run build", @@ -58,7 +58,7 @@ "prettier": "~2.3.0", "prettier-plugin-java": "~1.0.2", "rimraf": "^3.0.0", - "rollup": "^2.29.0", + "rollup": "^4.26.0", "swiftlint": "^1.0.1", "typescript": "~4.1.5" }, diff --git a/text-zoom/rollup.config.js b/text-zoom/rollup.config.mjs similarity index 100% rename from text-zoom/rollup.config.js rename to text-zoom/rollup.config.mjs diff --git a/toast/package.json b/toast/package.json index f19f4e1e0..baeefe609 100644 --- a/toast/package.json +++ b/toast/package.json @@ -40,7 +40,7 @@ "prettier": "prettier \"**/*.{css,html,ts,js,java}\"", "swiftlint": "node-swiftlint", "docgen": "docgen --api ToastPlugin --output-readme README.md --output-json dist/docs.json", - "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js", + "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs", "clean": "rimraf ./dist", "watch": "tsc --watch", "prepublishOnly": "npm run build", @@ -58,7 +58,7 @@ "prettier": "~2.3.0", "prettier-plugin-java": "~1.0.2", "rimraf": "^3.0.0", - "rollup": "^2.29.0", + "rollup": "^4.26.0", "swiftlint": "^1.0.1", "typescript": "~4.1.5" }, diff --git a/toast/rollup.config.js b/toast/rollup.config.mjs similarity index 100% rename from toast/rollup.config.js rename to toast/rollup.config.mjs From 92edac7732c4f970ca3b8ba99b15af35581921af Mon Sep 17 00:00:00 2001 From: jcesarmobile Date: Fri, 22 Nov 2024 19:57:45 +0100 Subject: [PATCH 11/13] chore(ci): use macos-15 and Xcode 16 (#2245) --- .github/workflows/ci.yml | 10 +++++----- .github/workflows/publish-ios.yml | 4 ++-- .github/workflows/publish-npm-alpha.yml | 2 +- .github/workflows/publish-npm-beta.yml | 2 +- .github/workflows/publish-npm-dev.yml | 2 +- .github/workflows/publish-npm-latest-from-pre.yml | 2 +- .github/workflows/publish-npm-latest.yml | 2 +- .github/workflows/publish-npm-nightly.yml | 2 +- .github/workflows/publish-npm-rc.yml | 2 +- action-sheet/package.json | 2 +- app-launcher/package.json | 2 +- app/package.json | 2 +- browser/package.json | 2 +- camera/package.json | 2 +- clipboard/package.json | 2 +- device/package.json | 2 +- dialog/package.json | 2 +- filesystem/package.json | 2 +- geolocation/package.json | 2 +- haptics/package.json | 2 +- keyboard/package.json | 2 +- local-notifications/package.json | 2 +- network/package.json | 2 +- preferences/package.json | 2 +- push-notifications/package.json | 2 +- screen-orientation/package.json | 2 +- screen-reader/package.json | 2 +- share/package.json | 2 +- splash-screen/package.json | 2 +- status-bar/package.json | 2 +- text-zoom/package.json | 2 +- toast/package.json | 2 +- 32 files changed, 37 insertions(+), 37 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ef5a69cd9..077322011 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, macos-14] + os: [ubuntu-latest, macos-15] timeout-minutes: 30 outputs: plugins: ${{ steps.packages.outputs.paths }} @@ -49,7 +49,7 @@ jobs: files: ${{ steps.catjson.outputs.FILES_JSON }} lint-scripts: - runs-on: macos-14 + runs-on: macos-15 timeout-minutes: 30 needs: - setup @@ -70,7 +70,7 @@ jobs: - run: npm run lint lint: - runs-on: macos-14 + runs-on: macos-15 timeout-minutes: 30 needs: - setup @@ -97,7 +97,7 @@ jobs: working-directory: ${{ matrix.plugin }} verify-ios: - runs-on: macos-14 + runs-on: macos-15 if: needs.setup.outputs.plugins != '[]' timeout-minutes: 30 needs: @@ -107,7 +107,7 @@ jobs: strategy: matrix: xcode: - - /Applications/Xcode_15.0.app + - /Applications/Xcode_16.app plugin: ${{ fromJson(needs.setup.outputs.plugins) }} steps: - run: sudo xcode-select --switch ${{ matrix.xcode }} diff --git a/.github/workflows/publish-ios.yml b/.github/workflows/publish-ios.yml index 13d99ac42..8506fb313 100644 --- a/.github/workflows/publish-ios.yml +++ b/.github/workflows/publish-ios.yml @@ -8,14 +8,14 @@ on: required: true jobs: publish-ios: - runs-on: macos-14 + runs-on: macos-15 if: github.event.inputs.plugins != '[]' timeout-minutes: 30 strategy: matrix: plugin: ${{ fromJson(github.event.inputs.plugins) }} steps: - - run: sudo xcode-select --switch /Applications/Xcode_15.0.app + - run: sudo xcode-select --switch /Applications/Xcode_16.app - uses: actions/setup-node@v4 with: node-version: 20 diff --git a/.github/workflows/publish-npm-alpha.yml b/.github/workflows/publish-npm-alpha.yml index 6240d35f9..96ea717c5 100644 --- a/.github/workflows/publish-npm-alpha.yml +++ b/.github/workflows/publish-npm-alpha.yml @@ -8,7 +8,7 @@ permissions: jobs: deploy-npm-alpha: - runs-on: macos-14 + runs-on: macos-15 timeout-minutes: 30 steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/publish-npm-beta.yml b/.github/workflows/publish-npm-beta.yml index 67680fc41..072dd1e43 100644 --- a/.github/workflows/publish-npm-beta.yml +++ b/.github/workflows/publish-npm-beta.yml @@ -8,7 +8,7 @@ permissions: jobs: deploy-npm-beta: - runs-on: macos-14 + runs-on: macos-15 timeout-minutes: 30 steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/publish-npm-dev.yml b/.github/workflows/publish-npm-dev.yml index 92f48a5cf..ea395eda5 100644 --- a/.github/workflows/publish-npm-dev.yml +++ b/.github/workflows/publish-npm-dev.yml @@ -8,7 +8,7 @@ permissions: jobs: deploy-npm-dev: - runs-on: macos-14 + runs-on: macos-15 timeout-minutes: 30 steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/publish-npm-latest-from-pre.yml b/.github/workflows/publish-npm-latest-from-pre.yml index 735d65387..cb1a2f080 100644 --- a/.github/workflows/publish-npm-latest-from-pre.yml +++ b/.github/workflows/publish-npm-latest-from-pre.yml @@ -16,7 +16,7 @@ permissions: jobs: deploy-npm-latest-from-pre: if: github.ref == 'refs/heads/main' - runs-on: macos-14 + runs-on: macos-15 timeout-minutes: 30 steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/publish-npm-latest.yml b/.github/workflows/publish-npm-latest.yml index 071ab1c3c..504281bcd 100644 --- a/.github/workflows/publish-npm-latest.yml +++ b/.github/workflows/publish-npm-latest.yml @@ -16,7 +16,7 @@ permissions: jobs: deploy-npm-latest: if: github.ref == 'refs/heads/main' - runs-on: macos-14 + runs-on: macos-15 timeout-minutes: 30 steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/publish-npm-nightly.yml b/.github/workflows/publish-npm-nightly.yml index 586444aee..39b6bfae6 100644 --- a/.github/workflows/publish-npm-nightly.yml +++ b/.github/workflows/publish-npm-nightly.yml @@ -11,7 +11,7 @@ permissions: jobs: deploy-npm-nightly: if: github.ref == 'refs/heads/main' - runs-on: macos-14 + runs-on: macos-15 timeout-minutes: 30 steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/publish-npm-rc.yml b/.github/workflows/publish-npm-rc.yml index 16001a126..cb9f71ebf 100644 --- a/.github/workflows/publish-npm-rc.yml +++ b/.github/workflows/publish-npm-rc.yml @@ -8,7 +8,7 @@ permissions: jobs: deploy-npm-rc: - runs-on: macos-14 + runs-on: macos-15 timeout-minutes: 30 steps: - uses: actions/checkout@v3 diff --git a/action-sheet/package.json b/action-sheet/package.json index f4be91986..d201c1871 100644 --- a/action-sheet/package.json +++ b/action-sheet/package.json @@ -31,7 +31,7 @@ ], "scripts": { "verify": "npm run verify:ios && npm run verify:android && npm run verify:web", - "verify:ios": "xcodebuild build -scheme CapacitorActionSheet -sdk iphonesimulator17.0 -destination 'OS=17.0,name=iPhone 15'", + "verify:ios": "xcodebuild build -scheme CapacitorActionSheet -destination generic/platform=iOS", "verify:android": "cd android && ./gradlew clean build test && cd ..", "verify:web": "npm run build", "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint", diff --git a/app-launcher/package.json b/app-launcher/package.json index 1fa548712..845249951 100644 --- a/app-launcher/package.json +++ b/app-launcher/package.json @@ -31,7 +31,7 @@ ], "scripts": { "verify": "npm run verify:ios && npm run verify:android && npm run verify:web", - "verify:ios": "xcodebuild build -scheme CapacitorAppLauncher -sdk iphonesimulator17.0 -destination 'OS=17.0,name=iPhone 15'", + "verify:ios": "xcodebuild build -scheme CapacitorAppLauncher -destination generic/platform=iOS", "verify:android": "cd android && ./gradlew clean build test && cd ..", "verify:web": "npm run build", "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint", diff --git a/app/package.json b/app/package.json index ea81a0cfc..77bfe53ac 100644 --- a/app/package.json +++ b/app/package.json @@ -31,7 +31,7 @@ ], "scripts": { "verify": "npm run verify:ios && npm run verify:android && npm run verify:web", - "verify:ios": "xcodebuild build -scheme CapacitorApp -sdk iphonesimulator17.0 -destination 'OS=17.0,name=iPhone 15'", + "verify:ios": "xcodebuild build -scheme CapacitorApp -destination generic/platform=iOS", "verify:android": "cd android && ./gradlew clean build test && cd ..", "verify:web": "npm run build", "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint", diff --git a/browser/package.json b/browser/package.json index 68e9d6a3c..b2f8542a7 100644 --- a/browser/package.json +++ b/browser/package.json @@ -31,7 +31,7 @@ ], "scripts": { "verify": "npm run verify:ios && npm run verify:android && npm run verify:web", - "verify:ios": "xcodebuild build -scheme CapacitorBrowser -sdk iphonesimulator17.0 -destination 'OS=17.0,name=iPhone 15'", + "verify:ios": "xcodebuild build -scheme CapacitorBrowser -destination generic/platform=iOS", "verify:android": "cd android && ./gradlew clean build test && cd ..", "verify:web": "npm run build", "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint", diff --git a/camera/package.json b/camera/package.json index 442547034..f06878ef7 100644 --- a/camera/package.json +++ b/camera/package.json @@ -31,7 +31,7 @@ ], "scripts": { "verify": "npm run verify:ios && npm run verify:android && npm run verify:web", - "verify:ios": "xcodebuild build -scheme CapacitorCamera -sdk iphonesimulator17.0 -destination 'OS=17.0,name=iPhone 15'", + "verify:ios": "xcodebuild build -scheme CapacitorCamera -destination generic/platform=iOS", "verify:android": "cd android && ./gradlew clean build test && cd ..", "verify:web": "npm run build", "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint", diff --git a/clipboard/package.json b/clipboard/package.json index 606f9057a..5303ac591 100644 --- a/clipboard/package.json +++ b/clipboard/package.json @@ -31,7 +31,7 @@ ], "scripts": { "verify": "npm run verify:ios && npm run verify:android && npm run verify:web", - "verify:ios": "xcodebuild build -scheme CapacitorClipboard -sdk iphonesimulator17.0 -destination 'OS=17.0,name=iPhone 15'", + "verify:ios": "xcodebuild build -scheme CapacitorClipboard -destination generic/platform=iOS", "verify:android": "cd android && ./gradlew clean build test && cd ..", "verify:web": "npm run build", "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint", diff --git a/device/package.json b/device/package.json index 382266fe7..7544f19ec 100644 --- a/device/package.json +++ b/device/package.json @@ -32,7 +32,7 @@ "scripts": { "test": "uvu -r esm -r ts-node/register src/__tests__", "verify": "npm run verify:ios && npm run verify:android && npm run verify:web", - "verify:ios": "xcodebuild build -scheme CapacitorDevice -sdk iphonesimulator17.0 -destination 'OS=17.0,name=iPhone 15'", + "verify:ios": "xcodebuild build -scheme CapacitorDevice -destination generic/platform=iOS", "verify:android": "cd android && ./gradlew clean build test && cd ..", "verify:web": "npm run build && npm test", "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint", diff --git a/dialog/package.json b/dialog/package.json index 252df93da..7e1e8850f 100644 --- a/dialog/package.json +++ b/dialog/package.json @@ -31,7 +31,7 @@ ], "scripts": { "verify": "npm run verify:ios && npm run verify:android && npm run verify:web", - "verify:ios": "xcodebuild build -scheme CapacitorDialog -sdk iphonesimulator17.0 -destination 'OS=17.0,name=iPhone 15'", + "verify:ios": "xcodebuild build -scheme CapacitorDialog -destination generic/platform=iOS", "verify:android": "cd android && ./gradlew clean build test && cd ..", "verify:web": "npm run build", "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint", diff --git a/filesystem/package.json b/filesystem/package.json index 032e2f576..d59ed59ca 100644 --- a/filesystem/package.json +++ b/filesystem/package.json @@ -31,7 +31,7 @@ ], "scripts": { "verify": "npm run verify:ios && npm run verify:android && npm run verify:web", - "verify:ios": "xcodebuild build -scheme CapacitorFilesystem -sdk iphonesimulator17.0 -destination 'OS=17.0,name=iPhone 15'", + "verify:ios": "xcodebuild build -scheme CapacitorFilesystem -destination generic/platform=iOS", "verify:android": "cd android && ./gradlew clean build test && cd ..", "verify:web": "npm run build", "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint", diff --git a/geolocation/package.json b/geolocation/package.json index bccfbf104..2f8194e74 100644 --- a/geolocation/package.json +++ b/geolocation/package.json @@ -31,7 +31,7 @@ ], "scripts": { "verify": "npm run verify:ios && npm run verify:android && npm run verify:web", - "verify:ios": "xcodebuild build -scheme CapacitorGeolocation -sdk iphonesimulator17.0 -destination 'OS=17.0,name=iPhone 15'", + "verify:ios": "xcodebuild build -scheme CapacitorGeolocation -destination generic/platform=iOS", "verify:android": "cd android && ./gradlew clean build test && cd ..", "verify:web": "npm run build", "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint", diff --git a/haptics/package.json b/haptics/package.json index a97bbff6e..13834b1fa 100644 --- a/haptics/package.json +++ b/haptics/package.json @@ -31,7 +31,7 @@ ], "scripts": { "verify": "npm run verify:ios && npm run verify:android && npm run verify:web", - "verify:ios": "xcodebuild build -scheme CapacitorHaptics -sdk iphonesimulator17.0 -destination 'OS=17.0,name=iPhone 15'", + "verify:ios": "xcodebuild build -scheme CapacitorHaptics -destination generic/platform=iOS", "verify:android": "cd android && ./gradlew clean build test && cd ..", "verify:web": "npm run build", "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint", diff --git a/keyboard/package.json b/keyboard/package.json index 9baf19d09..7649cf881 100644 --- a/keyboard/package.json +++ b/keyboard/package.json @@ -31,7 +31,7 @@ ], "scripts": { "verify": "npm run verify:ios && npm run verify:android && npm run verify:web", - "verify:ios": "xcodebuild build -scheme CapacitorKeyboard -sdk iphonesimulator17.0 -destination 'OS=17.0,name=iPhone 15'", + "verify:ios": "xcodebuild build -scheme CapacitorKeyboard -destination generic/platform=iOS", "verify:android": "cd android && ./gradlew clean build test && cd ..", "verify:web": "npm run build", "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint", diff --git a/local-notifications/package.json b/local-notifications/package.json index caac24c79..52d9f4c9c 100644 --- a/local-notifications/package.json +++ b/local-notifications/package.json @@ -31,7 +31,7 @@ ], "scripts": { "verify": "npm run verify:ios && npm run verify:android && npm run verify:web", - "verify:ios": "xcodebuild build -scheme CapacitorLocalNotifications -sdk iphonesimulator17.0 -destination 'OS=17.0,name=iPhone 15'", + "verify:ios": "xcodebuild build -scheme CapacitorLocalNotifications -destination generic/platform=iOS", "verify:android": "cd android && ./gradlew clean build test && cd ..", "verify:web": "npm run build", "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint", diff --git a/network/package.json b/network/package.json index 456865bac..83b196989 100644 --- a/network/package.json +++ b/network/package.json @@ -31,7 +31,7 @@ ], "scripts": { "verify": "npm run verify:ios && npm run verify:android && npm run verify:web", - "verify:ios": "xcodebuild build -scheme CapacitorNetwork -sdk iphonesimulator17.0 -destination 'OS=17.0,name=iPhone 15'", + "verify:ios": "xcodebuild build -scheme CapacitorNetwork -destination generic/platform=iOS", "verify:android": "cd android && ./gradlew clean build test && cd ..", "verify:web": "npm run build", "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint", diff --git a/preferences/package.json b/preferences/package.json index b90af112d..fb2771568 100644 --- a/preferences/package.json +++ b/preferences/package.json @@ -31,7 +31,7 @@ ], "scripts": { "verify": "npm run verify:ios && npm run verify:android && npm run verify:web", - "verify:ios": "xcodebuild build -scheme CapacitorPreferences -sdk iphonesimulator17.0 -destination 'OS=17.0,name=iPhone 15'", + "verify:ios": "xcodebuild build -scheme CapacitorPreferences -destination generic/platform=iOS", "verify:android": "cd android && ./gradlew clean build test && cd ..", "verify:web": "npm run build", "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint", diff --git a/push-notifications/package.json b/push-notifications/package.json index 5d5d2018a..a4e59a173 100644 --- a/push-notifications/package.json +++ b/push-notifications/package.json @@ -31,7 +31,7 @@ ], "scripts": { "verify": "npm run verify:ios && npm run verify:android && npm run verify:web", - "verify:ios": "xcodebuild build -scheme CapacitorPushNotifications -sdk iphonesimulator17.0 -destination 'OS=17.0,name=iPhone 15'", + "verify:ios": "xcodebuild build -scheme CapacitorPushNotifications -destination generic/platform=iOS", "verify:android": "cd android && ./gradlew clean build test && cd ..", "verify:web": "npm run build", "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint", diff --git a/screen-orientation/package.json b/screen-orientation/package.json index c599bda10..2739f8d04 100644 --- a/screen-orientation/package.json +++ b/screen-orientation/package.json @@ -31,7 +31,7 @@ ], "scripts": { "verify": "npm run verify:ios && npm run verify:android && npm run verify:web", - "verify:ios": "xcodebuild build -scheme CapacitorScreenOrientation -sdk iphonesimulator17.0 -destination 'OS=17.0,name=iPhone 15'", + "verify:ios": "xcodebuild build -scheme CapacitorScreenOrientation -destination generic/platform=iOS", "verify:android": "cd android && ./gradlew clean build test && cd ..", "verify:web": "npm run build", "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint", diff --git a/screen-reader/package.json b/screen-reader/package.json index b6d992a67..bdc040682 100644 --- a/screen-reader/package.json +++ b/screen-reader/package.json @@ -31,7 +31,7 @@ ], "scripts": { "verify": "npm run verify:ios && npm run verify:android && npm run verify:web", - "verify:ios": "xcodebuild build -scheme CapacitorScreenReader -sdk iphonesimulator17.0 -destination 'OS=17.0,name=iPhone 15'", + "verify:ios": "xcodebuild build -scheme CapacitorScreenReader -destination generic/platform=iOS", "verify:android": "cd android && ./gradlew clean build test && cd ..", "verify:web": "npm run build", "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint", diff --git a/share/package.json b/share/package.json index 1b631db4a..961be7159 100644 --- a/share/package.json +++ b/share/package.json @@ -31,7 +31,7 @@ ], "scripts": { "verify": "npm run verify:ios && npm run verify:android && npm run verify:web", - "verify:ios": "xcodebuild build -scheme CapacitorShare -sdk iphonesimulator17.0 -destination 'OS=17.0,name=iPhone 15'", + "verify:ios": "xcodebuild build -scheme CapacitorShare -destination generic/platform=iOS", "verify:android": "cd android && ./gradlew clean build test && cd ..", "verify:web": "npm run build", "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint", diff --git a/splash-screen/package.json b/splash-screen/package.json index 649fc84f1..58d1e4883 100644 --- a/splash-screen/package.json +++ b/splash-screen/package.json @@ -31,7 +31,7 @@ ], "scripts": { "verify": "npm run verify:ios && npm run verify:android && npm run verify:web", - "verify:ios": "xcodebuild build -scheme CapacitorSplashScreen -sdk iphonesimulator17.0 -destination 'OS=17.0,name=iPhone 15'", + "verify:ios": "xcodebuild build -scheme CapacitorSplashScreen -destination generic/platform=iOS", "verify:android": "cd android && ./gradlew clean build test && cd ..", "verify:web": "npm run build", "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint", diff --git a/status-bar/package.json b/status-bar/package.json index fd3d03aa2..5f29c93cc 100644 --- a/status-bar/package.json +++ b/status-bar/package.json @@ -31,7 +31,7 @@ ], "scripts": { "verify": "npm run verify:ios && npm run verify:android && npm run verify:web", - "verify:ios": "xcodebuild build -scheme CapacitorStatusBar -sdk iphonesimulator17.0 -destination 'OS=17.0,name=iPhone 15'", + "verify:ios": "xcodebuild build -scheme CapacitorStatusBar -destination generic/platform=iOS", "verify:android": "cd android && ./gradlew clean build test && cd ..", "verify:web": "npm run build", "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint", diff --git a/text-zoom/package.json b/text-zoom/package.json index e2ad66e29..59fe3019d 100644 --- a/text-zoom/package.json +++ b/text-zoom/package.json @@ -31,7 +31,7 @@ ], "scripts": { "verify": "npm run verify:ios && npm run verify:android && npm run verify:web", - "verify:ios": "xcodebuild build -scheme CapacitorTextZoom -sdk iphonesimulator17.0 -destination 'OS=17.0,name=iPhone 15'", + "verify:ios": "xcodebuild build -scheme CapacitorTextZoom -destination generic/platform=iOS", "verify:android": "cd android && ./gradlew clean build test && cd ..", "verify:web": "npm run build", "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint", diff --git a/toast/package.json b/toast/package.json index baeefe609..caff08ffc 100644 --- a/toast/package.json +++ b/toast/package.json @@ -31,7 +31,7 @@ ], "scripts": { "verify": "npm run verify:ios && npm run verify:android && npm run verify:web", - "verify:ios": "xcodebuild build -scheme CapacitorToast -sdk iphonesimulator17.0 -destination 'OS=17.0,name=iPhone 15'", + "verify:ios": "xcodebuild build -scheme CapacitorToast -destination generic/platform=iOS", "verify:android": "cd android && ./gradlew clean build test && cd ..", "verify:web": "npm run build", "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint", From 482fb116badb0040cabc059d44d2927044276576 Mon Sep 17 00:00:00 2001 From: jcesarmobile Date: Fri, 22 Nov 2024 20:05:58 +0100 Subject: [PATCH 12/13] refactor(local-notifications): Remove Android M version checks (#2258) --- .../LocalNotificationManager.java | 4 +-- .../LocalNotificationsPlugin.java | 36 +++++++++---------- 2 files changed, 19 insertions(+), 21 deletions(-) diff --git a/local-notifications/android/src/main/java/com/capacitorjs/plugins/localnotifications/LocalNotificationManager.java b/local-notifications/android/src/main/java/com/capacitorjs/plugins/localnotifications/LocalNotificationManager.java index a1c896f39..0b826a546 100644 --- a/local-notifications/android/src/main/java/com/capacitorjs/plugins/localnotifications/LocalNotificationManager.java +++ b/local-notifications/android/src/main/java/com/capacitorjs/plugins/localnotifications/LocalNotificationManager.java @@ -382,13 +382,13 @@ private void setExactIfPossible( "Capacitor/LocalNotification", "Exact alarms not allowed in user settings. Notification scheduled with non-exact alarm." ); - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && schedule.allowWhileIdle()) { + if (schedule.allowWhileIdle()) { alarmManager.setAndAllowWhileIdle(AlarmManager.RTC_WAKEUP, trigger, pendingIntent); } else { alarmManager.set(AlarmManager.RTC, trigger, pendingIntent); } } else { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && schedule.allowWhileIdle()) { + if (schedule.allowWhileIdle()) { alarmManager.setExactAndAllowWhileIdle(AlarmManager.RTC_WAKEUP, trigger, pendingIntent); } else { alarmManager.setExact(AlarmManager.RTC, trigger, pendingIntent); diff --git a/local-notifications/android/src/main/java/com/capacitorjs/plugins/localnotifications/LocalNotificationsPlugin.java b/local-notifications/android/src/main/java/com/capacitorjs/plugins/localnotifications/LocalNotificationsPlugin.java index 6bdd2c0e6..c9f09e59c 100644 --- a/local-notifications/android/src/main/java/com/capacitorjs/plugins/localnotifications/LocalNotificationsPlugin.java +++ b/local-notifications/android/src/main/java/com/capacitorjs/plugins/localnotifications/LocalNotificationsPlugin.java @@ -123,33 +123,31 @@ public void areEnabled(PluginCall call) { @PluginMethod public void getDeliveredNotifications(PluginCall call) { JSArray notifications = new JSArray(); - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { - StatusBarNotification[] activeNotifications = notificationManager.getActiveNotifications(); + StatusBarNotification[] activeNotifications = notificationManager.getActiveNotifications(); - for (StatusBarNotification notif : activeNotifications) { - JSObject jsNotif = new JSObject(); + for (StatusBarNotification notif : activeNotifications) { + JSObject jsNotif = new JSObject(); - jsNotif.put("id", notif.getId()); - jsNotif.put("tag", notif.getTag()); + jsNotif.put("id", notif.getId()); + jsNotif.put("tag", notif.getTag()); - Notification notification = notif.getNotification(); - if (notification != null) { - jsNotif.put("title", notification.extras.getCharSequence(Notification.EXTRA_TITLE)); - jsNotif.put("body", notification.extras.getCharSequence(Notification.EXTRA_TEXT)); - jsNotif.put("group", notification.getGroup()); - jsNotif.put("groupSummary", 0 != (notification.flags & Notification.FLAG_GROUP_SUMMARY)); + Notification notification = notif.getNotification(); + if (notification != null) { + jsNotif.put("title", notification.extras.getCharSequence(Notification.EXTRA_TITLE)); + jsNotif.put("body", notification.extras.getCharSequence(Notification.EXTRA_TEXT)); + jsNotif.put("group", notification.getGroup()); + jsNotif.put("groupSummary", 0 != (notification.flags & Notification.FLAG_GROUP_SUMMARY)); - JSObject extras = new JSObject(); + JSObject extras = new JSObject(); - for (String key : notification.extras.keySet()) { - extras.put(key, notification.extras.getString(key)); - } - - jsNotif.put("data", extras); + for (String key : notification.extras.keySet()) { + extras.put(key, notification.extras.getString(key)); } - notifications.put(jsNotif); + jsNotif.put("data", extras); } + + notifications.put(jsNotif); } JSObject result = new JSObject(); From 9f036e305643bc3f1f050fd87e632661ee763310 Mon Sep 17 00:00:00 2001 From: jcesarmobile Date: Mon, 25 Nov 2024 09:36:46 +0100 Subject: [PATCH 13/13] chore(push-notifications): Update firebaseMessagingVersion default value (#2259) --- push-notifications/README.md | 2 +- push-notifications/android/build.gradle | 2 +- .../PushNotificationsPlugin.java | 36 +++++++++---------- 3 files changed, 19 insertions(+), 21 deletions(-) diff --git a/push-notifications/README.md b/push-notifications/README.md index 22d5fe7dd..5f7847719 100644 --- a/push-notifications/README.md +++ b/push-notifications/README.md @@ -35,7 +35,7 @@ Android 13 requires a permission check in order to receive push notifications. This plugin will use the following project variables (defined in your app's `variables.gradle` file): -- `firebaseMessagingVersion` version of `com.google.firebase:firebase-messaging` (default: `23.3.1`) +- `firebaseMessagingVersion` version of `com.google.firebase:firebase-messaging` (default: `24.1.0`) --- diff --git a/push-notifications/android/build.gradle b/push-notifications/android/build.gradle index d63f5c0d0..b965d0f36 100644 --- a/push-notifications/android/build.gradle +++ b/push-notifications/android/build.gradle @@ -4,7 +4,7 @@ ext { androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.0' androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.2.1' androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.6.1' - firebaseMessagingVersion = project.hasProperty('firebaseMessagingVersion') ? rootProject.ext.firebaseMessagingVersion : '23.3.1' + firebaseMessagingVersion = project.hasProperty('firebaseMessagingVersion') ? rootProject.ext.firebaseMessagingVersion : '24.1.0' } buildscript { diff --git a/push-notifications/android/src/main/java/com/capacitorjs/plugins/pushnotifications/PushNotificationsPlugin.java b/push-notifications/android/src/main/java/com/capacitorjs/plugins/pushnotifications/PushNotificationsPlugin.java index 761c3331c..8b6823179 100644 --- a/push-notifications/android/src/main/java/com/capacitorjs/plugins/pushnotifications/PushNotificationsPlugin.java +++ b/push-notifications/android/src/main/java/com/capacitorjs/plugins/pushnotifications/PushNotificationsPlugin.java @@ -126,33 +126,31 @@ public void unregister(PluginCall call) { @PluginMethod public void getDeliveredNotifications(PluginCall call) { JSArray notifications = new JSArray(); - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { - StatusBarNotification[] activeNotifications = notificationManager.getActiveNotifications(); + StatusBarNotification[] activeNotifications = notificationManager.getActiveNotifications(); - for (StatusBarNotification notif : activeNotifications) { - JSObject jsNotif = new JSObject(); + for (StatusBarNotification notif : activeNotifications) { + JSObject jsNotif = new JSObject(); - jsNotif.put("id", notif.getId()); - jsNotif.put("tag", notif.getTag()); + jsNotif.put("id", notif.getId()); + jsNotif.put("tag", notif.getTag()); - Notification notification = notif.getNotification(); - if (notification != null) { - jsNotif.put("title", notification.extras.getCharSequence(Notification.EXTRA_TITLE)); - jsNotif.put("body", notification.extras.getCharSequence(Notification.EXTRA_TEXT)); - jsNotif.put("group", notification.getGroup()); - jsNotif.put("groupSummary", 0 != (notification.flags & Notification.FLAG_GROUP_SUMMARY)); + Notification notification = notif.getNotification(); + if (notification != null) { + jsNotif.put("title", notification.extras.getCharSequence(Notification.EXTRA_TITLE)); + jsNotif.put("body", notification.extras.getCharSequence(Notification.EXTRA_TEXT)); + jsNotif.put("group", notification.getGroup()); + jsNotif.put("groupSummary", 0 != (notification.flags & Notification.FLAG_GROUP_SUMMARY)); - JSObject extras = new JSObject(); + JSObject extras = new JSObject(); - for (String key : notification.extras.keySet()) { - extras.put(key, notification.extras.getString(key)); - } - - jsNotif.put("data", extras); + for (String key : notification.extras.keySet()) { + extras.put(key, notification.extras.getString(key)); } - notifications.put(jsNotif); + jsNotif.put("data", extras); } + + notifications.put(jsNotif); } JSObject result = new JSObject();