From 0345c06ce3f0c96581e50be882d421b1b9cfe7db Mon Sep 17 00:00:00 2001 From: woodwen Date: Tue, 30 May 2023 13:07:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E5=AE=89=E5=8D=93/ios?= =?UTF-8?q?=E4=BE=9D=E8=B5=96=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + android/build.gradle | 8 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- example/android/app/build.gradle | 13 +- .../android/app/src/main/AndroidManifest.xml | 2 + example/android/build.gradle | 10 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- example/ios/.gitignore | 34 +++ example/ios/Flutter/.last_build_id | 1 - example/ios/Flutter/AppFrameworkInfo.plist | 2 +- example/ios/Flutter/Debug.xcconfig | 2 +- example/ios/Flutter/Release.xcconfig | 2 +- example/ios/Podfile | 81 ++----- example/ios/Runner.xcodeproj/project.pbxproj | 219 +++++++++++------- .../contents.xcworkspacedata | 2 +- .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../xcshareddata/WorkspaceSettings.xcsettings | 8 + .../xcshareddata/xcschemes/Runner.xcscheme | 4 +- .../xcshareddata/WorkspaceSettings.xcsettings | 4 +- .../Icon-App-1024x1024@1x.png | Bin 11112 -> 10932 bytes .../AppIcon.appiconset/Icon-App-20x20@1x.png | Bin 564 -> 295 bytes .../AppIcon.appiconset/Icon-App-20x20@2x.png | Bin 1283 -> 406 bytes .../AppIcon.appiconset/Icon-App-20x20@3x.png | Bin 1588 -> 450 bytes .../AppIcon.appiconset/Icon-App-29x29@1x.png | Bin 1025 -> 282 bytes .../AppIcon.appiconset/Icon-App-29x29@2x.png | Bin 1716 -> 462 bytes .../AppIcon.appiconset/Icon-App-29x29@3x.png | Bin 1920 -> 704 bytes .../AppIcon.appiconset/Icon-App-40x40@1x.png | Bin 1283 -> 406 bytes .../AppIcon.appiconset/Icon-App-40x40@2x.png | Bin 1895 -> 586 bytes .../AppIcon.appiconset/Icon-App-40x40@3x.png | Bin 2665 -> 862 bytes .../AppIcon.appiconset/Icon-App-60x60@2x.png | Bin 2665 -> 862 bytes .../AppIcon.appiconset/Icon-App-60x60@3x.png | Bin 3831 -> 1674 bytes .../AppIcon.appiconset/Icon-App-76x76@1x.png | Bin 1888 -> 762 bytes .../AppIcon.appiconset/Icon-App-76x76@2x.png | Bin 3294 -> 1226 bytes .../Icon-App-83.5x83.5@2x.png | Bin 3612 -> 1418 bytes example/ios/Runner/Info.plist | 16 +- example/ios/Runner/Runner-Bridging-Header.h | 2 +- example/lib/dialog.dart | 194 ++++++++++++++++ example/lib/main.dart | 79 ++----- example/lib/style.dart | 30 +++ example/lib/utils.dart | 81 +++++++ example/pubspec.yaml | 25 +- ios/image_gallery_saver.podspec | 2 +- lib/image_gallery_saver.dart | 4 +- pubspec.yaml | 2 +- 44 files changed, 592 insertions(+), 248 deletions(-) create mode 100644 example/ios/.gitignore delete mode 100644 example/ios/Flutter/.last_build_id create mode 100644 example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings create mode 100644 example/lib/dialog.dart create mode 100644 example/lib/style.dart create mode 100644 example/lib/utils.dart diff --git a/.gitignore b/.gitignore index c42016c..b365c08 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ .packages .pub/ .idea/ +.fvm/ pubspec.lock diff --git a/android/build.gradle b/android/build.gradle index 9cceea9..4ef9cd2 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -2,14 +2,14 @@ group 'com.example.imagegallerysaver' version '1.0-SNAPSHOT' buildscript { - ext.kotlin_version = '1.6.10' + ext.kotlin_version = '1.7.10' repositories { google() - jcenter() + mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:7.1.2' + classpath 'com.android.tools.build:gradle:7.2.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } @@ -17,7 +17,7 @@ buildscript { rootProject.allprojects { repositories { google() - jcenter() + mavenCentral() } } diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index dde4b10..cf40b29 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index 52f5373..42e7cab 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -26,12 +26,18 @@ apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion 31 + compileSdkVersion flutter.compileSdkVersion + ndkVersion flutter.ndkVersion compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } + + kotlinOptions { + jvmTarget = '1.8' + } + sourceSets { main.java.srcDirs += 'src/main/kotlin' } @@ -41,10 +47,9 @@ android { } defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "com.example.imagegallerysaverexample" - minSdkVersion 16 - targetSdkVersion 29 + minSdkVersion flutter.minSdkVersion + targetSdkVersion flutter.targetSdkVersion versionCode flutterVersionCode.toInteger() versionName flutterVersionName testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml index e2041eb..392ce3b 100644 --- a/example/android/app/src/main/AndroidManifest.xml +++ b/example/android/app/src/main/AndroidManifest.xml @@ -7,6 +7,7 @@ --> +