diff --git a/README.md b/README.md index 62b8375..af5b708 100644 --- a/README.md +++ b/README.md @@ -11,14 +11,6 @@ npx cap sync #### Android -The barcode scanner plugin requires a minimum Android SDK target of 26. This is higher than the default that comes with your Capacitor application. You can update this value in your `android/variables.gradle` file. - -```gradle -ext { - minSdkVersion = 26 -} -``` - Note: Android with `ZXING` scanning library supports all formats, while `MLKIT` supports all except `MAXICODE`, `RSS_14`, `RSS_EXPANDED` and `UPC_EAN_EXTENSION` - using one of these in `hint` will default to scanning any format. #### iOS diff --git a/example-app-spm/ios/App/App.xcodeproj/project.pbxproj b/example-app-spm/ios/App/App.xcodeproj/project.pbxproj index c9bfaee..3229406 100644 --- a/example-app-spm/ios/App/App.xcodeproj/project.pbxproj +++ b/example-app-spm/ios/App/App.xcodeproj/project.pbxproj @@ -227,7 +227,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; + IPHONEOS_DEPLOYMENT_TARGET = 16.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -278,7 +278,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; + IPHONEOS_DEPLOYMENT_TARGET = 16.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_COMPILATION_MODE = wholemodule; @@ -296,7 +296,7 @@ CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = 9YN2HU59K8; INFOPLIST_FILE = App/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 15.6; + IPHONEOS_DEPLOYMENT_TARGET = 16.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -319,7 +319,7 @@ CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = 9YN2HU59K8; INFOPLIST_FILE = App/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 15.6; + IPHONEOS_DEPLOYMENT_TARGET = 16.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", diff --git a/example-app-spm/ios/App/App/AppDelegate.swift b/example-app-spm/ios/App/App/AppDelegate.swift index c3cd83b..0b31ad6 100644 --- a/example-app-spm/ios/App/App/AppDelegate.swift +++ b/example-app-spm/ios/App/App/AppDelegate.swift @@ -1,7 +1,7 @@ import UIKit import Capacitor -@UIApplicationMain +@main class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? diff --git a/example-app-spm/ios/App/CapApp-SPM/Package.swift b/example-app-spm/ios/App/CapApp-SPM/Package.swift index 0c5ea86..1cd848b 100644 --- a/example-app-spm/ios/App/CapApp-SPM/Package.swift +++ b/example-app-spm/ios/App/CapApp-SPM/Package.swift @@ -4,14 +4,14 @@ import PackageDescription // DO NOT MODIFY THIS FILE - managed by Capacitor CLI commands let package = Package( name: "CapApp-SPM", - platforms: [.iOS(.v15)], + platforms: [.iOS(.v16)], products: [ .library( name: "CapApp-SPM", targets: ["CapApp-SPM"]) ], dependencies: [ - .package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", exact: "8.0.2"), + .package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", exact: "9.0.0-alpha.6"), .package(name: "CapacitorBarcodeScanner", path: "../../../../plugin") ], targets: [ @@ -19,7 +19,6 @@ let package = Package( name: "CapApp-SPM", dependencies: [ .product(name: "Capacitor", package: "capacitor-swift-pm"), - .product(name: "Cordova", package: "capacitor-swift-pm"), .product(name: "CapacitorBarcodeScanner", package: "CapacitorBarcodeScanner") ] ) diff --git a/example-app-spm/package.json b/example-app-spm/package.json index a51cb0d..1270fc9 100644 --- a/example-app-spm/package.json +++ b/example-app-spm/package.json @@ -13,8 +13,8 @@ }, "dependencies": { "@capacitor/barcode-scanner": "workspace:*", - "@capacitor/core": "^8.0.0", - "@capacitor/ios": "^8.0.0", + "@capacitor/core": "next", + "@capacitor/ios": "next", "@ionic/react": "^8.7.9", "@ionic/react-router": "^8.7.9", "ionicons": "^8.0.13", @@ -24,7 +24,7 @@ "react-router-dom": "^5.3.4" }, "devDependencies": { - "@capacitor/cli": "^8.0.0", + "@capacitor/cli": "next", "@testing-library/dom": "^10.4.1", "@testing-library/jest-dom": "^6.9.1", "@testing-library/react": "^16.3.0", diff --git a/example-app/android/app/build.gradle b/example-app/android/app/build.gradle index 201e0a9..ed14a0f 100644 --- a/example-app/android/app/build.gradle +++ b/example-app/android/app/build.gradle @@ -6,7 +6,6 @@ android { defaultConfig { applicationId "io.ionic.starter" minSdkVersion rootProject.ext.minSdkVersion - targetSdkVersion rootProject.ext.targetSdkVersion versionCode 1 versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" @@ -19,17 +18,11 @@ android { buildTypes { release { minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } } -repositories { - flatDir{ - dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs' - } -} - dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion" @@ -39,7 +32,6 @@ dependencies { testImplementation "junit:junit:$junitVersion" androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion" androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion" - implementation project(':capacitor-cordova-android-plugins') } apply from: 'capacitor.build.gradle' diff --git a/example-app/android/app/capacitor.build.gradle b/example-app/android/app/capacitor.build.gradle index f86b69b..3bb65b2 100644 --- a/example-app/android/app/capacitor.build.gradle +++ b/example-app/android/app/capacitor.build.gradle @@ -7,7 +7,6 @@ android { } } -apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle" dependencies { implementation project(':capacitor-barcode-scanner') diff --git a/example-app/android/app/src/main/AndroidManifest.xml b/example-app/android/app/src/main/AndroidManifest.xml index 4d7ca38..b06ddbf 100644 --- a/example-app/android/app/src/main/AndroidManifest.xml +++ b/example-app/android/app/src/main/AndroidManifest.xml @@ -10,7 +10,7 @@ android:theme="@style/AppTheme"> &2 echo Please set the JAVA_HOME variable in your environment to match the 1>&2 echo location of your Java installation. 1>&2 -goto fail +"%COMSPEC%" /c exit 1 :findJavaFromJavaHome set JAVA_HOME=%JAVA_HOME:"=% @@ -65,30 +65,18 @@ echo. 1>&2 echo Please set the JAVA_HOME variable in your environment to match the 1>&2 echo location of your Java installation. 1>&2 -goto fail +"%COMSPEC%" /c exit 1 :execute @rem Setup the command line -set CLASSPATH= @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* +@rem endlocal doesn't take effect until after the line is parsed and variables are expanded +@rem which allows us to clear the local environment before executing the java command +endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel -:end -@rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega +:exitWithErrorLevel +@rem Use "%COMSPEC%" /c exit to allow operators to work properly in scripts +"%COMSPEC%" /c exit %ERRORLEVEL% diff --git a/example-app/android/settings.gradle b/example-app/android/settings.gradle index 3b4431d..fb68af1 100644 --- a/example-app/android/settings.gradle +++ b/example-app/android/settings.gradle @@ -1,5 +1,3 @@ include ':app' -include ':capacitor-cordova-android-plugins' -project(':capacitor-cordova-android-plugins').projectDir = new File('./capacitor-cordova-android-plugins/') apply from: 'capacitor.settings.gradle' \ No newline at end of file diff --git a/example-app/android/variables.gradle b/example-app/android/variables.gradle index 7860fe0..4f68607 100644 --- a/example-app/android/variables.gradle +++ b/example-app/android/variables.gradle @@ -1,16 +1,16 @@ ext { minSdkVersion = 26 - compileSdkVersion = 36 - targetSdkVersion = 36 - androidxActivityVersion = '1.8.0' + compileSdkVersion = 37 + targetSdkVersion = 37 + androidxActivityVersion = '1.13.0' androidxAppCompatVersion = '1.7.1' androidxCoordinatorLayoutVersion = '1.3.0' - androidxCoreVersion = '1.12.0' - androidxFragmentVersion = '1.6.2' + androidxCoreVersion = '1.19.0' + androidxFragmentVersion = '1.8.9' coreSplashScreenVersion = '1.2.0' - androidxWebkitVersion = '1.9.0' + androidxWebkitVersion = '1.16.0' junitVersion = '4.13.2' androidxJunitVersion = '1.3.0' androidxEspressoCoreVersion = '3.7.0' - cordovaAndroidVersion = '10.1.1' + cordovaAndroidVersion = '15.0.0' } \ No newline at end of file diff --git a/example-app/ios/App/App.xcodeproj/project.pbxproj b/example-app/ios/App/App.xcodeproj/project.pbxproj index 15e9aea..a13de62 100644 --- a/example-app/ios/App/App.xcodeproj/project.pbxproj +++ b/example-app/ios/App/App.xcodeproj/project.pbxproj @@ -283,7 +283,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; + IPHONEOS_DEPLOYMENT_TARGET = 16.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -334,7 +334,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; + IPHONEOS_DEPLOYMENT_TARGET = 16.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; @@ -351,7 +351,7 @@ CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = 9YN2HU59K8; INFOPLIST_FILE = App/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; + IPHONEOS_DEPLOYMENT_TARGET = 16.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MARKETING_VERSION = 1.0; OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\""; @@ -372,7 +372,7 @@ CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = 9YN2HU59K8; INFOPLIST_FILE = App/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; + IPHONEOS_DEPLOYMENT_TARGET = 16.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = io.ionic.starter; diff --git a/example-app/ios/App/App/AppDelegate.swift b/example-app/ios/App/App/AppDelegate.swift index c3cd83b..0b31ad6 100644 --- a/example-app/ios/App/App/AppDelegate.swift +++ b/example-app/ios/App/App/AppDelegate.swift @@ -1,7 +1,7 @@ import UIKit import Capacitor -@UIApplicationMain +@main class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? diff --git a/example-app/ios/App/Podfile b/example-app/ios/App/Podfile index 101a0fd..fad445d 100644 --- a/example-app/ios/App/Podfile +++ b/example-app/ios/App/Podfile @@ -1,6 +1,6 @@ -require_relative '../../../node_modules/.pnpm/@capacitor+ios@8.0.2_@capacitor+core@8.0.2/node_modules/@capacitor/ios/scripts/pods_helpers' +require_relative '../../../node_modules/.pnpm/@capacitor+ios@9.0.0-alpha.6_@capacitor+core@9.0.0-alpha.6/node_modules/@capacitor/ios/scripts/pods_helpers' -platform :ios, '15.0' +platform :ios, '16.0' use_frameworks! # workaround to avoid Xcode caching of Pods that requires @@ -9,8 +9,7 @@ use_frameworks! install! 'cocoapods', :disable_input_output_paths => true def capacitor_pods - pod 'Capacitor', :path => '../../../node_modules/.pnpm/@capacitor+ios@8.0.2_@capacitor+core@8.0.2/node_modules/@capacitor/ios' - pod 'CapacitorCordova', :path => '../../../node_modules/.pnpm/@capacitor+ios@8.0.2_@capacitor+core@8.0.2/node_modules/@capacitor/ios' + pod 'Capacitor', :path => '../../../node_modules/.pnpm/@capacitor+ios@9.0.0-alpha.6_@capacitor+core@9.0.0-alpha.6/node_modules/@capacitor/ios' pod 'CapacitorBarcodeScanner', :path => '../../../plugin' end diff --git a/example-app/ios/App/Podfile.lock b/example-app/ios/App/Podfile.lock index 0621e52..1b89804 100644 --- a/example-app/ios/App/Podfile.lock +++ b/example-app/ios/App/Podfile.lock @@ -1,16 +1,13 @@ PODS: - - Capacitor (8.0.2): - - CapacitorCordova - - CapacitorBarcodeScanner (3.0.2): + - Capacitor (9.0.0-alpha.6) + - CapacitorBarcodeScanner (3.1.0): - Capacitor - OSBarcodeLib (= 2.2.0) - - CapacitorCordova (8.0.2) - OSBarcodeLib (2.2.0) DEPENDENCIES: - - "Capacitor (from `../../../node_modules/.pnpm/@capacitor+ios@8.0.2_@capacitor+core@8.0.2/node_modules/@capacitor/ios`)" + - "Capacitor (from `../../../node_modules/.pnpm/@capacitor+ios@9.0.0-alpha.6_@capacitor+core@9.0.0-alpha.6/node_modules/@capacitor/ios`)" - CapacitorBarcodeScanner (from `../../../plugin`) - - "CapacitorCordova (from `../../../node_modules/.pnpm/@capacitor+ios@8.0.2_@capacitor+core@8.0.2/node_modules/@capacitor/ios`)" SPEC REPOS: trunk: @@ -18,18 +15,15 @@ SPEC REPOS: EXTERNAL SOURCES: Capacitor: - :path: "../../../node_modules/.pnpm/@capacitor+ios@8.0.2_@capacitor+core@8.0.2/node_modules/@capacitor/ios" + :path: "../../../node_modules/.pnpm/@capacitor+ios@9.0.0-alpha.6_@capacitor+core@9.0.0-alpha.6/node_modules/@capacitor/ios" CapacitorBarcodeScanner: :path: "../../../plugin" - CapacitorCordova: - :path: "../../../node_modules/.pnpm/@capacitor+ios@8.0.2_@capacitor+core@8.0.2/node_modules/@capacitor/ios" SPEC CHECKSUMS: - Capacitor: 2b79172ad27f3be2d103cce88b8eb9803fdcc744 - CapacitorBarcodeScanner: 69c79a644283b98183cd603f1cfd8d5e9e4664e5 - CapacitorCordova: 921bdb690ebe82421b24fce45552fd3dea2ae43a + Capacitor: b5cc4a2eadcd1184d4a581b4c631dd8ef7bb34b1 + CapacitorBarcodeScanner: 5cb620e3ea70073e3c5f608625900112dbba7907 OSBarcodeLib: aa520d51576362d0dfea290b82653e31df1a6fc4 -PODFILE CHECKSUM: d994f7d6c451be5ff31fe0d46f1283a24db43080 +PODFILE CHECKSUM: 3658cb3c2413199fc8ba3d88dabe8a48a4e45ae3 COCOAPODS: 1.16.2 diff --git a/example-app/package.json b/example-app/package.json index 519f63d..186deed 100644 --- a/example-app/package.json +++ b/example-app/package.json @@ -12,10 +12,10 @@ "lint": "eslint" }, "dependencies": { - "@capacitor/android": "^8.0.0", + "@capacitor/android": "next", "@capacitor/barcode-scanner": "workspace:*", - "@capacitor/core": "^8.0.0", - "@capacitor/ios": "^8.0.0", + "@capacitor/core": "next", + "@capacitor/ios": "next", "@ionic/react": "^8.7.9", "@ionic/react-router": "^8.7.9", "ionicons": "^8.0.13", @@ -25,7 +25,7 @@ "react-router-dom": "^5.3.4" }, "devDependencies": { - "@capacitor/cli": "^8.0.0", + "@capacitor/cli": "next", "@testing-library/dom": "^10.4.1", "@testing-library/jest-dom": "^6.9.1", "@testing-library/react": "^16.3.0", diff --git a/plugin/CapacitorBarcodeScanner.podspec b/plugin/CapacitorBarcodeScanner.podspec index 99840ca..1830a7d 100644 --- a/plugin/CapacitorBarcodeScanner.podspec +++ b/plugin/CapacitorBarcodeScanner.podspec @@ -11,7 +11,7 @@ Pod::Spec.new do |s| s.author = package['author'] s.source = { :git => package['repository']['url'], :tag => s.version.to_s } s.source_files = 'ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}' - s.ios.deployment_target = '15.0' + s.ios.deployment_target = '16.0' s.dependency 'Capacitor' s.dependency 'OSBarcodeLib', '2.2.0' s.swift_version = '5.1' diff --git a/plugin/Package.swift b/plugin/Package.swift index c4e0516..4004a49 100644 --- a/plugin/Package.swift +++ b/plugin/Package.swift @@ -3,14 +3,14 @@ import PackageDescription let package = Package( name: "CapacitorBarcodeScanner", - platforms: [.iOS(.v15)], + platforms: [.iOS(.v16)], products: [ .library( name: "CapacitorBarcodeScanner", targets: ["CapacitorBarcodeScannerPlugin"]) ], dependencies: [ - .package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "8.0.0"), + .package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "9.0.0-alpha.5"), .package(url: "https://github.com/OutSystems/OSBarcodeLib-iOS.git", from: "2.2.0") ], targets: [ @@ -18,7 +18,6 @@ let package = Package( name: "CapacitorBarcodeScannerPlugin", dependencies: [ .product(name: "Capacitor", package: "capacitor-swift-pm"), - .product(name: "Cordova", package: "capacitor-swift-pm"), .product(name: "OSBarcodeLib", package: "OSBarcodeLib-iOS") ], path: "ios/Sources/CapacitorBarcodeScannerPlugin"), diff --git a/plugin/README.md b/plugin/README.md index 62b8375..af5b708 100644 --- a/plugin/README.md +++ b/plugin/README.md @@ -11,14 +11,6 @@ npx cap sync #### Android -The barcode scanner plugin requires a minimum Android SDK target of 26. This is higher than the default that comes with your Capacitor application. You can update this value in your `android/variables.gradle` file. - -```gradle -ext { - minSdkVersion = 26 -} -``` - Note: Android with `ZXING` scanning library supports all formats, while `MLKIT` supports all except `MAXICODE`, `RSS_14`, `RSS_EXPANDED` and `UPC_EAN_EXTENSION` - using one of these in `hint` will default to scanning any format. #### iOS diff --git a/plugin/android/build.gradle b/plugin/android/build.gradle index 035ea67..30ff2a5 100644 --- a/plugin/android/build.gradle +++ b/plugin/android/build.gradle @@ -7,7 +7,6 @@ ext { } buildscript { - ext.kotlin_version = project.hasProperty("kotlin_version") ? rootProject.ext.kotlin_version : '2.2.20' repositories { google() mavenCentral() @@ -16,20 +15,17 @@ buildscript { } } dependencies { - classpath 'com.android.tools.build:gradle:8.13.0' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + classpath 'com.android.tools.build:gradle:9.2.1' } } apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' android { namespace = "com.capacitorjs.barcodescanner" - compileSdk = project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 36 + compileSdk = project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 37 defaultConfig { minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 26 - targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 36 versionCode 1 versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" diff --git a/plugin/android/gradle/wrapper/gradle-wrapper.jar b/plugin/android/gradle/wrapper/gradle-wrapper.jar index 1b33c55..b1b8ef5 100644 Binary files a/plugin/android/gradle/wrapper/gradle-wrapper.jar and b/plugin/android/gradle/wrapper/gradle-wrapper.jar differ diff --git a/plugin/android/gradle/wrapper/gradle-wrapper.properties b/plugin/android/gradle/wrapper/gradle-wrapper.properties index 7705927..e74c870 100644 --- a/plugin/android/gradle/wrapper/gradle-wrapper.properties +++ b/plugin/android/gradle/wrapper/gradle-wrapper.properties @@ -1,7 +1,9 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.1-all.zip networkTimeout=10000 +retries=0 +retryBackOffMs=500 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/plugin/android/gradlew b/plugin/android/gradlew index 23d15a9..b9bb139 100755 --- a/plugin/android/gradlew +++ b/plugin/android/gradlew @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright © 2015-2021 the original authors. +# Copyright © 2015 the original authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -57,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/3d91ce3b8caaf77ad09f381f43615b715b53f72c/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -114,7 +114,6 @@ case "$( uname )" in #( NONSTOP* ) nonstop=true ;; esac -CLASSPATH="\\\"\\\"" # Determine the Java command to use to start the JVM. @@ -172,7 +171,6 @@ fi # For Cygwin or MSYS, switch paths to Windows format before running java if "$cygwin" || "$msys" ; then APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) JAVACMD=$( cygpath --unix "$JAVACMD" ) @@ -212,7 +210,6 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ "$@" diff --git a/plugin/android/gradlew.bat b/plugin/android/gradlew.bat index 5eed7ee..aa5f10b 100644 --- a/plugin/android/gradlew.bat +++ b/plugin/android/gradlew.bat @@ -23,8 +23,8 @@ @rem @rem ########################################################################## -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal +@rem Set local scope for the variables, and ensure extensions are enabled +setlocal EnableExtensions set DIRNAME=%~dp0 if "%DIRNAME%"=="" set DIRNAME=. @@ -51,7 +51,7 @@ echo. 1>&2 echo Please set the JAVA_HOME variable in your environment to match the 1>&2 echo location of your Java installation. 1>&2 -goto fail +"%COMSPEC%" /c exit 1 :findJavaFromJavaHome set JAVA_HOME=%JAVA_HOME:"=% @@ -65,30 +65,18 @@ echo. 1>&2 echo Please set the JAVA_HOME variable in your environment to match the 1>&2 echo location of your Java installation. 1>&2 -goto fail +"%COMSPEC%" /c exit 1 :execute @rem Setup the command line -set CLASSPATH= @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* +@rem endlocal doesn't take effect until after the line is parsed and variables are expanded +@rem which allows us to clear the local environment before executing the java command +endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel -:end -@rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega +:exitWithErrorLevel +@rem Use "%COMSPEC%" /c exit to allow operators to work properly in scripts +"%COMSPEC%" /c exit %ERRORLEVEL% diff --git a/plugin/package.json b/plugin/package.json index a8e9238..3ed4bcd 100644 --- a/plugin/package.json +++ b/plugin/package.json @@ -44,7 +44,7 @@ "prettier": "prettier \"**/*.{css,html,ts,js,java}\" --plugin=prettier-plugin-java", "swiftlint": "node-swiftlint", "docgen": "docgen --api CapacitorBarcodeScannerPlugin --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" @@ -53,10 +53,10 @@ "html5-qrcode": "2.3.8" }, "devDependencies": { - "@capacitor/android": "^8.0.0", - "@capacitor/core": "^8.0.0", + "@capacitor/android": "next", + "@capacitor/core": "next", "@capacitor/docgen": "0.3.0", - "@capacitor/ios": "^8.0.0", + "@capacitor/ios": "next", "@ionic/swiftlint-config": "^2.0.0", "@types/node": "^24.10.1", "@typescript-eslint/eslint-plugin": "^8.47.0", @@ -71,7 +71,7 @@ "typescript": "^5.9.3" }, "peerDependencies": { - "@capacitor/core": ">=8.0.0" + "@capacitor/core": ">=9.0.0-alpha.5" }, "swiftlint": "@ionic/swiftlint-config", "capacitor": { diff --git a/plugin/rollup.config.js b/plugin/rollup.config.mjs similarity index 100% rename from plugin/rollup.config.js rename to plugin/rollup.config.mjs diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0ef3f23..fd7282c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -27,17 +27,17 @@ importers: example-app: dependencies: '@capacitor/android': - specifier: ^8.0.0 - version: 8.3.4(@capacitor/core@8.3.4) + specifier: next + version: 9.0.0-alpha.6(@capacitor/core@9.0.0-alpha.6) '@capacitor/barcode-scanner': specifier: workspace:* version: link:../plugin '@capacitor/core': - specifier: ^8.0.0 - version: 8.3.4 + specifier: next + version: 9.0.0-alpha.6 '@capacitor/ios': - specifier: ^8.0.0 - version: 8.3.4(@capacitor/core@8.3.4) + specifier: next + version: 9.0.0-alpha.6(@capacitor/core@9.0.0-alpha.6) '@ionic/react': specifier: ^8.7.9 version: 8.8.8(react-dom@19.2.6(react@19.2.6))(react@19.2.6) @@ -61,8 +61,8 @@ importers: version: 5.3.4(react@19.2.6) devDependencies: '@capacitor/cli': - specifier: ^8.0.0 - version: 8.3.4 + specifier: next + version: 9.0.0-alpha.6 '@testing-library/dom': specifier: ^10.4.1 version: 10.4.1 @@ -127,11 +127,11 @@ importers: specifier: workspace:* version: link:../plugin '@capacitor/core': - specifier: ^8.0.0 - version: 8.3.4 + specifier: next + version: 9.0.0-alpha.6 '@capacitor/ios': - specifier: ^8.0.0 - version: 8.3.4(@capacitor/core@8.3.4) + specifier: next + version: 9.0.0-alpha.6(@capacitor/core@9.0.0-alpha.6) '@ionic/react': specifier: ^8.7.9 version: 8.8.8(react-dom@19.2.6(react@19.2.6))(react@19.2.6) @@ -155,8 +155,8 @@ importers: version: 5.3.4(react@19.2.6) devDependencies: '@capacitor/cli': - specifier: ^8.0.0 - version: 8.3.4 + specifier: next + version: 9.0.0-alpha.6 '@testing-library/dom': specifier: ^10.4.1 version: 10.4.1 @@ -222,17 +222,17 @@ importers: version: 2.3.8 devDependencies: '@capacitor/android': - specifier: ^8.0.0 - version: 8.3.4(@capacitor/core@8.3.4) + specifier: next + version: 9.0.0-alpha.6(@capacitor/core@9.0.0-alpha.6) '@capacitor/core': - specifier: ^8.0.0 - version: 8.3.4 + specifier: next + version: 9.0.0-alpha.6 '@capacitor/docgen': specifier: 0.3.0 version: 0.3.0 '@capacitor/ios': - specifier: ^8.0.0 - version: 8.3.4(@capacitor/core@8.3.4) + specifier: next + version: 9.0.0-alpha.6(@capacitor/core@9.0.0-alpha.6) '@ionic/swiftlint-config': specifier: ^2.0.0 version: 2.0.0 @@ -800,28 +800,28 @@ packages: resolution: {integrity: sha512-4zBIxpPzowiZpusoFkyGVwakdRJUyuH5PxQ/PrqghfdFWWasvnCdPfQXHrenDai+gyLARulZjZowCOj6fjT4pA==} engines: {node: '>=6.9.0'} - '@capacitor/android@8.3.4': - resolution: {integrity: sha512-7gJjrG3X32Am1QMLqgMztWTYMLMVNE+VZwhekNxhvYizH4mOV05vH+rC9B+f17bCkYZfyu/qXQX6hoY7kLeVZw==} + '@capacitor/android@9.0.0-alpha.6': + resolution: {integrity: sha512-/hVYtjrvaoLinn8fkcnm2prCo7OSgbwP6x+tzQa+IQChTMsyBTAp/eWEvKCxh0EVQeUUWmRtLXd2CzhPamjdFA==} peerDependencies: - '@capacitor/core': ^8.3.0 + '@capacitor/core': ^9.0.0-alpha.6 - '@capacitor/cli@8.3.4': - resolution: {integrity: sha512-QEmyNdiDDVNYl0Mahm7YTVA/3t2tKcy7FWYDapeKGavS6HDNHZSjyTVwQpUXQbDZrrs/PS2Wau3Aii+LIFwm/A==} + '@capacitor/cli@9.0.0-alpha.6': + resolution: {integrity: sha512-PsPkbmK1SffBuv7kb6Htebyht2Y2tDJRPWvnxW/s8Y3BHv4LbCEhlIE3PeB+AnDgGNTAGp2e9BnTgWUHcmN7OQ==} engines: {node: '>=22.0.0'} hasBin: true - '@capacitor/core@8.3.4': - resolution: {integrity: sha512-CqRQCkb6HXxcx/N7s+hHTN6ef2CmamFiRMITwm4qB840ph56mS42bzUgn6tKCP+RZjdDweiRHj9ytDDeN6jFag==} + '@capacitor/core@9.0.0-alpha.6': + resolution: {integrity: sha512-AqCxIP+84lNNh1E+Yv04FRF9Pg8MTm+ed8QEC8OGOI4epbMwCEDdS0W84+C9ZAs+6cFtQcIS5N2owhOy2KeOOQ==} '@capacitor/docgen@0.3.0': resolution: {integrity: sha512-WPggobo5Ql70F+2xOIUwNSApJXaL9F/9+Al6B+sNuSAmcg484OAksyUPKgiynF4BVlxeY5a0sDkgdVkmmA3ElQ==} engines: {node: '>=18.0.0'} hasBin: true - '@capacitor/ios@8.3.4': - resolution: {integrity: sha512-XvvnPFWWP/gwwO811ue7nEBKSZqDCIB8hxGgWV6iXA7DSVLqMOEmQdfHj94kkVxof2wL9XWHypu3ayDULo7U5w==} + '@capacitor/ios@9.0.0-alpha.6': + resolution: {integrity: sha512-eFKuHmVdCnKMZ/+cMl24Up0yzLMFxS0vYXJLf62/556cHqTO9n7BBeXPCNIPpL5EV+wrVCw7Hq/xwXf7p2mGoQ==} peerDependencies: - '@capacitor/core': ^8.3.0 + '@capacitor/core': ^9.0.0-alpha.6 '@csstools/color-helpers@6.0.2': resolution: {integrity: sha512-LMGQLS9EuADloEFkcTBR3BwV/CGHV7zyDxVRtVDTwdI2Ca4it0CCVTT9wCkxSgokjE5Ho41hEPgb8OEUwoXr6Q==} @@ -6080,11 +6080,11 @@ snapshots: '@babel/helper-string-parser': 7.29.7 '@babel/helper-validator-identifier': 7.29.7 - '@capacitor/android@8.3.4(@capacitor/core@8.3.4)': + '@capacitor/android@9.0.0-alpha.6(@capacitor/core@9.0.0-alpha.6)': dependencies: - '@capacitor/core': 8.3.4 + '@capacitor/core': 9.0.0-alpha.6 - '@capacitor/cli@8.3.4': + '@capacitor/cli@9.0.0-alpha.6': dependencies: '@ionic/cli-framework-output': 2.2.8 '@ionic/utils-subprocess': 3.0.1 @@ -6106,7 +6106,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@capacitor/core@8.3.4': + '@capacitor/core@9.0.0-alpha.6': dependencies: tslib: 2.8.1 @@ -6118,9 +6118,9 @@ snapshots: minimist: 1.2.8 typescript: 4.2.4 - '@capacitor/ios@8.3.4(@capacitor/core@8.3.4)': + '@capacitor/ios@9.0.0-alpha.6(@capacitor/core@9.0.0-alpha.6)': dependencies: - '@capacitor/core': 8.3.4 + '@capacitor/core': 9.0.0-alpha.6 '@csstools/color-helpers@6.0.2': {} @@ -6722,7 +6722,7 @@ snapshots: '@npmcli/fs@5.0.0': dependencies: - semver: 7.7.2 + semver: 7.8.1 '@npmcli/git@6.0.3': dependencies: @@ -9664,7 +9664,7 @@ snapshots: npm-install-checks@8.0.0: dependencies: - semver: 7.7.2 + semver: 7.8.1 npm-normalize-package-bin@4.0.0: {} @@ -9674,7 +9674,7 @@ snapshots: dependencies: hosted-git-info: 8.1.0 proc-log: 5.0.0 - semver: 7.7.2 + semver: 7.8.1 validate-npm-package-name: 6.0.2 npm-package-arg@13.0.1: