diff --git a/packages/capacitor-plugin/CapacitorFileTransfer.podspec b/packages/capacitor-plugin/CapacitorFileTransfer.podspec index ee51da5..5e09ae6 100644 --- a/packages/capacitor-plugin/CapacitorFileTransfer.podspec +++ b/packages/capacitor-plugin/CapacitorFileTransfer.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/FileTransferPlugin/*.{swift,h,m,c,cc,mm,cpp}' - s.ios.deployment_target = '15.0' + s.ios.deployment_target = '16.0' s.dependency 'IONFileTransferLib', spec='~> 1.0.2' s.dependency 'Capacitor' s.swift_version = '5.1' diff --git a/packages/capacitor-plugin/Package.swift b/packages/capacitor-plugin/Package.swift index 943734b..bbccdc6 100644 --- a/packages/capacitor-plugin/Package.swift +++ b/packages/capacitor-plugin/Package.swift @@ -3,7 +3,7 @@ import PackageDescription let package = Package( name: "CapacitorFileTransfer", - platforms: [.iOS(.v15)], + platforms: [.iOS(.v16)], products: [ .library( name: "CapacitorFileTransfer", @@ -11,7 +11,7 @@ let package = Package( ) ], 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/ionic-team/ion-ios-filetransfer.git", from: "1.0.2") ], targets: [ @@ -19,7 +19,6 @@ let package = Package( name: "FileTransferPlugin", dependencies: [ .product(name: "Capacitor", package: "capacitor-swift-pm"), - .product(name: "Cordova", package: "capacitor-swift-pm"), .product(name: "IONFileTransferLib", package: "ion-ios-filetransfer") ], path: "ios/Sources/FileTransferPlugin"), diff --git a/packages/capacitor-plugin/android/build.gradle b/packages/capacitor-plugin/android/build.gradle index 05c2b74..d36f4d6 100644 --- a/packages/capacitor-plugin/android/build.gradle +++ b/packages/capacitor-plugin/android/build.gradle @@ -6,26 +6,22 @@ ext { } buildscript { - ext.kotlin_version = project.hasProperty("kotlin_version") ? rootProject.ext.kotlin_version : '2.2.20' repositories { google() mavenCentral() } 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.plugins.filetransfer" - compileSdk = project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 36 + compileSdk = project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 37 defaultConfig { - minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 24 - targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 36 + minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 26 versionCode 1 versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" diff --git a/packages/capacitor-plugin/android/gradle/wrapper/gradle-wrapper.jar b/packages/capacitor-plugin/android/gradle/wrapper/gradle-wrapper.jar index 1b33c55..b1b8ef5 100644 Binary files a/packages/capacitor-plugin/android/gradle/wrapper/gradle-wrapper.jar and b/packages/capacitor-plugin/android/gradle/wrapper/gradle-wrapper.jar differ diff --git a/packages/capacitor-plugin/android/gradle/wrapper/gradle-wrapper.properties b/packages/capacitor-plugin/android/gradle/wrapper/gradle-wrapper.properties index 7705927..e74c870 100644 --- a/packages/capacitor-plugin/android/gradle/wrapper/gradle-wrapper.properties +++ b/packages/capacitor-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/packages/capacitor-plugin/android/gradlew b/packages/capacitor-plugin/android/gradlew index 23d15a9..b9bb139 100755 --- a/packages/capacitor-plugin/android/gradlew +++ b/packages/capacitor-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/packages/capacitor-plugin/android/gradlew.bat b/packages/capacitor-plugin/android/gradlew.bat index 5eed7ee..aa5f10b 100644 --- a/packages/capacitor-plugin/android/gradlew.bat +++ b/packages/capacitor-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/packages/capacitor-plugin/package.json b/packages/capacitor-plugin/package.json index 8269409..441e230 100644 --- a/packages/capacitor-plugin/package.json +++ b/packages/capacitor-plugin/package.json @@ -59,10 +59,10 @@ "@capacitor/synapse": "^1.0.4" }, "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", "@eslint/js": "^9.39.1", "@ionic/swiftlint-config": "^2.0.0", "@rollup/wasm-node": "~4.53.3", @@ -82,12 +82,12 @@ "rimraf": "^6.1.2", "semantic-release": "^25.0.2", "swiftlint": "^2.0.0", - "typescript": "^5.9.3", + "typescript": "~5.9.3", "vite": "^7.2.4", "vite-plugin-dts": "^4.5.4" }, "peerDependencies": { - "@capacitor/core": ">=8.0.0" + "@capacitor/core": ">=9.0.0-alpha.5" }, "swiftlint": "@ionic/swiftlint-config", "overrides": { diff --git a/packages/example-app/android/app/build.gradle b/packages/example-app/android/app/build.gradle index 0586c5f..8b9134e 100644 --- a/packages/example-app/android/app/build.gradle +++ b/packages/example-app/android/app/build.gradle @@ -6,7 +6,6 @@ android { defaultConfig { applicationId "com.capacitorjs.exampleapp.plugins.filetransfer" 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/packages/example-app/android/app/capacitor.build.gradle b/packages/example-app/android/app/capacitor.build.gradle index 5a8b890..c0c1de5 100644 --- a/packages/example-app/android/app/capacitor.build.gradle +++ b/packages/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-file-transfer') implementation project(':capacitor-file-viewer') diff --git a/packages/example-app/android/app/src/main/AndroidManifest.xml b/packages/example-app/android/app/src/main/AndroidManifest.xml index 340e7df..b06ddbf 100644 --- a/packages/example-app/android/app/src/main/AndroidManifest.xml +++ b/packages/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/packages/example-app/android/settings.gradle b/packages/example-app/android/settings.gradle index 3b4431d..fb68af1 100644 --- a/packages/example-app/android/settings.gradle +++ b/packages/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/packages/example-app/android/variables.gradle b/packages/example-app/android/variables.gradle index 731ff91..4f68607 100644 --- a/packages/example-app/android/variables.gradle +++ b/packages/example-app/android/variables.gradle @@ -1,16 +1,16 @@ ext { - minSdkVersion = 24 - compileSdkVersion = 36 - targetSdkVersion = 36 - androidxActivityVersion = '1.9.2' + minSdkVersion = 26 + compileSdkVersion = 37 + targetSdkVersion = 37 + androidxActivityVersion = '1.13.0' androidxAppCompatVersion = '1.7.1' androidxCoordinatorLayoutVersion = '1.3.0' - androidxCoreVersion = '1.15.0' - androidxFragmentVersion = '1.8.4' + androidxCoreVersion = '1.19.0' + androidxFragmentVersion = '1.8.9' coreSplashScreenVersion = '1.2.0' - androidxWebkitVersion = '1.12.1' + 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/packages/example-app/ios/App/App.xcodeproj/project.pbxproj b/packages/example-app/ios/App/App.xcodeproj/project.pbxproj index 9eee7d4..9654b89 100644 --- a/packages/example-app/ios/App/App.xcodeproj/project.pbxproj +++ b/packages/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 = 15.6; + 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 = 15.6; + IPHONEOS_DEPLOYMENT_TARGET = 16.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; @@ -350,7 +350,7 @@ CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; INFOPLIST_FILE = App/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 15.6; + IPHONEOS_DEPLOYMENT_TARGET = 16.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MARKETING_VERSION = 1.0; OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\""; @@ -370,7 +370,7 @@ CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; INFOPLIST_FILE = App/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 15.6; + IPHONEOS_DEPLOYMENT_TARGET = 16.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = com.capacitorjs.exampleapp.plugins.filetransfer; diff --git a/packages/example-app/ios/App/App/AppDelegate.swift b/packages/example-app/ios/App/App/AppDelegate.swift index c3cd83b..0b31ad6 100644 --- a/packages/example-app/ios/App/App/AppDelegate.swift +++ b/packages/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/packages/example-app/ios/App/Podfile b/packages/example-app/ios/App/Podfile index 480203c..4b70dca 100644 --- a/packages/example-app/ios/App/Podfile +++ b/packages/example-app/ios/App/Podfile @@ -1,6 +1,6 @@ require_relative '../../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 @@ -10,7 +10,6 @@ install! 'cocoapods', :disable_input_output_paths => true def capacitor_pods pod 'Capacitor', :path => '../../node_modules/@capacitor/ios' - pod 'CapacitorCordova', :path => '../../node_modules/@capacitor/ios' pod 'CapacitorFileTransfer', :path => '../../../capacitor-plugin' pod 'CapacitorFileViewer', :path => '../../node_modules/@capacitor/file-viewer' pod 'CapacitorFilesystem', :path => '../../node_modules/@capacitor/filesystem' diff --git a/packages/example-app/ios/App/Podfile.lock b/packages/example-app/ios/App/Podfile.lock new file mode 100644 index 0000000..8910486 --- /dev/null +++ b/packages/example-app/ios/App/Podfile.lock @@ -0,0 +1,49 @@ +PODS: + - Capacitor (9.0.0-alpha.6) + - CapacitorFilesystem (8.0.0-next.4): + - Capacitor + - IONFilesystemLib (~> 1.0.1) + - CapacitorFileTransfer (2.0.4): + - Capacitor + - IONFileTransferLib (~> 1.0.2) + - CapacitorFileViewer (2.0.0-next.4): + - Capacitor + - IONFileViewerLib (~> 1.0.3) + - IONFilesystemLib (1.0.1) + - IONFileTransferLib (1.0.3) + - IONFileViewerLib (1.0.3) + +DEPENDENCIES: + - "Capacitor (from `../../node_modules/@capacitor/ios`)" + - "CapacitorFilesystem (from `../../node_modules/@capacitor/filesystem`)" + - CapacitorFileTransfer (from `../../../capacitor-plugin`) + - "CapacitorFileViewer (from `../../node_modules/@capacitor/file-viewer`)" + +SPEC REPOS: + trunk: + - IONFilesystemLib + - IONFileTransferLib + - IONFileViewerLib + +EXTERNAL SOURCES: + Capacitor: + :path: "../../node_modules/@capacitor/ios" + CapacitorFilesystem: + :path: "../../node_modules/@capacitor/filesystem" + CapacitorFileTransfer: + :path: "../../../capacitor-plugin" + CapacitorFileViewer: + :path: "../../node_modules/@capacitor/file-viewer" + +SPEC CHECKSUMS: + Capacitor: b5cc4a2eadcd1184d4a581b4c631dd8ef7bb34b1 + CapacitorFilesystem: eb0cee773e4bbedd96b32ea06f91d58100e0e421 + CapacitorFileTransfer: d555c27a2672ab83d9405bb337c26a5f42c3bcf7 + CapacitorFileViewer: 3ff554ef0b1b4ea900341046a333b5586c7ff10f + IONFilesystemLib: 89258b8e3e85465da93127d25d7ce37f977e8a6f + IONFileTransferLib: addbbf50405c163dcd74a7b1bd8c6f9302342be2 + IONFileViewerLib: 574758ebcaa4b1543669b1c9708f1970e1172b29 + +PODFILE CHECKSUM: 87ed087f771bb6285058d46f0c62d8e239b59cfc + +COCOAPODS: 1.16.2 diff --git a/packages/example-app/package.json b/packages/example-app/package.json index bacc3f1..42ea47d 100644 --- a/packages/example-app/package.json +++ b/packages/example-app/package.json @@ -13,17 +13,17 @@ "preview": "vite preview" }, "dependencies": { - "@capacitor/android": "^8.0.0", - "@capacitor/core": "^8.0.0", + "@capacitor/android": "next", + "@capacitor/core": "next", "@capacitor/file-transfer": "file:../capacitor-plugin", - "@capacitor/file-viewer": "^1.0.0 || ^2.0.0", - "@capacitor/filesystem": "^7.0.0 || ^8.0.0", - "@capacitor/ios": "^8.0.0" + "@capacitor/file-viewer": "next", + "@capacitor/filesystem": "next", + "@capacitor/ios": "next" }, "devDependencies": { - "@capacitor/cli": "^8.0.0", + "@capacitor/cli": "next", "vite": "^7.2.4" }, "author": "", "license": "ISC" -} +} \ No newline at end of file