From ad3a176ed13ca2a28135a0f3a7db4df877a74a4f Mon Sep 17 00:00:00 2001 From: brandenfung2 Date: Mon, 9 Dec 2024 14:16:57 -0800 Subject: [PATCH 1/5] Fix example --- example/android/app/build.gradle | 15 ++++++--------- example/android/build.gradle | 13 +------------ example/android/settings.gradle | 29 +++++++++++++++++++++-------- 3 files changed, 28 insertions(+), 29 deletions(-) diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index 072fd237..dd542e91 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -1,3 +1,8 @@ +plugins { + id "com.android.application" + id "dev.flutter.flutter-gradle-plugin" +} + def localProperties = new Properties() def localPropertiesFile = rootProject.file('local.properties') if (localPropertiesFile.exists()) { @@ -6,11 +11,6 @@ if (localPropertiesFile.exists()) { } } -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - def flutterVersionCode = localProperties.getProperty('flutter.versionCode') if (flutterVersionCode == null) { flutterVersionCode = '1' @@ -21,11 +21,8 @@ if (flutterVersionName == null) { flutterVersionName = '1.0' } -apply plugin: 'com.android.application' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - android { - compileSdkVersion 33 + compileSdkVersion 34 ndkVersion flutter.ndkVersion compileOptions { diff --git a/example/android/build.gradle b/example/android/build.gradle index e29a4431..bc157bd1 100644 --- a/example/android/build.gradle +++ b/example/android/build.gradle @@ -1,14 +1,3 @@ -buildscript { - repositories { - google() - mavenCentral() - } - - dependencies { - classpath 'com.android.tools.build:gradle:7.1.2' - } -} - allprojects { repositories { google() @@ -24,6 +13,6 @@ subprojects { project.evaluationDependsOn(':app') } -task clean(type: Delete) { +tasks.register("clean", Delete) { delete rootProject.buildDir } diff --git a/example/android/settings.gradle b/example/android/settings.gradle index 44e62bcf..a7f13a03 100644 --- a/example/android/settings.gradle +++ b/example/android/settings.gradle @@ -1,11 +1,24 @@ -include ':app' +pluginManagement { + def flutterSdkPath = { + def properties = new Properties() + file("local.properties").withInputStream { properties.load(it) } + def flutterSdkPath = properties.getProperty("flutter.sdk") + assert flutterSdkPath != null, "flutter.sdk not set in local.properties" + return flutterSdkPath + }() -def localPropertiesFile = new File(rootProject.projectDir, "local.properties") -def properties = new Properties() + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") -assert localPropertiesFile.exists() -localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} -def flutterSdkPath = properties.getProperty("flutter.sdk") -assert flutterSdkPath != null, "flutter.sdk not set in local.properties" -apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" +plugins { + id "dev.flutter.flutter-plugin-loader" version "1.0.0" + id "com.android.application" version "7.1.2" apply false +} + +include ":app" \ No newline at end of file From 8386b014a37a818888a8c060e9d0b1b925a4d3a5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 22:19:08 +0000 Subject: [PATCH 2/5] Updating package version --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index da64fe84..edcedcd6 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: pdftron_flutter description: A convenience wrapper to build Flutter apps that use the PDFTron mobile SDK for smooth, flexible, and stand-alone document viewing. -version: 1.0.1-37 +version: 1.0.1-38 homepage: https://www.apryse.com repository: https://github.com/ApryseSDK/pdftron-flutter issue_tracker: https://github.com/ApryseSDK/pdftron-flutter/issues From a44bca97bfee20ab697727e8c76be462f8606bfd Mon Sep 17 00:00:00 2001 From: brandenfung2 Date: Mon, 9 Dec 2024 14:27:06 -0800 Subject: [PATCH 3/5] Use latest permission handler in readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 25432f8e..2d7a4338 100644 --- a/README.md +++ b/README.md @@ -208,7 +208,7 @@ return Scaffold( 1. If you want to use local files on Android, add the following dependency to `myapp/pubspec.yaml`: ```yaml - permission_handler: ^8.1.1 + permission_handler: ^11.3.1 ``` 2. Open `lib/main.dart`, replace the entire file with the following: From 6e9f8ce3b2373adea6912980bbb71cdd5e6c292a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 22:28:11 +0000 Subject: [PATCH 4/5] Updating pubspec.yaml --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index edcedcd6..da64fe84 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: pdftron_flutter description: A convenience wrapper to build Flutter apps that use the PDFTron mobile SDK for smooth, flexible, and stand-alone document viewing. -version: 1.0.1-38 +version: 1.0.1-37 homepage: https://www.apryse.com repository: https://github.com/ApryseSDK/pdftron-flutter issue_tracker: https://github.com/ApryseSDK/pdftron-flutter/issues From 0579cf8c4a6decbfb9821b2809fc8d399f26ec02 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 22:28:35 +0000 Subject: [PATCH 5/5] Updating package version --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index da64fe84..edcedcd6 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: pdftron_flutter description: A convenience wrapper to build Flutter apps that use the PDFTron mobile SDK for smooth, flexible, and stand-alone document viewing. -version: 1.0.1-37 +version: 1.0.1-38 homepage: https://www.apryse.com repository: https://github.com/ApryseSDK/pdftron-flutter issue_tracker: https://github.com/ApryseSDK/pdftron-flutter/issues