From 0ab98e3c7f7a4a28cec4fed28a765bee8330e78d Mon Sep 17 00:00:00 2001 From: Creeper19472 Date: Sun, 5 Oct 2025 16:43:32 +0800 Subject: [PATCH 1/9] Update build.gradle --- src/serious_python_android/android/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/serious_python_android/android/build.gradle b/src/serious_python_android/android/build.gradle index 01d7e2f3..65eb1abb 100644 --- a/src/serious_python_android/android/build.gradle +++ b/src/serious_python_android/android/build.gradle @@ -31,7 +31,7 @@ android { // Bumping the plugin compileSdkVersion requires all clients of this plugin // to bump the version in their app. - compileSdkVersion 31 + compileSdkVersion 36 // Invoke the shared CMake build with the Android Gradle Plugin. externalNativeBuild { @@ -129,4 +129,4 @@ if (System.getenv('SERIOUS_PYTHON_BUILD_DIST')) { task copyOrUntar(dependsOn: packageTasks) } -preBuild.dependsOn copyOrUntar \ No newline at end of file +preBuild.dependsOn copyOrUntar From 2a031cd4ccbf600bd85c30606ba6ff9ea924f16a Mon Sep 17 00:00:00 2001 From: Creeper19472 Date: Sun, 5 Oct 2025 18:12:30 +0800 Subject: [PATCH 2/9] Update pubspec.yaml --- src/serious_python/pubspec.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/serious_python/pubspec.yaml b/src/serious_python/pubspec.yaml index 2684f173..9995d29a 100644 --- a/src/serious_python/pubspec.yaml +++ b/src/serious_python/pubspec.yaml @@ -44,7 +44,7 @@ dependencies: path: ../serious_python_linux path_provider: ^2.1.3 - archive: ^3.6.1 + archive: ^4.0.2 path: ^1.9.0 args: ^2.5.0 toml: ^0.15.0 @@ -57,4 +57,4 @@ dev_dependencies: flutter_test: sdk: flutter plugin_platform_interface: ^2.1.6 - flutter_lints: ^2.0.0 \ No newline at end of file + flutter_lints: ^2.0.0 From 9b96ad2e20da6e48ce237ed3b32877ad5b9deed0 Mon Sep 17 00:00:00 2001 From: Creeper19472 Date: Sun, 5 Oct 2025 18:14:22 +0800 Subject: [PATCH 3/9] Update pubspec.yaml --- src/serious_python_platform_interface/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/serious_python_platform_interface/pubspec.yaml b/src/serious_python_platform_interface/pubspec.yaml index 8e892462..c3b1c120 100644 --- a/src/serious_python_platform_interface/pubspec.yaml +++ b/src/serious_python_platform_interface/pubspec.yaml @@ -13,7 +13,7 @@ dependencies: sdk: flutter plugin_platform_interface: ^2.1.8 path_provider: ^2.1.3 - archive: ^3.6.1 + archive: ^4.0.2 path: ^1.9.0 dev_dependencies: From 0dd8c1ee7d32920fa4000d27223ec201e97a849d Mon Sep 17 00:00:00 2001 From: Creeper19472 Date: Sun, 5 Oct 2025 23:54:56 +0800 Subject: [PATCH 4/9] merge (#1) * Update pubspec.yaml * add try ... catch statement * update gradle version * update package`archive` * fix await method --- src/serious_python/bin/package_command.dart | 2 +- src/serious_python/example/flask_example/android/build.gradle | 2 +- src/serious_python/pubspec.yaml | 2 +- src/serious_python_android/android/build.gradle | 2 +- src/serious_python_platform_interface/pubspec.yaml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/serious_python/bin/package_command.dart b/src/serious_python/bin/package_command.dart index f7596bb9..514e54ca 100644 --- a/src/serious_python/bin/package_command.dart +++ b/src/serious_python/bin/package_command.dart @@ -433,7 +433,7 @@ class PackageCommand extends Command { stdout.writeln( "Creating app archive at ${dest.path} from a temp directory"); final encoder = ZipFileEncoder(); - encoder.zipDirectory(tempDir, filename: dest.path); + await encoder.zipDirectory(tempDir, filename: dest.path); // create hash file stdout.writeln("Writing app archive hash to ${dest.path}.hash"); diff --git a/src/serious_python/example/flask_example/android/build.gradle b/src/serious_python/example/flask_example/android/build.gradle index f7eb7f63..2001ec6e 100644 --- a/src/serious_python/example/flask_example/android/build.gradle +++ b/src/serious_python/example/flask_example/android/build.gradle @@ -6,7 +6,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:7.3.0' + classpath 'com.android.tools.build:gradle:9.1.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } diff --git a/src/serious_python/pubspec.yaml b/src/serious_python/pubspec.yaml index 9995d29a..6bca1b11 100644 --- a/src/serious_python/pubspec.yaml +++ b/src/serious_python/pubspec.yaml @@ -44,7 +44,7 @@ dependencies: path: ../serious_python_linux path_provider: ^2.1.3 - archive: ^4.0.2 + archive: ^4.0.7 path: ^1.9.0 args: ^2.5.0 toml: ^0.15.0 diff --git a/src/serious_python_android/android/build.gradle b/src/serious_python_android/android/build.gradle index 14284eb5..eb04b712 100644 --- a/src/serious_python_android/android/build.gradle +++ b/src/serious_python_android/android/build.gradle @@ -11,7 +11,7 @@ buildscript { dependencies { // The Android Gradle Plugin knows how to build native code with the NDK. - classpath 'com.android.tools.build:gradle:7.3.0' + classpath 'com.android.tools.build:gradle:9.1.0' classpath 'de.undercouch:gradle-download-task:4.1.2' } } diff --git a/src/serious_python_platform_interface/pubspec.yaml b/src/serious_python_platform_interface/pubspec.yaml index c3b1c120..75449323 100644 --- a/src/serious_python_platform_interface/pubspec.yaml +++ b/src/serious_python_platform_interface/pubspec.yaml @@ -13,7 +13,7 @@ dependencies: sdk: flutter plugin_platform_interface: ^2.1.8 path_provider: ^2.1.3 - archive: ^4.0.2 + archive: ^4.0.7 path: ^1.9.0 dev_dependencies: From ffc6be7b2d4e620c715d07517b273966a0727306 Mon Sep 17 00:00:00 2001 From: Creeper19472 Date: Mon, 6 Oct 2025 10:20:34 +0800 Subject: [PATCH 5/9] Merge (#2) * Update pubspec.yaml * add try ... catch statement * update gradle version * update package`archive` * fix await method * fix distributionUrl --- .../android/gradle/wrapper/gradle-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/serious_python/example/run_example/android/gradle/wrapper/gradle-wrapper.properties b/src/serious_python/example/run_example/android/gradle/wrapper/gradle-wrapper.properties index a10c8212..6f13bc89 100644 --- a/src/serious_python/example/run_example/android/gradle/wrapper/gradle-wrapper.properties +++ b/src/serious_python/example/run_example/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip \ No newline at end of file +distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip \ No newline at end of file From a9f012d5e4b866eb8e298d818a04ed6e011aaf99 Mon Sep 17 00:00:00 2001 From: Creeper19472 Date: Mon, 6 Oct 2025 12:07:13 +0800 Subject: [PATCH 6/9] add gradle-wrapper.properties --- .../android/wrapper/gradle-wrapper.properties | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 src/serious_python_android/android/wrapper/gradle-wrapper.properties diff --git a/src/serious_python_android/android/wrapper/gradle-wrapper.properties b/src/serious_python_android/android/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000..6f13bc89 --- /dev/null +++ b/src/serious_python_android/android/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip \ No newline at end of file From a37a84d9e39e6f6c138643921cca379ffe835376 Mon Sep 17 00:00:00 2001 From: Creeper19472 Date: Mon, 6 Oct 2025 12:35:50 +0800 Subject: [PATCH 7/9] revert --- .../example/flask_example/android/build.gradle | 2 +- .../android/gradle/wrapper/gradle-wrapper.properties | 5 ----- src/serious_python_android/android/build.gradle | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) delete mode 100644 src/serious_python/example/run_example/android/gradle/wrapper/gradle-wrapper.properties diff --git a/src/serious_python/example/flask_example/android/build.gradle b/src/serious_python/example/flask_example/android/build.gradle index 2001ec6e..f7eb7f63 100644 --- a/src/serious_python/example/flask_example/android/build.gradle +++ b/src/serious_python/example/flask_example/android/build.gradle @@ -6,7 +6,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:9.1.0' + classpath 'com.android.tools.build:gradle:7.3.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } diff --git a/src/serious_python/example/run_example/android/gradle/wrapper/gradle-wrapper.properties b/src/serious_python/example/run_example/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 6f13bc89..00000000 --- a/src/serious_python/example/run_example/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,5 +0,0 @@ -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip \ No newline at end of file diff --git a/src/serious_python_android/android/build.gradle b/src/serious_python_android/android/build.gradle index eb04b712..14284eb5 100644 --- a/src/serious_python_android/android/build.gradle +++ b/src/serious_python_android/android/build.gradle @@ -11,7 +11,7 @@ buildscript { dependencies { // The Android Gradle Plugin knows how to build native code with the NDK. - classpath 'com.android.tools.build:gradle:9.1.0' + classpath 'com.android.tools.build:gradle:7.3.0' classpath 'de.undercouch:gradle-download-task:4.1.2' } } From b7ba40253cef9eafda9a859572786c66585505c5 Mon Sep 17 00:00:00 2001 From: Creeper19472 Date: Mon, 6 Oct 2025 12:45:22 +0800 Subject: [PATCH 8/9] fix utils.dart --- src/serious_python_platform_interface/lib/src/utils.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/serious_python_platform_interface/lib/src/utils.dart b/src/serious_python_platform_interface/lib/src/utils.dart index e364c4e3..a45e7f34 100644 --- a/src/serious_python_platform_interface/lib/src/utils.dart +++ b/src/serious_python_platform_interface/lib/src/utils.dart @@ -60,9 +60,9 @@ Future extractAssetOrFile(String path, archive = ZipDecoder().decodeBytes(data); } else { final inputStream = InputFileStream(path); - archive = ZipDecoder().decodeBuffer(inputStream); + archive = ZipDecoder().decodeStream(inputStream); } - await extractArchiveToDiskAsync(archive, destDir.path, asyncWrite: true); + await extractArchiveToDisk(archive, destDir.path); } catch (e) { debugPrint("Error unpacking archive: $e"); await destDir.delete(recursive: true); From 2a73426a8016b26c469e5fc77b3cb5824c401348 Mon Sep 17 00:00:00 2001 From: Creeper19472 Date: Mon, 6 Oct 2025 14:50:34 +0800 Subject: [PATCH 9/9] add changelog & update version numbers --- src/serious_python/CHANGELOG.md | 4 ++++ .../example/flask_example/pubspec.lock | 12 ++++++------ src/serious_python/example/flet_example/pubspec.lock | 12 ++++++------ .../example/run_example/macos/Podfile.lock | 2 +- src/serious_python/example/run_example/pubspec.lock | 12 ++++++------ src/serious_python/pubspec.yaml | 2 +- src/serious_python_android/android/build.gradle | 2 +- src/serious_python_android/pubspec.yaml | 2 +- .../darwin/serious_python_darwin.podspec | 2 +- src/serious_python_darwin/pubspec.yaml | 2 +- src/serious_python_linux/pubspec.yaml | 2 +- src/serious_python_platform_interface/pubspec.yaml | 2 +- src/serious_python_windows/pubspec.yaml | 2 +- 13 files changed, 31 insertions(+), 27 deletions(-) diff --git a/src/serious_python/CHANGELOG.md b/src/serious_python/CHANGELOG.md index c6a429d9..3aad09c5 100644 --- a/src/serious_python/CHANGELOG.md +++ b/src/serious_python/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.9.4 +* Fix: Updated compileSdkVersion to pass Android builds +* Fix: The version of the dependency `archive` was increased to `4.0.7` and code changes were made for migration. + ## 0.9.3 * Fix: Hidden files in site-packages are skipped when building macOS app. diff --git a/src/serious_python/example/flask_example/pubspec.lock b/src/serious_python/example/flask_example/pubspec.lock index 260ed69f..d904cbc1 100644 --- a/src/serious_python/example/flask_example/pubspec.lock +++ b/src/serious_python/example/flask_example/pubspec.lock @@ -281,42 +281,42 @@ packages: path: "../.." relative: true source: path - version: "0.9.3" + version: "0.9.4" serious_python_android: dependency: transitive description: path: "../../../serious_python_android" relative: true source: path - version: "0.9.3" + version: "0.9.4" serious_python_darwin: dependency: transitive description: path: "../../../serious_python_darwin" relative: true source: path - version: "0.9.3" + version: "0.9.4" serious_python_linux: dependency: transitive description: path: "../../../serious_python_linux" relative: true source: path - version: "0.9.3" + version: "0.9.4" serious_python_platform_interface: dependency: transitive description: path: "../../../serious_python_platform_interface" relative: true source: path - version: "0.9.3" + version: "0.9.4" serious_python_windows: dependency: transitive description: path: "../../../serious_python_windows" relative: true source: path - version: "0.9.3" + version: "0.9.4" shelf: dependency: transitive description: diff --git a/src/serious_python/example/flet_example/pubspec.lock b/src/serious_python/example/flet_example/pubspec.lock index 01e6f551..f00a80fd 100644 --- a/src/serious_python/example/flet_example/pubspec.lock +++ b/src/serious_python/example/flet_example/pubspec.lock @@ -554,42 +554,42 @@ packages: path: "../.." relative: true source: path - version: "0.9.3" + version: "0.9.4" serious_python_android: dependency: transitive description: path: "../../../serious_python_android" relative: true source: path - version: "0.9.3" + version: "0.9.4" serious_python_darwin: dependency: transitive description: path: "../../../serious_python_darwin" relative: true source: path - version: "0.9.3" + version: "0.9.4" serious_python_linux: dependency: transitive description: path: "../../../serious_python_linux" relative: true source: path - version: "0.9.3" + version: "0.9.4" serious_python_platform_interface: dependency: transitive description: path: "../../../serious_python_platform_interface" relative: true source: path - version: "0.9.3" + version: "0.9.4" serious_python_windows: dependency: transitive description: path: "../../../serious_python_windows" relative: true source: path - version: "0.9.3" + version: "0.9.4" shared_preferences: dependency: transitive description: diff --git a/src/serious_python/example/run_example/macos/Podfile.lock b/src/serious_python/example/run_example/macos/Podfile.lock index 6ee684c8..1c7561a2 100644 --- a/src/serious_python/example/run_example/macos/Podfile.lock +++ b/src/serious_python/example/run_example/macos/Podfile.lock @@ -3,7 +3,7 @@ PODS: - path_provider_foundation (0.0.1): - Flutter - FlutterMacOS - - serious_python_darwin (0.9.2): + - serious_python_darwin (0.9.4): - Flutter - FlutterMacOS diff --git a/src/serious_python/example/run_example/pubspec.lock b/src/serious_python/example/run_example/pubspec.lock index d614cac1..90710bb8 100644 --- a/src/serious_python/example/run_example/pubspec.lock +++ b/src/serious_python/example/run_example/pubspec.lock @@ -304,42 +304,42 @@ packages: path: "../.." relative: true source: path - version: "0.9.3" + version: "0.9.4" serious_python_android: dependency: transitive description: path: "../../../serious_python_android" relative: true source: path - version: "0.9.3" + version: "0.9.4" serious_python_darwin: dependency: transitive description: path: "../../../serious_python_darwin" relative: true source: path - version: "0.9.3" + version: "0.9.4" serious_python_linux: dependency: transitive description: path: "../../../serious_python_linux" relative: true source: path - version: "0.9.3" + version: "0.9.4" serious_python_platform_interface: dependency: transitive description: path: "../../../serious_python_platform_interface" relative: true source: path - version: "0.9.3" + version: "0.9.4" serious_python_windows: dependency: transitive description: path: "../../../serious_python_windows" relative: true source: path - version: "0.9.3" + version: "0.9.4" shelf: dependency: transitive description: diff --git a/src/serious_python/pubspec.yaml b/src/serious_python/pubspec.yaml index 6bca1b11..14e555c6 100644 --- a/src/serious_python/pubspec.yaml +++ b/src/serious_python/pubspec.yaml @@ -2,7 +2,7 @@ name: serious_python description: A cross-platform plugin for adding embedded Python runtime to your Flutter apps. homepage: https://flet.dev repository: https://github.com/flet-dev/serious-python -version: 0.9.3 +version: 0.9.4 platforms: ios: diff --git a/src/serious_python_android/android/build.gradle b/src/serious_python_android/android/build.gradle index 14284eb5..c72c2dd5 100644 --- a/src/serious_python_android/android/build.gradle +++ b/src/serious_python_android/android/build.gradle @@ -1,5 +1,5 @@ group 'com.flet.serious_python_android' -version '0.9.3' +version '0.9.4' def python_version = '3.12' diff --git a/src/serious_python_android/pubspec.yaml b/src/serious_python_android/pubspec.yaml index e668e498..90adfe9c 100644 --- a/src/serious_python_android/pubspec.yaml +++ b/src/serious_python_android/pubspec.yaml @@ -2,7 +2,7 @@ name: serious_python_android description: Android implementation of the serious_python plugin homepage: https://flet.dev repository: https://github.com/flet-dev/serious-python -version: 0.9.3 +version: 0.9.4 environment: sdk: ">=3.0.0 <4.0.0" diff --git a/src/serious_python_darwin/darwin/serious_python_darwin.podspec b/src/serious_python_darwin/darwin/serious_python_darwin.podspec index c73af73d..05f0de51 100644 --- a/src/serious_python_darwin/darwin/serious_python_darwin.podspec +++ b/src/serious_python_darwin/darwin/serious_python_darwin.podspec @@ -4,7 +4,7 @@ # Pod::Spec.new do |s| s.name = 'serious_python_darwin' - s.version = '0.9.3' + s.version = '0.9.4' s.summary = 'A cross-platform plugin for adding embedded Python runtime to your Flutter apps.' s.description = <<-DESC A cross-platform plugin for adding embedded Python runtime to your Flutter apps. diff --git a/src/serious_python_darwin/pubspec.yaml b/src/serious_python_darwin/pubspec.yaml index 1afc3908..655f04c3 100644 --- a/src/serious_python_darwin/pubspec.yaml +++ b/src/serious_python_darwin/pubspec.yaml @@ -2,7 +2,7 @@ name: serious_python_darwin description: iOS and macOS implementations of the serious_python plugin homepage: https://flet.dev repository: https://github.com/flet-dev/serious-python -version: 0.9.3 +version: 0.9.4 environment: sdk: ">=3.0.0 <4.0.0" diff --git a/src/serious_python_linux/pubspec.yaml b/src/serious_python_linux/pubspec.yaml index f26b2c20..b2b22e82 100644 --- a/src/serious_python_linux/pubspec.yaml +++ b/src/serious_python_linux/pubspec.yaml @@ -2,7 +2,7 @@ name: serious_python_linux description: Linux implementations of the serious_python plugin homepage: https://flet.dev repository: https://github.com/flet-dev/serious-python -version: 0.9.3 +version: 0.9.4 environment: sdk: '>=3.1.3 <4.0.0' diff --git a/src/serious_python_platform_interface/pubspec.yaml b/src/serious_python_platform_interface/pubspec.yaml index 75449323..d75fe903 100644 --- a/src/serious_python_platform_interface/pubspec.yaml +++ b/src/serious_python_platform_interface/pubspec.yaml @@ -2,7 +2,7 @@ name: serious_python_platform_interface description: A common platform interface for the serious_python plugin. homepage: https://flet.dev repository: https://github.com/flet-dev/serious-python -version: 0.9.3 +version: 0.9.4 environment: sdk: ">=3.0.0 <4.0.0" diff --git a/src/serious_python_windows/pubspec.yaml b/src/serious_python_windows/pubspec.yaml index 9042d100..823f9799 100644 --- a/src/serious_python_windows/pubspec.yaml +++ b/src/serious_python_windows/pubspec.yaml @@ -2,7 +2,7 @@ name: serious_python_windows description: Windows implementations of the serious_python plugin homepage: https://flet.dev repository: https://github.com/flet-dev/serious-python -version: 0.9.3 +version: 0.9.4 environment: sdk: '>=3.1.3 <4.0.0'