diff --git a/.fvm/version b/.fvm/version index d9b2ac5..52525de 100644 --- a/.fvm/version +++ b/.fvm/version @@ -1 +1 @@ -3.22.3 \ No newline at end of file +3.24.1 \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index d195fcb..231eab3 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,8 +1,8 @@ --- name: Bug report about: Create a report to help us improve -title: "" -labels: "" +title: "[Bug]: " +labels: "bug" assignees: "" --- diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 506dcca..d9da576 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,8 +1,8 @@ --- name: Feature request about: Suggest an idea for this project -title: "" -labels: "" +title: "[Feature]: " +labels: "new feature" assignees: "" --- diff --git a/.github/workflows/checkout.yml b/.github/workflows/checkout.yml index 9d21626..098a68c 100644 --- a/.github/workflows/checkout.yml +++ b/.github/workflows/checkout.yml @@ -2,6 +2,7 @@ name: Checkout on: workflow_dispatch: + pull_request: push: branches: - "main" @@ -82,20 +83,6 @@ jobs: timeout-minutes: 1 run: dart analyze --fatal-infos --fatal-warnings lib/ - # - name: ๐Ÿ‘€ Verify versions - # id: verify-versions - # timeout-minutes: 1 - # run: | - # test -f pubspec.yaml && test -f lib/src/model/pubspec.yaml.g.dart - # version_pubspec=$(grep '^version:' pubspec.yaml | awk '{print $2}' | sed 's/[^[:print:]]//g') - # version_dart=$(grep 'representation: r' lib/src/model/pubspec.yaml.g.dart | awk -F"'" '{print $2}' | sed 's/[^[:print:]]//g') - # test -n "$version_pubspec" && test -n "$version_dart" - # echo "Version from pubspec.yaml: '$version_pubspec'" - # echo "Version from pubspec.yaml.g.dart: '$version_dart'" - # echo "$version_pubspec" > /tmp/version_pubspec - # echo "$version_dart" > /tmp/version_dart - # diff /tmp/version_pubspec /tmp/version_dart - - name: ๐Ÿงช Run tests id: run-tests timeout-minutes: 2 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..bf5193d --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,53 @@ +name: Deploy to Pub.dev + +on: + workflow_dispatch: + push: + tags: + - "[0-9]+.[0-9]+.[0-9]+*" + +jobs: + deploy: + name: "Deploy to Pub.dev" + permissions: + id-token: write # Required for authentication using OIDC + runs-on: ubuntu-latest + container: + image: plugfox/flutter:stable + options: --user root + steps: + # Checkout repository + - name: ๐Ÿš‚ Get latest code + uses: actions/checkout@v4 + + - name: ๐Ÿ—„๏ธ Export pub cache directory + run: | + git config --global --add safe.directory /opt/flutter + export PUB_CACHE=$PWD/.pub_cache/ + + - name: ๐Ÿšƒ Cache pub modules + id: cache-pub-modules + uses: actions/cache@v3 + env: + cache-name: cache-pub-modules + with: + key: ${{ runner.os }}-pub-${{ env.cache-name }} + path: | + $PWD/.pub_cache/ + $PWD/.dart_tool/ + $PWD/.flutter-plugins + $PWD/.flutter-plugins-dependencies + $PWD/.packages + + - name: ๐Ÿ‘ท Get dependencies + run: | + flutter pub get + timeout-minutes: 5 + + - name: ๐Ÿ—๏ธ Publish - dry run + run: flutter pub publish --dry-run + timeout-minutes: 5 + + - name: ๐Ÿ”ฅ Publish to pub.dev + run: yes | flutter pub publish -f --skip-validation + timeout-minutes: 5 \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json index 6a3a54b..9125865 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -2,14 +2,22 @@ "version": "0.2.0", "configurations": [ { - "name": "[debug] Run app (development)", + "name": "Run Example", "type": "dart", "request": "launch", "cwd": "${workspaceFolder}/example", "args": [ // "--dart-define-from-file=config/development.json", - // "--dart-define=octopus.logs=true", - // "--dart-define=octopus.measure=false" + ], + "env": {} + }, + { + "name": "Run Example Gradle 8", + "type": "dart", + "request": "launch", + "cwd": "${workspaceFolder}/example_gradle_8", + "args": [ + // "--dart-define-from-file=config/development.json", ], "env": {} }, @@ -27,7 +35,7 @@ "toolArgs": [ "--color", "--reporter=expanded", - "--file-reporter=json:.coverage/tests.json", + "--file-reporter=json:coverage/tests.json", "--timeout=30s", "--concurrency=12" /* "--name=handles failed connection attempts" */ diff --git a/.vscode/settings.json b/.vscode/settings.json index 34e676e..8911100 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -11,6 +11,7 @@ "editor.formatOnSave": true, "editor.formatOnType": true, "editor.formatOnPaste": true, + "editor.foldingImportsByDefault": true, "editor.codeActionsOnSave": { "source.fixAll": "explicit", "source.organizeImports": "explicit" @@ -36,7 +37,9 @@ "**.pb.dart", "**.pbenum.dart", "**.pbjson.dart", - "**/generated/**" + "**/generated/**", + "**.endpoint.dart", + "**_endpoint.dart" ], "dart.flutterSdkPath": ".fvm/versions/stable", "search.exclude": { @@ -55,11 +58,14 @@ "explorer.fileNesting.enabled": true, "explorer.fileNesting.expand": false, "explorer.fileNesting.patterns": { - "pubspec.yaml": ".flutter-plugins, .packages, .dart_tool, .flutter-plugins-dependencies, .metadata, .packages, pubspec.lock, build.yaml, analysis_options.yaml, all_lint_rules.yaml, dart*.yaml, flutter*.yaml, icons_launcher.yaml", + "pubspec.yaml": ".flutter-plugins, .packages, .dart_tool, .flutter-plugins-dependencies, .metadata, .packages, pubspec.lock, build.yaml, analysis_options.yaml, all_lint_rules.yaml, dart*.yaml, flutter*.yaml, icons_launcher.yaml, devtools_options.yaml, l10n.yaml", ".gitignore": ".gitattributes, .gitmodules, .gitmessage, .mailmap, .git-blame*", "readme*": "authors, backers.md, changelog*, citation*, code_of_conduct.md, codeowners, contributing.md, contributors, copying, credits, governance.md, history.md, license*, maintainers, readme*, security.md, sponsors.md", "*.dart": "$(capture).g.dart, $(capture).gr.dart, $(capture).freezed.dart, $(capture).config.dart, $(capture).mocks.dart, $(capture).router.dart, $(capture).locator.dart, $(capture)_skeleton.dart" }, + "files.associations": { + "*.drift": "sql" + }, "highlight.regexes": { "(\"@\\s*.+\":\\s{0,1}{},)": { "filterFileRegex": ".*\\.arb", diff --git a/.vscode/tasks.json b/.vscode/tasks.json index ebe6713..57b5aa6 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -2,7 +2,7 @@ "version": "2.0.0", "tasks": [ { - "label": "Dependencies", + "label": "dart:pub:get", "type": "shell", "command": [ "flutter pub get" @@ -14,10 +14,10 @@ "problemMatcher": [] }, { - "label": "Format", + "label": "dart:format", "type": "shell", "command": [ - "dart format --fix -l 120" + "dart format --fix -l 80" ], "group": { "kind": "none", @@ -26,22 +26,37 @@ "problemMatcher": [] }, { - "label": "Codegeneration", + "label": "dart:build_runner:dir", "type": "shell", - "dependsOn": [ - "Dependencies" + "command": [ + "dart run build_runner build --build-filter '${fileDirname}/*.dart'" ], + "group": { + "kind": "none", + "isDefault": true + }, + "problemMatcher": [], + "dependsOn": [ + "dart:pub:get" + ] + },{ + "label": "example:dart:build_runner:dir", + "type": "shell", "command": [ - "dart run build_runner build --delete-conflicting-outputs" + "dart run build_runner build --build-filter '${fileDirname}/*.dart'", + "&& dart format --fix -l 80 '${fileDirname}'" ], "group": { "kind": "none", "isDefault": true }, - "problemMatcher": [] + "problemMatcher": [], + "dependsOn": [ + "dart:pub:get" + ] }, { - "label": "Clear build", + "label": "clear:example:build", "type": "shell", "command": "make clear-client", "windows": { @@ -51,24 +66,19 @@ "-ExecutionPolicy", "Bypass", "-Command", - "Remove-Item -Path '${workspaceFolder}\\build' -Recurse -Force -ErrorAction Ignore" + "Remove-Item -Path '${workspaceFolder}\\example\\build' -Recurse -Force -ErrorAction Ignore" ] - /* "options": { - "shell": { - "executable": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe" - } - } */ }, "linux": { "command": "rm -rf", "args": [ - "${workspaceFolder}/build" + "${workspaceFolder}/example/build" ] }, "osx": { "command": "rm -rf", "args": [ - "${workspaceFolder}/build" + "${workspaceFolder}/example/build" ] }, "problemMatcher": [], @@ -80,6 +90,21 @@ "kind": "build", "isDefault": true } + }, + { + "label": "dart:build_runner:test_dir", + "type": "shell", + "command": [ + "dart run build_runner build --build-filter 'test/**'" + ], + "group": { + "kind": "none", + "isDefault": true + }, + "problemMatcher": [], + "dependsOn": [ + "dart:pub:get" + ] } ] } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index a26eadb..93c5188 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 1.8.0 +- **ADDED**: `namespace` to android build.gradle + + ## 1.7.1 - **REMOVED**: `pubspec_generator` - **ADDED**: `package_info_plus` diff --git a/Makefile b/Makefile index a72a8b6..a707ca4 100644 --- a/Makefile +++ b/Makefile @@ -1,15 +1,72 @@ -include tool/makefile/main.mk -include tool/makefile/pub.mk -include tool/makefile/setup.mk -include tool/makefile/test.mk - -# This help dialog -# https://gist.github.com/prwhite/8168133#gistcomment-1313022 .PHONY: help -help: - @echo "Let's make something good" - @make -s version - @echo "Available commands:" - @awk '/^#/ {comment = substr($$0, 3); next} /^[a-zA-Z_0-9-]+:/ {print $$1 " " comment; comment=""}' $(MAKEFILE_LIST) +help: ## Help dialog + @echo 'Usage: make ... ' + @echo '' + @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' + +.PHONY: doctor +doctor: ## Check fvm flutter doctor + @fvm flutter doctor + +.PHONY: version +version: ## Check fvm flutter version + @fvm flutter --version + + +.PHONY: format +format: ## Format code + @echo "โ•  RUN FORMAT THE CODE" + @fvm dart format --fix -l 80 . || (echo "๐Ÿ‘€ Format code error ๐Ÿ‘€"; exit 1) + @echo "โ•  CODE FORMATED SUCCESSFULLY" + +.PHONY: fix +fix: format ## Fix code + @fvm dart fix --apply lib + +.PHONY: clean-cache +clean-cache: ## Clean the pub cache + @echo "โ•  CLEAN PUB CACHE" + @fvm flutter pub cache repair + @echo "โ•  PUB CACHE CLEANED SUCCESSFULLY" + +.PHONY: get +get: ## Get dependencies + @echo "โ•  RUN GET DEPENDENCIES..." + @flutter pub get || (echo "โ–“โ–“ Get dependencies error โ–“โ–“"; exit 1) + @echo "โ•  DEPENDENCIES GETED SUCCESSFULLY" + +.PHONY: analyze +analyze: get format ## Analyze code + @echo "โ•  RUN ANALYZE THE CODE..." + @dart analyze --fatal-infos --fatal-warnings + @echo "โ•  ANALYZED CODE SUCCESSFULLY" + +.PHONY: check +check: analyze ## Check code + @echo "โ•  RUN CECK CODE..." + @dart pub publish --dry-run + @dart pub global activate pana + @pana --json --no-warning --line-length 80 > log.pana.json + @echo "โ•  CECKED CODE SUCCESSFULLY" + +.PHONY: publish +publish: ## Publish package + @echo "โ•  RUN PUBLISHING..." + @dart pub publish --server=https://pub.dartlang.org || (echo "โ–“โ–“ Publish error โ–“โ–“"; exit 1) + @echo "โ•  PUBLISH PACKAGE SUCCESSFULLY" + +.PHONY: coverage +coverage: ## Runs get coverage + @lcov --summary coverage/lcov.info + +.PHONY: genhtml +genhtml: ## Runs generage coverage html + @genhtml coverage/lcov.info -o coverage/html +.PHONY: test-unit +test-unit: ## Runs unit tests + @echo "โ•  RUNNING UNIT TESTS..." + @flutter test --coverage || (echo "Error while running tests"; exit 1) + @genhtml coverage/lcov.info --output=coverage -o coverage/html || (echo "Error while running tests"; exit 2) + @echo "โ•  UNIT TESTS SUCCESSFULLY" diff --git a/android/build.gradle b/android/build.gradle index 9c75822..2a0da9c 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,4 +1,4 @@ -group 'com.example.in_store_app_version_checker' +group 'flutter_in_store_app_version_checker' version '1.0-SNAPSHOT' buildscript { @@ -25,7 +25,8 @@ apply plugin: 'com.android.library' apply plugin: 'kotlin-android' android { - compileSdkVersion 33 + namespace 'flutter_in_store_app_version_checker' + compileSdkVersion 34 // flutter.compileSdkVersion compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml index f4cc5a9..8ae1364 100644 --- a/android/src/main/AndroidManifest.xml +++ b/android/src/main/AndroidManifest.xml @@ -1,3 +1,4 @@ - + \ No newline at end of file diff --git a/android/src/main/kotlin/com/example/in_store_app_version_checker/InStoreAppVersionCheckerPlugin.kt b/android/src/main/kotlin/flutter_in_store_app_version_checker/InStoreAppVersionCheckerPlugin.kt similarity index 93% rename from android/src/main/kotlin/com/example/in_store_app_version_checker/InStoreAppVersionCheckerPlugin.kt rename to android/src/main/kotlin/flutter_in_store_app_version_checker/InStoreAppVersionCheckerPlugin.kt index 1fff072..6412ca3 100644 --- a/android/src/main/kotlin/com/example/in_store_app_version_checker/InStoreAppVersionCheckerPlugin.kt +++ b/android/src/main/kotlin/flutter_in_store_app_version_checker/InStoreAppVersionCheckerPlugin.kt @@ -1,4 +1,4 @@ -package com.example.in_store_app_version_checker +package flutter_in_store_app_version_checker import androidx.annotation.NonNull @@ -17,7 +17,7 @@ class InStoreAppVersionCheckerPlugin: FlutterPlugin, MethodCallHandler { private lateinit var channel : MethodChannel override fun onAttachedToEngine(@NonNull flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) { - channel = MethodChannel(flutterPluginBinding.binaryMessenger, "in_store_app_version_checker") + channel = MethodChannel(flutterPluginBinding.binaryMessenger, "flutter_in_store_app_version_checker") channel.setMethodCallHandler(this) } diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index f892f69..8366728 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -1,33 +1,30 @@ +plugins { + id "com.android.application" + id "kotlin-android" + id "dev.flutter.flutter-gradle-plugin" +} + def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') +def localPropertiesFile = rootProject.file("local.properties") if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> + localPropertiesFile.withReader("UTF-8") { reader -> localProperties.load(reader) } } -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') +def flutterVersionCode = localProperties.getProperty("flutter.versionCode") if (flutterVersionCode == null) { - flutterVersionCode = '1' + flutterVersionCode = "1" } -def flutterVersionName = localProperties.getProperty('flutter.versionName') +def flutterVersionName = localProperties.getProperty("flutter.versionName") if (flutterVersionName == null) { - flutterVersionName = '1.0' + flutterVersionName = "1.0" } -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - android { - namespace 'com.example.flutter_in_store_app_version_checker' - compileSdkVersion flutter.compileSdkVersion + namespace 'flutter_in_store_app_version_checker.example' + compileSdkVersion 34 // flutter.compileSdkVersion compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 @@ -43,28 +40,15 @@ android { } defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.flutter_in_store_app_version_checker" + applicationId "flutter_in_store_app_version_checker.example" minSdkVersion flutter.minSdkVersion minSdkVersion flutter.minSdkVersion targetSdkVersion flutter.targetSdkVersion versionCode flutterVersionCode.toInteger() versionName flutterVersionName } - - buildTypes { - release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug - } - } } flutter { - source '../..' -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" -} + source "../.." +} \ No newline at end of file diff --git a/example/android/app/src/debug/AndroidManifest.xml b/example/android/app/src/debug/AndroidManifest.xml index 113ad8f..0ddfc86 100644 --- a/example/android/app/src/debug/AndroidManifest.xml +++ b/example/android/app/src/debug/AndroidManifest.xml @@ -1,5 +1,5 @@ + package="flutter_in_store_app_version_checker.example"> diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml index e6a0a13..9a97b2b 100644 --- a/example/android/app/src/main/AndroidManifest.xml +++ b/example/android/app/src/main/AndroidManifest.xml @@ -1,5 +1,5 @@ + package="flutter_in_store_app_version_checker.example"> diff --git a/example/android/app/src/main/kotlin/com/example/flutter_in_store_app_version_checker_example/MainActivity.kt b/example/android/app/src/main/kotlin/com/example/flutter_in_store_app_version_checker_example/MainActivity.kt index 055637a..13bb4f9 100644 --- a/example/android/app/src/main/kotlin/com/example/flutter_in_store_app_version_checker_example/MainActivity.kt +++ b/example/android/app/src/main/kotlin/com/example/flutter_in_store_app_version_checker_example/MainActivity.kt @@ -1,4 +1,4 @@ -package com.example.flutter_in_store_app_version_checker +package flutter_in_store_app_version_checker.example import io.flutter.embedding.android.FlutterActivity diff --git a/example/android/app/src/profile/AndroidManifest.xml b/example/android/app/src/profile/AndroidManifest.xml index 113ad8f..0ddfc86 100644 --- a/example/android/app/src/profile/AndroidManifest.xml +++ b/example/android/app/src/profile/AndroidManifest.xml @@ -1,5 +1,5 @@ + package="flutter_in_store_app_version_checker.example"> diff --git a/example/android/build.gradle b/example/android/build.gradle index 410a6bd..6ae585a 100644 --- a/example/android/build.gradle +++ b/example/android/build.gradle @@ -1,16 +1,33 @@ -buildscript { - ext.kotlin_version = '1.9.0' +// buildscript { +// ext.kotlin_version = '1.9.0' - repositories { - google() - mavenCentral() - } +// repositories { +// google() +// mavenCentral() +// } - dependencies { - classpath 'com.android.tools.build:gradle:7.2.0' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} +// dependencies { +// classpath 'com.android.tools.build:gradle:7.2.0' +// classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" +// } +// } + +// allprojects { +// repositories { +// google() +// mavenCentral() +// } +// } + +// rootProject.buildDir = '../build' +// subprojects { +// project.buildDir = "${rootProject.buildDir}/${project.name}" +// project.evaluationDependsOn(':app') +// } + +// tasks.register("clean", Delete) { +// delete rootProject.buildDir +// } allprojects { repositories { @@ -19,7 +36,7 @@ allprojects { } } -rootProject.buildDir = '../build' +rootProject.buildDir = "../build" subprojects { project.buildDir = "${rootProject.buildDir}/${project.name}" project.evaluationDependsOn(':app') @@ -27,4 +44,4 @@ subprojects { tasks.register("clean", Delete) { delete rootProject.buildDir -} +} \ No newline at end of file diff --git a/example/android/settings.gradle b/example/android/settings.gradle index 44e62bc..8142ac8 100644 --- a/example/android/settings.gradle +++ b/example/android/settings.gradle @@ -1,11 +1,29 @@ -include ':app' +pluginManagement { + def taskName = getGradle().getStartParameter().getTaskRequests().toString().toLowerCase() -def localPropertiesFile = new File(rootProject.projectDir, "local.properties") -def properties = new Properties() + 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 + } + settings.ext.flutterSdkPath = flutterSdkPath() -assert localPropertiesFile.exists() -localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } + includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle") + + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +plugins { + id "dev.flutter.flutter-plugin-loader" version "1.0.0" + id "com.android.application" version "7.3.0" apply false + id "org.jetbrains.kotlin.android" version "1.9.0" apply false +} + +include ":app" -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" diff --git a/example/ios/Flutter/AppFrameworkInfo.plist b/example/ios/Flutter/AppFrameworkInfo.plist index 8bcd266..06476db 100644 --- a/example/ios/Flutter/AppFrameworkInfo.plist +++ b/example/ios/Flutter/AppFrameworkInfo.plist @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 11.0 + 12.0 diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 1bf4d6b..53f8515 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -19,10 +19,10 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/package_info_plus/ios" SPEC CHECKSUMS: - Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 + Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 flutter_in_store_app_version_checker: 1cfb7a8fba7768a33009cee613919af4b1f8d041 - package_info_plus: 115f4ad11e0698c8c1c5d8a689390df880f47e85 + package_info_plus: 58f0028419748fad15bf008b270aaa8e54380b1c PODFILE CHECKSUM: f10c0438b63bc24e6bbc207956dc27d16c4408f2 -COCOAPODS: 1.14.3 +COCOAPODS: 1.15.2 diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj index db0bd1a..743c20f 100644 --- a/example/ios/Runner.xcodeproj/project.pbxproj +++ b/example/ios/Runner.xcodeproj/project.pbxproj @@ -156,7 +156,7 @@ 97C146E61CF9000F007C117D /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1430; + LastUpgradeCheck = 1510; ORGANIZATIONNAME = ""; TargetAttributes = { 97C146ED1CF9000F007C117D = { @@ -343,7 +343,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -420,7 +420,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -469,7 +469,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; diff --git a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index b52b2e6..e67b280 100644 --- a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ Anton Ustinoff - +import 'dart:async'; +import 'dart:developer' as d; import 'dart:io' as io; import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; import 'package:flutter_in_store_app_version_checker/flutter_in_store_app_version_checker.dart'; -void main() => runApp(const MyApp()); +typedef StoreIDPair = ({String googlePlayID, String appleStoreID}); + +//? Has in Pure Store and Google Play Store +const StoreIDPair kTikTokStoreIDPair = ( + googlePlayID: 'com.zhiliaoapp.musically', + appleStoreID: 'com.zhiliaoapp.musically', +); + +//? Has in Pure Store and Google Play Store +const StoreIDPair kRobloxStoreIDPair = ( + googlePlayID: 'com.roblox.client', + appleStoreID: 'com.roblox.client', +); + +//? Has in Pure Store and Google Play Store +const StoreIDPair kFreefirethStoreIDPair = ( + googlePlayID: 'com.dts.freefireth', + appleStoreID: 'com.dts.freefireth', +); + +//? Has in Pure Store and Google Play Store +const StoreIDPair kWildberriesStoreIDPair = ( + googlePlayID: 'com.wildberries.ru', + appleStoreID: 'com.wildberries.ru', +); + +//? Has in Pure Store and Google Play Store +const StoreIDPair kOzonStoreIDPair = ( + googlePlayID: 'ru.ozon.app.android', + appleStoreID: 'ru.ozon.app', +); + +const _verticalSpacing = SizedBox(height: 16.0); + +void main() => runZonedGuarded( + () => runApp(const App()), + (error, stackTrace) => d.log('Top level exception: $error\n$stackTrace'), + ); + +/// {@template app} +/// App widget. +/// {@endtemplate} +class App extends StatelessWidget { + /// {@macro app} + const App({super.key}); + + @override + Widget build(BuildContext context) => MaterialApp( + title: 'In Store App Version Checker Example', + theme: ThemeData.dark(), + home: const Example(), + ); +} -class MyApp extends StatefulWidget { - const MyApp({super.key}); +/// {@template example} +/// Example widget of using the `InStoreAppVersionChecker` plugin. +/// {@endtemplate} +class Example extends StatefulWidget { + /// {@macro example} + const Example({super.key}); @override - State createState() => _MyAppState(); + State createState() => _ExampleState(); } -class _MyAppState extends State { - late final InStoreAppVersionChecker _tikTokChecker; - late final InStoreAppVersionChecker _tetradkaChecker; +/// State of the [Example] widget. +class _ExampleState extends State { + late final InStoreAppVersionChecker _tiktokChecker; + late final InStoreAppVersionChecker _robloxChecker; + late final InStoreAppVersionChecker _freefirethChecker; + late final InStoreAppVersionChecker _wildberriesChecker; + late final InStoreAppVersionChecker _ozonChecker; - String? tikTokValue; - String? tetradkaValue; + InStoreAppVersionCheckerResult? _tiktok; + InStoreAppVersionCheckerResult? _roblox; + InStoreAppVersionCheckerResult? _freefireth; + InStoreAppVersionCheckerResult? _wildberries; + InStoreAppVersionCheckerResult? _ozon; @override void initState() { super.initState(); - _tetradkaChecker = InStoreAppVersionChecker( - appId: 'ru.beautybox.twa', + _tiktokChecker = InStoreAppVersionChecker( + appId: io.Platform.isAndroid + ? kTikTokStoreIDPair.googlePlayID + : kTikTokStoreIDPair.appleStoreID, ); - _tikTokChecker = InStoreAppVersionChecker( - appId: 'com.zhiliaoapp.musically', - androidStore: AndroidStore.apkPure, + _robloxChecker = InStoreAppVersionChecker( + appId: io.Platform.isAndroid + ? kRobloxStoreIDPair.googlePlayID + : kRobloxStoreIDPair.appleStoreID, + ); + _freefirethChecker = InStoreAppVersionChecker( + appId: io.Platform.isAndroid + ? kFreefirethStoreIDPair.googlePlayID + : kFreefirethStoreIDPair.appleStoreID, + ); + _wildberriesChecker = InStoreAppVersionChecker( + appId: io.Platform.isAndroid + ? kWildberriesStoreIDPair.googlePlayID + : kWildberriesStoreIDPair.appleStoreID, + ); + _ozonChecker = InStoreAppVersionChecker( + appId: io.Platform.isAndroid + ? kOzonStoreIDPair.googlePlayID + : kOzonStoreIDPair.appleStoreID, ); - _checkVersion(); } - void _checkVersion() async { - Future.wait([ - _tikTokChecker - .checkUpdate() - .then((value) => tikTokValue = value.toString()), - _tetradkaChecker - .checkUpdate() - .then((value) => tetradkaValue = value.toString()), - ]).then((_) => setState(() {})); + Future _checkVersion() async { + await Future.wait([ + _tiktokChecker.checkUpdate().then((result) => _tiktok = result), + _robloxChecker.checkUpdate().then((result) => _roblox = result), + _freefirethChecker.checkUpdate().then((result) => _freefireth = result), + _wildberriesChecker.checkUpdate().then((result) => _wildberries = result), + _ozonChecker.checkUpdate().then((result) => _ozon = result), + ]); } @override Widget build(BuildContext context) { - return CupertinoApp( - debugShowCheckedModeBanner: false, - home: CupertinoPageScaffold( - navigationBar: const CupertinoNavigationBar( - middle: Text('In Store App Version Checker Example'), + return Scaffold( + appBar: AppBar( + forceMaterialTransparency: false, + centerTitle: true, + title: const Text( + 'In Store App Version Checker Example', + style: TextStyle( + fontSize: 17, + fontWeight: FontWeight.w600, + ), ), + actions: [ + IconButton( + iconSize: 20, + padding: EdgeInsets.zero, + onPressed: _checkVersion, + icon: const Icon(CupertinoIcons.refresh), + ) + ], + ), + body: SafeArea( child: Padding( padding: const EdgeInsets.all(16.0), - child: ListView( - children: [ - if (io.Platform.isAndroid) ...[ - const Text( - "Tetradka (beauty box)", - style: TextStyle(fontWeight: FontWeight.w600), - ), - const SizedBox(height: 10.0), - Text(tetradkaValue ?? 'Loading...'), - ] else ...[ - const Text( - "TikTok: (apkPure)", - style: TextStyle(fontWeight: FontWeight.w600), + child: FutureBuilder( + future: _checkVersion(), + builder: (context, snapshot) { + if (snapshot.connectionState == ConnectionState.waiting) { + return const Center( + child: CircularProgressIndicator.adaptive(), + ); + } + if (snapshot.hasError) { + return Center( + child: Text( + 'Error: ${snapshot.error}', + style: const TextStyle(color: Colors.red), + ), + ); + } + + return SingleChildScrollView( + child: Column( + children: [ + if (_tiktok != null) ...[ + _AppSection(title: "Tik Tok", item: _tiktok!), + _verticalSpacing, + ], + if (_roblox != null) ...[ + _AppSection(title: "Roblox", item: _roblox!), + _verticalSpacing, + ], + if (_freefireth != null) ...[ + _AppSection(title: "Freefeireth", item: _freefireth!), + _verticalSpacing, + ], + if (_wildberries != null) ...[ + _AppSection(title: "Willberies", item: _wildberries!), + _verticalSpacing, + ], + if (_ozon != null) ...[ + _AppSection(title: "Ozon", item: _ozon!), + _verticalSpacing, + ], + ], ), - const SizedBox(height: 10.0), - Text(tikTokValue ?? 'Loading...'), - ], - ], + ); + }, ), ), ), ); } } + +/// {@template main} +/// _AppSection widget. +/// {@endtemplate} +class _AppSection extends StatelessWidget { + /// {@macro main} + const _AppSection({ + required this.title, + required this.item, + super.key, // ignore: unused_element + }); + + final String title; + final InStoreAppVersionCheckerResult item; + + @override + Widget build(BuildContext context) => SizedBox( + width: double.infinity, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + title, + style: const TextStyle(fontWeight: FontWeight.w600, fontSize: 17), + ), + const SizedBox(height: 5.0), + Text( + item.toString(), + style: const TextStyle( + fontWeight: FontWeight.normal, + fontSize: 14, + ), + ), + ], + ), + ); +} diff --git a/example/pubspec.lock b/example/pubspec.lock index 11a018e..1090bd1 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -37,10 +37,10 @@ packages: dependency: transitive description: name: collection - sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf url: "https://pub.dev" source: hosted - version: "1.18.0" + version: "1.19.0" cupertino_icons: dependency: "direct main" description: @@ -76,7 +76,7 @@ packages: path: ".." relative: true source: path - version: "1.7.1" + version: "1.8.0" flutter_lints: dependency: "direct dev" description: @@ -115,18 +115,18 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06" url: "https://pub.dev" source: hosted - version: "10.0.4" + version: "10.0.7" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379" url: "https://pub.dev" source: hosted - version: "3.0.3" + version: "3.0.8" leak_tracker_testing: dependency: transitive description: @@ -155,34 +155,34 @@ packages: dependency: transitive description: name: material_color_utilities - sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec url: "https://pub.dev" source: hosted - version: "0.8.0" + version: "0.11.1" meta: dependency: transitive description: name: meta - sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 url: "https://pub.dev" source: hosted - version: "1.12.0" + version: "1.15.0" package_info_plus: dependency: transitive description: name: package_info_plus - sha256: b93d8b4d624b4ea19b0a5a208b2d6eff06004bc3ce74c06040b120eeadd00ce0 + sha256: a75164ade98cb7d24cfd0a13c6408927c6b217fa60dee5a7ff5c116a58f28918 url: "https://pub.dev" source: hosted - version: "8.0.0" + version: "8.0.2" package_info_plus_platform_interface: dependency: transitive description: name: package_info_plus_platform_interface - sha256: f49918f3433a3146047372f9d4f1f847511f2acd5cd030e1f44fe5a50036b70e + sha256: ac1f4a4847f1ade8e6a87d1f39f5d7c67490738642e2542f559ec38c37489a66 url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "3.0.1" path: dependency: transitive description: @@ -203,7 +203,7 @@ packages: dependency: transitive description: flutter source: sdk - version: "0.0.99" + version: "0.0.0" source_span: dependency: transitive description: @@ -232,10 +232,10 @@ packages: dependency: transitive description: name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.3.0" term_glyph: dependency: transitive description: @@ -248,10 +248,10 @@ packages: dependency: transitive description: name: test_api - sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" + sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c" url: "https://pub.dev" source: hosted - version: "0.7.0" + version: "0.7.3" typed_data: dependency: transitive description: @@ -272,10 +272,10 @@ packages: dependency: transitive description: name: vm_service - sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" + sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" url: "https://pub.dev" source: hosted - version: "14.2.1" + version: "14.2.5" web: dependency: transitive description: diff --git a/example/test/widget_test.dart b/example/test/widget_test.dart index f305023..d9230fe 100644 --- a/example/test/widget_test.dart +++ b/example/test/widget_test.dart @@ -1,3 +1,5 @@ +// ignore_for_file: avoid_relative_lib_imports + // This is a basic Flutter widget test. // // To perform an interaction with a widget in your test, use the WidgetTester @@ -5,23 +7,13 @@ // gestures. You can also use WidgetTester to find child widgets in the widget // tree, read text, and verify that the values of widget properties are correct. -import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:flutter_in_store_app_version_checker_example/main.dart'; +import '../lib/main.dart'; void main() { - testWidgets('Verify Platform version', (WidgetTester tester) async { - // Build our app and trigger a frame. - await tester.pumpWidget(const MyApp()); - - // Verify that platform version is retrieved. - expect( - find.byWidgetPredicate( - (Widget widget) => - widget is Text && widget.data!.startsWith('Running on:'), - ), - findsOneWidget, - ); + testWidgets('Check MyApp', (WidgetTester tester) async { + await tester.pumpWidget(const App()); + expect(find.byWidget(const App()), findsOneWidget); }); } diff --git a/example_gradle_8/.gitignore b/example_gradle_8/.gitignore new file mode 100644 index 0000000..29a3a50 --- /dev/null +++ b/example_gradle_8/.gitignore @@ -0,0 +1,43 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.pub-cache/ +.pub/ +/build/ + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release diff --git a/example_gradle_8/.metadata b/example_gradle_8/.metadata new file mode 100644 index 0000000..90eabcf --- /dev/null +++ b/example_gradle_8/.metadata @@ -0,0 +1,45 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819" + channel: "stable" + +project_type: app + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819 + base_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819 + - platform: android + create_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819 + base_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819 + - platform: ios + create_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819 + base_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819 + - platform: linux + create_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819 + base_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819 + - platform: macos + create_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819 + base_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819 + - platform: web + create_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819 + base_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819 + - platform: windows + create_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819 + base_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819 + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/example_gradle_8/.vscode/settings.json b/example_gradle_8/.vscode/settings.json new file mode 100644 index 0000000..7826284 --- /dev/null +++ b/example_gradle_8/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "dart.flutterSdkPath": "/Users/ziqq/Desktop/git/ziqq/flutter_in_store_app_version_checker/.fvm/versions/stable" +} \ No newline at end of file diff --git a/example_gradle_8/README.md b/example_gradle_8/README.md new file mode 100644 index 0000000..39b956e --- /dev/null +++ b/example_gradle_8/README.md @@ -0,0 +1,3 @@ +# example_gradle_8 + +A new Flutter project. diff --git a/example_gradle_8/analysis_options.yaml b/example_gradle_8/analysis_options.yaml new file mode 100644 index 0000000..f9b3034 --- /dev/null +++ b/example_gradle_8/analysis_options.yaml @@ -0,0 +1 @@ +include: package:flutter_lints/flutter.yaml diff --git a/example_gradle_8/android/.gitignore b/example_gradle_8/android/.gitignore new file mode 100644 index 0000000..55afd91 --- /dev/null +++ b/example_gradle_8/android/.gitignore @@ -0,0 +1,13 @@ +gradle-wrapper.jar +/.gradle +/captures/ +/gradlew +/gradlew.bat +/local.properties +GeneratedPluginRegistrant.java + +# Remember to never publicly share your keystore. +# See https://flutter.dev/to/reference-keystore +key.properties +**/*.keystore +**/*.jks diff --git a/example_gradle_8/android/app/build.gradle b/example_gradle_8/android/app/build.gradle new file mode 100644 index 0000000..97878cc --- /dev/null +++ b/example_gradle_8/android/app/build.gradle @@ -0,0 +1,44 @@ +plugins { + id "com.android.application" + id "kotlin-android" + // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. + id "dev.flutter.flutter-gradle-plugin" +} + +android { + namespace = "com.example.example_gradle_8" + compileSdk = flutter.compileSdkVersion + ndkVersion = flutter.ndkVersion + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_1_8 + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId = "com.example.example_gradle_8" + // You can update the following values to match your application needs. + // For more information, see: https://flutter.dev/to/review-gradle-config. + minSdk = flutter.minSdkVersion + targetSdk = flutter.targetSdkVersion + versionCode = flutter.versionCode + versionName = flutter.versionName + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig = signingConfigs.debug + } + } +} + +flutter { + source = "../.." +} diff --git a/example_gradle_8/android/app/src/debug/AndroidManifest.xml b/example_gradle_8/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 0000000..399f698 --- /dev/null +++ b/example_gradle_8/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/example_gradle_8/android/app/src/main/AndroidManifest.xml b/example_gradle_8/android/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..b201d16 --- /dev/null +++ b/example_gradle_8/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/example_gradle_8/android/app/src/main/kotlin/com/example/example_gradle_8/MainActivity.kt b/example_gradle_8/android/app/src/main/kotlin/com/example/example_gradle_8/MainActivity.kt new file mode 100644 index 0000000..2df35e0 --- /dev/null +++ b/example_gradle_8/android/app/src/main/kotlin/com/example/example_gradle_8/MainActivity.kt @@ -0,0 +1,5 @@ +package com.example.example_gradle_8 + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() diff --git a/example_gradle_8/android/app/src/main/res/drawable-v21/launch_background.xml b/example_gradle_8/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 0000000..f74085f --- /dev/null +++ b/example_gradle_8/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/example_gradle_8/android/app/src/main/res/drawable/launch_background.xml b/example_gradle_8/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 0000000..304732f --- /dev/null +++ b/example_gradle_8/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/example_gradle_8/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/example_gradle_8/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000..db77bb4 Binary files /dev/null and b/example_gradle_8/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/example_gradle_8/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/example_gradle_8/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000..17987b7 Binary files /dev/null and b/example_gradle_8/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/example_gradle_8/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/example_gradle_8/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000..09d4391 Binary files /dev/null and b/example_gradle_8/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/example_gradle_8/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/example_gradle_8/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..d5f1c8d Binary files /dev/null and b/example_gradle_8/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/example_gradle_8/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/example_gradle_8/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000..4d6372e Binary files /dev/null and b/example_gradle_8/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/example_gradle_8/android/app/src/main/res/values-night/styles.xml b/example_gradle_8/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 0000000..06952be --- /dev/null +++ b/example_gradle_8/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/example_gradle_8/android/app/src/main/res/values/styles.xml b/example_gradle_8/android/app/src/main/res/values/styles.xml new file mode 100644 index 0000000..cb1ef88 --- /dev/null +++ b/example_gradle_8/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/example_gradle_8/android/app/src/profile/AndroidManifest.xml b/example_gradle_8/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 0000000..399f698 --- /dev/null +++ b/example_gradle_8/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/example_gradle_8/android/build.gradle b/example_gradle_8/android/build.gradle new file mode 100644 index 0000000..d2ffbff --- /dev/null +++ b/example_gradle_8/android/build.gradle @@ -0,0 +1,18 @@ +allprojects { + repositories { + google() + mavenCentral() + } +} + +rootProject.buildDir = "../build" +subprojects { + project.buildDir = "${rootProject.buildDir}/${project.name}" +} +subprojects { + project.evaluationDependsOn(":app") +} + +tasks.register("clean", Delete) { + delete rootProject.buildDir +} diff --git a/example_gradle_8/android/gradle.properties b/example_gradle_8/android/gradle.properties new file mode 100644 index 0000000..2597170 --- /dev/null +++ b/example_gradle_8/android/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError +android.useAndroidX=true +android.enableJetifier=true diff --git a/example_gradle_8/android/gradle/wrapper/gradle-wrapper.properties b/example_gradle_8/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..b0c51f6 --- /dev/null +++ b/example_gradle_8/android/gradle/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-8.10.1-all.zip diff --git a/example_gradle_8/android/settings.gradle b/example_gradle_8/android/settings.gradle new file mode 100644 index 0000000..f75a38f --- /dev/null +++ b/example_gradle_8/android/settings.gradle @@ -0,0 +1,25 @@ +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 + }() + + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") + + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +plugins { + id "dev.flutter.flutter-plugin-loader" version "1.0.0" + id "com.android.application" version "7.3.0" apply false + id "org.jetbrains.kotlin.android" version "1.9.0" apply false +} + +include ":app" diff --git a/example_gradle_8/ios/.gitignore b/example_gradle_8/ios/.gitignore new file mode 100644 index 0000000..7a7f987 --- /dev/null +++ b/example_gradle_8/ios/.gitignore @@ -0,0 +1,34 @@ +**/dgph +*.mode1v3 +*.mode2v3 +*.moved-aside +*.pbxuser +*.perspectivev3 +**/*sync/ +.sconsign.dblite +.tags* +**/.vagrant/ +**/DerivedData/ +Icon? +**/Pods/ +**/.symlinks/ +profile +xcuserdata +**/.generated/ +Flutter/App.framework +Flutter/Flutter.framework +Flutter/Flutter.podspec +Flutter/Generated.xcconfig +Flutter/ephemeral/ +Flutter/app.flx +Flutter/app.zip +Flutter/flutter_assets/ +Flutter/flutter_export_environment.sh +ServiceDefinitions.json +Runner/GeneratedPluginRegistrant.* + +# Exceptions to above rules. +!default.mode1v3 +!default.mode2v3 +!default.pbxuser +!default.perspectivev3 diff --git a/example_gradle_8/ios/Flutter/AppFrameworkInfo.plist b/example_gradle_8/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 0000000..7c56964 --- /dev/null +++ b/example_gradle_8/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 12.0 + + diff --git a/example_gradle_8/ios/Flutter/Debug.xcconfig b/example_gradle_8/ios/Flutter/Debug.xcconfig new file mode 100644 index 0000000..ec97fc6 --- /dev/null +++ b/example_gradle_8/ios/Flutter/Debug.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" +#include "Generated.xcconfig" diff --git a/example_gradle_8/ios/Flutter/Release.xcconfig b/example_gradle_8/ios/Flutter/Release.xcconfig new file mode 100644 index 0000000..c4855bf --- /dev/null +++ b/example_gradle_8/ios/Flutter/Release.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" +#include "Generated.xcconfig" diff --git a/example_gradle_8/ios/Podfile b/example_gradle_8/ios/Podfile new file mode 100644 index 0000000..d97f17e --- /dev/null +++ b/example_gradle_8/ios/Podfile @@ -0,0 +1,44 @@ +# Uncomment this line to define a global platform for your project +# platform :ios, '12.0' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_ios_podfile_setup + +target 'Runner' do + use_frameworks! + use_modular_headers! + + flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) + target 'RunnerTests' do + inherit! :search_paths + end +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_ios_build_settings(target) + end +end diff --git a/example_gradle_8/ios/Podfile.lock b/example_gradle_8/ios/Podfile.lock new file mode 100644 index 0000000..9769226 --- /dev/null +++ b/example_gradle_8/ios/Podfile.lock @@ -0,0 +1,28 @@ +PODS: + - Flutter (1.0.0) + - flutter_in_store_app_version_checker (1.4.0): + - Flutter + - package_info_plus (0.4.5): + - Flutter + +DEPENDENCIES: + - Flutter (from `Flutter`) + - flutter_in_store_app_version_checker (from `.symlinks/plugins/flutter_in_store_app_version_checker/ios`) + - package_info_plus (from `.symlinks/plugins/package_info_plus/ios`) + +EXTERNAL SOURCES: + Flutter: + :path: Flutter + flutter_in_store_app_version_checker: + :path: ".symlinks/plugins/flutter_in_store_app_version_checker/ios" + package_info_plus: + :path: ".symlinks/plugins/package_info_plus/ios" + +SPEC CHECKSUMS: + Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 + flutter_in_store_app_version_checker: 1cfb7a8fba7768a33009cee613919af4b1f8d041 + package_info_plus: 58f0028419748fad15bf008b270aaa8e54380b1c + +PODFILE CHECKSUM: 819463e6a0290f5a72f145ba7cde16e8b6ef0796 + +COCOAPODS: 1.15.2 diff --git a/example_gradle_8/ios/Runner.xcodeproj/project.pbxproj b/example_gradle_8/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 0000000..ea331b7 --- /dev/null +++ b/example_gradle_8/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,731 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXBuildFile section */ + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; + A305395D4E23D40668362F66 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B1C911B9FF7B565BA2EC7403 /* Pods_RunnerTests.framework */; }; + EB13A523F0ABFC8382B10801 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 47CE0E76CCCDDE4928614B19 /* Pods_Runner.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 97C146E61CF9000F007C117D /* Project object */; + proxyType = 1; + remoteGlobalIDString = 97C146ED1CF9000F007C117D; + remoteInfo = Runner; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9705A1C41CF9048500538489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 2ECBBAEF64C0A898BA54A0D9 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; }; + 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; + 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 47CE0E76CCCDDE4928614B19 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 5B91FFA1C73735A9BC7FD7BA /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 7B8F974A80D7B32CF1AE981B /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + B1C911B9FF7B565BA2EC7403 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + DC0F1C25E869DD559C570E8C /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; + F66B4095965609B1494868A2 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = ""; }; + FB2178B2D851A7BBDA8CF2F9 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 34FA9F29BADFEC478BEA634A /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + A305395D4E23D40668362F66 /* Pods_RunnerTests.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + EB13A523F0ABFC8382B10801 /* Pods_Runner.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 331C8082294A63A400263BE5 /* RunnerTests */ = { + isa = PBXGroup; + children = ( + 331C807B294A618700263BE5 /* RunnerTests.swift */, + ); + path = RunnerTests; + sourceTree = ""; + }; + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + 331C8082294A63A400263BE5 /* RunnerTests */, + FBD48AF678666CF5D226D33A /* Pods */, + EFAB9DEB0F3B1AD33FEBDCD2 /* Frameworks */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + 331C8081294A63A400263BE5 /* RunnerTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, + ); + path = Runner; + sourceTree = ""; + }; + EFAB9DEB0F3B1AD33FEBDCD2 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 47CE0E76CCCDDE4928614B19 /* Pods_Runner.framework */, + B1C911B9FF7B565BA2EC7403 /* Pods_RunnerTests.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + FBD48AF678666CF5D226D33A /* Pods */ = { + isa = PBXGroup; + children = ( + DC0F1C25E869DD559C570E8C /* Pods-Runner.debug.xcconfig */, + FB2178B2D851A7BBDA8CF2F9 /* Pods-Runner.release.xcconfig */, + 5B91FFA1C73735A9BC7FD7BA /* Pods-Runner.profile.xcconfig */, + 2ECBBAEF64C0A898BA54A0D9 /* Pods-RunnerTests.debug.xcconfig */, + 7B8F974A80D7B32CF1AE981B /* Pods-RunnerTests.release.xcconfig */, + F66B4095965609B1494868A2 /* Pods-RunnerTests.profile.xcconfig */, + ); + name = Pods; + path = Pods; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 331C8080294A63A400263BE5 /* RunnerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; + buildPhases = ( + 7690A6D96606653C9AF79F08 /* [CP] Check Pods Manifest.lock */, + 331C807D294A63A400263BE5 /* Sources */, + 331C807F294A63A400263BE5 /* Resources */, + 34FA9F29BADFEC478BEA634A /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 331C8086294A63A400263BE5 /* PBXTargetDependency */, + ); + name = RunnerTests; + productName = RunnerTests; + productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 732FF3909EF984ABD0C52096 /* [CP] Check Pods Manifest.lock */, + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + 05393B5077878495313547D2 /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = YES; + LastUpgradeCheck = 1510; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 331C8080294A63A400263BE5 = { + CreatedOnToolsVersion = 14.0; + TestTargetID = 97C146ED1CF9000F007C117D; + }; + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 1100; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + 331C8080294A63A400263BE5 /* RunnerTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 331C807F294A63A400263BE5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EC1CF9000F007C117D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 05393B5077878495313547D2 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + }; + 732FF3909EF984ABD0C52096 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 7690A6D96606653C9AF79F08 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 331C807D294A63A400263BE5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 331C8086294A63A400263BE5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 97C146ED1CF9000F007C117D /* Runner */; + targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 249021D3217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 249021D4217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = 8JN62S84RT; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.exampleGradle8; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; + 331C8088294A63A400263BE5 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 2ECBBAEF64C0A898BA54A0D9 /* Pods-RunnerTests.debug.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.exampleGradle8.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Debug; + }; + 331C8089294A63A400263BE5 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7B8F974A80D7B32CF1AE981B /* Pods-RunnerTests.release.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.exampleGradle8.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Release; + }; + 331C808A294A63A400263BE5 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = F66B4095965609B1494868A2 /* Pods-RunnerTests.profile.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.exampleGradle8.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Profile; + }; + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = 8JN62S84RT; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.exampleGradle8; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = 8JN62S84RT; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.exampleGradle8; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 331C8088294A63A400263BE5 /* Debug */, + 331C8089294A63A400263BE5 /* Release */, + 331C808A294A63A400263BE5 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147031CF9000F007C117D /* Debug */, + 97C147041CF9000F007C117D /* Release */, + 249021D3217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + 249021D4217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} diff --git a/example_gradle_8/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/example_gradle_8/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/example_gradle_8/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/example_gradle_8/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/example_gradle_8/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/example_gradle_8/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/example_gradle_8/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/example_gradle_8/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..f9b0d7c --- /dev/null +++ b/example_gradle_8/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/example_gradle_8/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/example_gradle_8/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 0000000..8e3ca5d --- /dev/null +++ b/example_gradle_8/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example_gradle_8/ios/Runner.xcworkspace/contents.xcworkspacedata b/example_gradle_8/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..21a3cc1 --- /dev/null +++ b/example_gradle_8/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/example_gradle_8/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/example_gradle_8/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/example_gradle_8/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/example_gradle_8/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/example_gradle_8/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..f9b0d7c --- /dev/null +++ b/example_gradle_8/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/example_gradle_8/ios/Runner/AppDelegate.swift b/example_gradle_8/ios/Runner/AppDelegate.swift new file mode 100644 index 0000000..6266644 --- /dev/null +++ b/example_gradle_8/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import Flutter +import UIKit + +@main +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} diff --git a/example_gradle_8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/example_gradle_8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..d36b1fa --- /dev/null +++ b/example_gradle_8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "images" : [ + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@3x.png", + "scale" : "3x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@1x.png", + "scale" : "1x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@1x.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@1x.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "Icon-App-83.5x83.5@2x.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "Icon-App-1024x1024@1x.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/example_gradle_8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/example_gradle_8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 0000000..dc9ada4 Binary files /dev/null and b/example_gradle_8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/example_gradle_8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/example_gradle_8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 0000000..7353c41 Binary files /dev/null and b/example_gradle_8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/example_gradle_8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/example_gradle_8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 0000000..797d452 Binary files /dev/null and b/example_gradle_8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/example_gradle_8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/example_gradle_8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 0000000..6ed2d93 Binary files /dev/null and b/example_gradle_8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/example_gradle_8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/example_gradle_8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 0000000..4cd7b00 Binary files /dev/null and b/example_gradle_8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/example_gradle_8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/example_gradle_8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 0000000..fe73094 Binary files /dev/null and b/example_gradle_8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/example_gradle_8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/example_gradle_8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 0000000..321773c Binary files /dev/null and b/example_gradle_8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/example_gradle_8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/example_gradle_8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 0000000..797d452 Binary files /dev/null and b/example_gradle_8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/example_gradle_8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/example_gradle_8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 0000000..502f463 Binary files /dev/null and b/example_gradle_8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/example_gradle_8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/example_gradle_8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 0000000..0ec3034 Binary files /dev/null and b/example_gradle_8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/example_gradle_8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/example_gradle_8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 0000000..0ec3034 Binary files /dev/null and b/example_gradle_8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/example_gradle_8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/example_gradle_8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 0000000..e9f5fea Binary files /dev/null and b/example_gradle_8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/example_gradle_8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/example_gradle_8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 0000000..84ac32a Binary files /dev/null and b/example_gradle_8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/example_gradle_8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/example_gradle_8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 0000000..8953cba Binary files /dev/null and b/example_gradle_8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/example_gradle_8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/example_gradle_8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 0000000..0467bf1 Binary files /dev/null and b/example_gradle_8/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/example_gradle_8/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/example_gradle_8/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 0000000..0bedcf2 --- /dev/null +++ b/example_gradle_8/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchImage.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/example_gradle_8/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/example_gradle_8/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 0000000..9da19ea Binary files /dev/null and b/example_gradle_8/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/example_gradle_8/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/example_gradle_8/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 0000000..9da19ea Binary files /dev/null and b/example_gradle_8/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/example_gradle_8/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/example_gradle_8/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 0000000..9da19ea Binary files /dev/null and b/example_gradle_8/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/example_gradle_8/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/example_gradle_8/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 0000000..89c2725 --- /dev/null +++ b/example_gradle_8/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# Launch Screen Assets + +You can customize the launch screen with your own desired assets by replacing the image files in this directory. + +You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. \ No newline at end of file diff --git a/example_gradle_8/ios/Runner/Base.lproj/LaunchScreen.storyboard b/example_gradle_8/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..f2e259c --- /dev/null +++ b/example_gradle_8/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example_gradle_8/ios/Runner/Base.lproj/Main.storyboard b/example_gradle_8/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 0000000..f3c2851 --- /dev/null +++ b/example_gradle_8/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example_gradle_8/ios/Runner/Info.plist b/example_gradle_8/ios/Runner/Info.plist new file mode 100644 index 0000000..d5a9b1f --- /dev/null +++ b/example_gradle_8/ios/Runner/Info.plist @@ -0,0 +1,49 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + Example Gradle 8 + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + example_gradle_8 + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + CADisableMinimumFrameDurationOnPhone + + UIApplicationSupportsIndirectInputEvents + + + diff --git a/example_gradle_8/ios/Runner/Runner-Bridging-Header.h b/example_gradle_8/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 0000000..308a2a5 --- /dev/null +++ b/example_gradle_8/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/example_gradle_8/ios/RunnerTests/RunnerTests.swift b/example_gradle_8/ios/RunnerTests/RunnerTests.swift new file mode 100644 index 0000000..86a7c3b --- /dev/null +++ b/example_gradle_8/ios/RunnerTests/RunnerTests.swift @@ -0,0 +1,12 @@ +import Flutter +import UIKit +import XCTest + +class RunnerTests: XCTestCase { + + func testExample() { + // If you add code to the Runner application, consider adding tests here. + // See https://developer.apple.com/documentation/xctest for more information about using XCTest. + } + +} diff --git a/example_gradle_8/lib/main.dart b/example_gradle_8/lib/main.dart new file mode 100644 index 0000000..a71d2a6 --- /dev/null +++ b/example_gradle_8/lib/main.dart @@ -0,0 +1,239 @@ +import 'dart:async'; +import 'dart:developer' as d; +import 'dart:io' as io; + +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_in_store_app_version_checker/flutter_in_store_app_version_checker.dart'; + +typedef StoreIDPair = ({String googlePlayID, String appleStoreID}); + +//? Has in Pure Store and Google Play Store +const StoreIDPair kTikTokStoreIDPair = ( + googlePlayID: 'com.zhiliaoapp.musically', + appleStoreID: 'com.zhiliaoapp.musically', +); + +//? Has in Pure Store and Google Play Store +const StoreIDPair kRobloxStoreIDPair = ( + googlePlayID: 'com.roblox.client', + appleStoreID: 'com.roblox.client', +); + +//? Has in Pure Store and Google Play Store +const StoreIDPair kFreefirethStoreIDPair = ( + googlePlayID: 'com.dts.freefireth', + appleStoreID: 'com.dts.freefireth', +); + +//? Has in Pure Store and Google Play Store +const StoreIDPair kWildberriesStoreIDPair = ( + googlePlayID: 'com.wildberries.ru', + appleStoreID: 'com.wildberries.ru', +); + +//? Has in Pure Store and Google Play Store +const StoreIDPair kOzonStoreIDPair = ( + googlePlayID: 'ru.ozon.app.android', + appleStoreID: 'ru.ozon.app', +); + +const _verticalSpacing = SizedBox(height: 16.0); + +void main() => runZonedGuarded( + () => runApp(const App()), + (error, stackTrace) => d.log('Top level exception: $error\n$stackTrace'), + ); + +/// {@template app} +/// App widget. +/// {@endtemplate} +class App extends StatelessWidget { + /// {@macro app} + const App({super.key}); + + @override + Widget build(BuildContext context) => MaterialApp( + title: 'In Store App Version Checker Example', + theme: ThemeData.dark(), + home: const Example(), + ); +} + +/// {@template example} +/// Example widget of using the `InStoreAppVersionChecker` plugin. +/// {@endtemplate} +class Example extends StatefulWidget { + /// {@macro example} + const Example({super.key}); + + @override + State createState() => _ExampleState(); +} + +/// State of the [Example] widget. +class _ExampleState extends State { + late final InStoreAppVersionChecker _tiktokChecker; + late final InStoreAppVersionChecker _robloxChecker; + late final InStoreAppVersionChecker _freefirethChecker; + late final InStoreAppVersionChecker _wildberriesChecker; + late final InStoreAppVersionChecker _ozonChecker; + + InStoreAppVersionCheckerResult? _tiktok; + InStoreAppVersionCheckerResult? _roblox; + InStoreAppVersionCheckerResult? _freefireth; + InStoreAppVersionCheckerResult? _wildberries; + InStoreAppVersionCheckerResult? _ozon; + + @override + void initState() { + super.initState(); + _tiktokChecker = InStoreAppVersionChecker( + appId: io.Platform.isAndroid + ? kTikTokStoreIDPair.googlePlayID + : kTikTokStoreIDPair.appleStoreID, + ); + _robloxChecker = InStoreAppVersionChecker( + appId: io.Platform.isAndroid + ? kRobloxStoreIDPair.googlePlayID + : kRobloxStoreIDPair.appleStoreID, + ); + _freefirethChecker = InStoreAppVersionChecker( + appId: io.Platform.isAndroid + ? kFreefirethStoreIDPair.googlePlayID + : kFreefirethStoreIDPair.appleStoreID, + ); + _wildberriesChecker = InStoreAppVersionChecker( + appId: io.Platform.isAndroid + ? kWildberriesStoreIDPair.googlePlayID + : kWildberriesStoreIDPair.appleStoreID, + ); + _ozonChecker = InStoreAppVersionChecker( + appId: io.Platform.isAndroid + ? kOzonStoreIDPair.googlePlayID + : kOzonStoreIDPair.appleStoreID, + ); + } + + Future _checkVersion() async { + await Future.wait([ + _tiktokChecker.checkUpdate().then((result) => _tiktok = result), + _robloxChecker.checkUpdate().then((result) => _roblox = result), + _freefirethChecker.checkUpdate().then((result) => _freefireth = result), + _wildberriesChecker.checkUpdate().then((result) => _wildberries = result), + _ozonChecker.checkUpdate().then((result) => _ozon = result), + ]); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + forceMaterialTransparency: false, + centerTitle: true, + title: const Text( + 'In Store App Version Checker Example', + style: TextStyle( + fontSize: 17, + fontWeight: FontWeight.w600, + ), + ), + actions: [ + IconButton( + iconSize: 20, + padding: EdgeInsets.zero, + onPressed: _checkVersion, + icon: const Icon(CupertinoIcons.refresh), + ) + ], + ), + body: SafeArea( + child: Padding( + padding: const EdgeInsets.all(16.0), + child: FutureBuilder( + future: _checkVersion(), + builder: (context, snapshot) { + if (snapshot.connectionState == ConnectionState.waiting) { + return const Center( + child: CircularProgressIndicator.adaptive(), + ); + } + if (snapshot.hasError) { + return Center( + child: Text( + 'Error: ${snapshot.error}', + style: const TextStyle(color: Colors.red), + ), + ); + } + + return SingleChildScrollView( + child: Column( + children: [ + if (_tiktok != null) ...[ + _AppSection(title: "Tik Tok", item: _tiktok!), + _verticalSpacing, + ], + if (_roblox != null) ...[ + _AppSection(title: "Roblox", item: _roblox!), + _verticalSpacing, + ], + if (_freefireth != null) ...[ + _AppSection(title: "Freefeireth", item: _freefireth!), + _verticalSpacing, + ], + if (_wildberries != null) ...[ + _AppSection(title: "Willberies", item: _wildberries!), + _verticalSpacing, + ], + if (_ozon != null) ...[ + _AppSection(title: "Ozon", item: _ozon!), + _verticalSpacing, + ], + ], + ), + ); + }, + ), + ), + ), + ); + } +} + +/// {@template main} +/// _AppSection widget. +/// {@endtemplate} +class _AppSection extends StatelessWidget { + /// {@macro main} + const _AppSection({ + required this.title, + required this.item, + super.key, // ignore: unused_element + }); + + final String title; + final InStoreAppVersionCheckerResult item; + + @override + Widget build(BuildContext context) => SizedBox( + width: double.infinity, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + title, + style: const TextStyle(fontWeight: FontWeight.w600, fontSize: 17), + ), + const SizedBox(height: 5.0), + Text( + item.toString(), + style: const TextStyle( + fontWeight: FontWeight.normal, + fontSize: 14, + ), + ), + ], + ), + ); +} diff --git a/example_gradle_8/macos/.gitignore b/example_gradle_8/macos/.gitignore new file mode 100644 index 0000000..746adbb --- /dev/null +++ b/example_gradle_8/macos/.gitignore @@ -0,0 +1,7 @@ +# Flutter-related +**/Flutter/ephemeral/ +**/Pods/ + +# Xcode-related +**/dgph +**/xcuserdata/ diff --git a/example_gradle_8/macos/Flutter/Flutter-Debug.xcconfig b/example_gradle_8/macos/Flutter/Flutter-Debug.xcconfig new file mode 100644 index 0000000..4b81f9b --- /dev/null +++ b/example_gradle_8/macos/Flutter/Flutter-Debug.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" +#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/example_gradle_8/macos/Flutter/Flutter-Release.xcconfig b/example_gradle_8/macos/Flutter/Flutter-Release.xcconfig new file mode 100644 index 0000000..5caa9d1 --- /dev/null +++ b/example_gradle_8/macos/Flutter/Flutter-Release.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" +#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/example_gradle_8/macos/Flutter/GeneratedPluginRegistrant.swift b/example_gradle_8/macos/Flutter/GeneratedPluginRegistrant.swift new file mode 100644 index 0000000..a8b637f --- /dev/null +++ b/example_gradle_8/macos/Flutter/GeneratedPluginRegistrant.swift @@ -0,0 +1,12 @@ +// +// Generated file. Do not edit. +// + +import FlutterMacOS +import Foundation + +import package_info_plus + +func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { + FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin")) +} diff --git a/example_gradle_8/macos/Podfile b/example_gradle_8/macos/Podfile new file mode 100644 index 0000000..c795730 --- /dev/null +++ b/example_gradle_8/macos/Podfile @@ -0,0 +1,43 @@ +platform :osx, '10.14' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\"" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_macos_podfile_setup + +target 'Runner' do + use_frameworks! + use_modular_headers! + + flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__)) + target 'RunnerTests' do + inherit! :search_paths + end +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_macos_build_settings(target) + end +end diff --git a/example_gradle_8/macos/Runner.xcodeproj/project.pbxproj b/example_gradle_8/macos/Runner.xcodeproj/project.pbxproj new file mode 100644 index 0000000..8f54083 --- /dev/null +++ b/example_gradle_8/macos/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,705 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXAggregateTarget section */ + 33CC111A2044C6BA0003C045 /* Flutter Assemble */ = { + isa = PBXAggregateTarget; + buildConfigurationList = 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */; + buildPhases = ( + 33CC111E2044C6BF0003C045 /* ShellScript */, + ); + dependencies = ( + ); + name = "Flutter Assemble"; + productName = FLX; + }; +/* End PBXAggregateTarget section */ + +/* Begin PBXBuildFile section */ + 331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C80D7294CF71000263BE5 /* RunnerTests.swift */; }; + 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; }; + 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; }; + 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; }; + 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; }; + 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 331C80D9294CF71000263BE5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 33CC10E52044A3C60003C045 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 33CC10EC2044A3C60003C045; + remoteInfo = Runner; + }; + 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 33CC10E52044A3C60003C045 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 33CC111A2044C6BA0003C045; + remoteInfo = FLX; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 33CC110E2044A8840003C045 /* Bundle Framework */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Bundle Framework"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 331C80D5294CF71000263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 331C80D7294CF71000263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; + 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; }; + 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = ""; }; + 33CC10ED2044A3C60003C045 /* example_gradle_8.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "example_gradle_8.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = ""; }; + 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; + 33CC10F72044A3C60003C045 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Runner/Info.plist; sourceTree = ""; }; + 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainFlutterWindow.swift; sourceTree = ""; }; + 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Debug.xcconfig"; sourceTree = ""; }; + 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Release.xcconfig"; sourceTree = ""; }; + 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "Flutter-Generated.xcconfig"; path = "ephemeral/Flutter-Generated.xcconfig"; sourceTree = ""; }; + 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = ""; }; + 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = ""; }; + 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 331C80D2294CF70F00263BE5 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 33CC10EA2044A3C60003C045 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 331C80D6294CF71000263BE5 /* RunnerTests */ = { + isa = PBXGroup; + children = ( + 331C80D7294CF71000263BE5 /* RunnerTests.swift */, + ); + path = RunnerTests; + sourceTree = ""; + }; + 33BA886A226E78AF003329D5 /* Configs */ = { + isa = PBXGroup; + children = ( + 33E5194F232828860026EE4D /* AppInfo.xcconfig */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 333000ED22D3DE5D00554162 /* Warnings.xcconfig */, + ); + path = Configs; + sourceTree = ""; + }; + 33CC10E42044A3C60003C045 = { + isa = PBXGroup; + children = ( + 33FAB671232836740065AC1E /* Runner */, + 33CEB47122A05771004F2AC0 /* Flutter */, + 331C80D6294CF71000263BE5 /* RunnerTests */, + 33CC10EE2044A3C60003C045 /* Products */, + D73912EC22F37F3D000D13A0 /* Frameworks */, + ); + sourceTree = ""; + }; + 33CC10EE2044A3C60003C045 /* Products */ = { + isa = PBXGroup; + children = ( + 33CC10ED2044A3C60003C045 /* example_gradle_8.app */, + 331C80D5294CF71000263BE5 /* RunnerTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 33CC11242044D66E0003C045 /* Resources */ = { + isa = PBXGroup; + children = ( + 33CC10F22044A3C60003C045 /* Assets.xcassets */, + 33CC10F42044A3C60003C045 /* MainMenu.xib */, + 33CC10F72044A3C60003C045 /* Info.plist */, + ); + name = Resources; + path = ..; + sourceTree = ""; + }; + 33CEB47122A05771004F2AC0 /* Flutter */ = { + isa = PBXGroup; + children = ( + 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */, + 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */, + 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */, + 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */, + ); + path = Flutter; + sourceTree = ""; + }; + 33FAB671232836740065AC1E /* Runner */ = { + isa = PBXGroup; + children = ( + 33CC10F02044A3C60003C045 /* AppDelegate.swift */, + 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */, + 33E51913231747F40026EE4D /* DebugProfile.entitlements */, + 33E51914231749380026EE4D /* Release.entitlements */, + 33CC11242044D66E0003C045 /* Resources */, + 33BA886A226E78AF003329D5 /* Configs */, + ); + path = Runner; + sourceTree = ""; + }; + D73912EC22F37F3D000D13A0 /* Frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 331C80D4294CF70F00263BE5 /* RunnerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; + buildPhases = ( + 331C80D1294CF70F00263BE5 /* Sources */, + 331C80D2294CF70F00263BE5 /* Frameworks */, + 331C80D3294CF70F00263BE5 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 331C80DA294CF71000263BE5 /* PBXTargetDependency */, + ); + name = RunnerTests; + productName = RunnerTests; + productReference = 331C80D5294CF71000263BE5 /* RunnerTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 33CC10EC2044A3C60003C045 /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 33CC10E92044A3C60003C045 /* Sources */, + 33CC10EA2044A3C60003C045 /* Frameworks */, + 33CC10EB2044A3C60003C045 /* Resources */, + 33CC110E2044A8840003C045 /* Bundle Framework */, + 3399D490228B24CF009A79C7 /* ShellScript */, + ); + buildRules = ( + ); + dependencies = ( + 33CC11202044C79F0003C045 /* PBXTargetDependency */, + ); + name = Runner; + productName = Runner; + productReference = 33CC10ED2044A3C60003C045 /* example_gradle_8.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 33CC10E52044A3C60003C045 /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = YES; + LastSwiftUpdateCheck = 0920; + LastUpgradeCheck = 1510; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 331C80D4294CF70F00263BE5 = { + CreatedOnToolsVersion = 14.0; + TestTargetID = 33CC10EC2044A3C60003C045; + }; + 33CC10EC2044A3C60003C045 = { + CreatedOnToolsVersion = 9.2; + LastSwiftMigration = 1100; + ProvisioningStyle = Automatic; + SystemCapabilities = { + com.apple.Sandbox = { + enabled = 1; + }; + }; + }; + 33CC111A2044C6BA0003C045 = { + CreatedOnToolsVersion = 9.2; + ProvisioningStyle = Manual; + }; + }; + }; + buildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 33CC10E42044A3C60003C045; + productRefGroup = 33CC10EE2044A3C60003C045 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 33CC10EC2044A3C60003C045 /* Runner */, + 331C80D4294CF70F00263BE5 /* RunnerTests */, + 33CC111A2044C6BA0003C045 /* Flutter Assemble */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 331C80D3294CF70F00263BE5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 33CC10EB2044A3C60003C045 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */, + 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3399D490228B24CF009A79C7 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh embed\n"; + }; + 33CC111E2044C6BF0003C045 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + Flutter/ephemeral/FlutterInputs.xcfilelist, + ); + inputPaths = ( + Flutter/ephemeral/tripwire, + ); + outputFileListPaths = ( + Flutter/ephemeral/FlutterOutputs.xcfilelist, + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 331C80D1294CF70F00263BE5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 33CC10E92044A3C60003C045 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */, + 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */, + 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 331C80DA294CF71000263BE5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 33CC10EC2044A3C60003C045 /* Runner */; + targetProxy = 331C80D9294CF71000263BE5 /* PBXContainerItemProxy */; + }; + 33CC11202044C79F0003C045 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 33CC111A2044C6BA0003C045 /* Flutter Assemble */; + targetProxy = 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 33CC10F42044A3C60003C045 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 33CC10F52044A3C60003C045 /* Base */, + ); + name = MainMenu.xib; + path = Runner; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 331C80DB294CF71000263BE5 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.exampleGradle8.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/example_gradle_8.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/example_gradle_8"; + }; + name = Debug; + }; + 331C80DC294CF71000263BE5 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.exampleGradle8.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/example_gradle_8.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/example_gradle_8"; + }; + name = Release; + }; + 331C80DD294CF71000263BE5 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.exampleGradle8.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/example_gradle_8.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/example_gradle_8"; + }; + name = Profile; + }; + 338D0CE9231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.14; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Profile; + }; + 338D0CEA231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; + }; + name = Profile; + }; + 338D0CEB231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Manual; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Profile; + }; + 33CC10F92044A3C60003C045 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.14; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 33CC10FA2044A3C60003C045 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.14; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Release; + }; + 33CC10FC2044A3C60003C045 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + 33CC10FD2044A3C60003C045 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; + }; + name = Release; + }; + 33CC111C2044C6BA0003C045 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Manual; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 33CC111D2044C6BA0003C045 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 331C80DB294CF71000263BE5 /* Debug */, + 331C80DC294CF71000263BE5 /* Release */, + 331C80DD294CF71000263BE5 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC10F92044A3C60003C045 /* Debug */, + 33CC10FA2044A3C60003C045 /* Release */, + 338D0CE9231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC10FC2044A3C60003C045 /* Debug */, + 33CC10FD2044A3C60003C045 /* Release */, + 338D0CEA231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC111C2044C6BA0003C045 /* Debug */, + 33CC111D2044C6BA0003C045 /* Release */, + 338D0CEB231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 33CC10E52044A3C60003C045 /* Project object */; +} diff --git a/example_gradle_8/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/example_gradle_8/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/example_gradle_8/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/example_gradle_8/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/example_gradle_8/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 0000000..dc08341 --- /dev/null +++ b/example_gradle_8/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example_gradle_8/macos/Runner.xcworkspace/contents.xcworkspacedata b/example_gradle_8/macos/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..1d526a1 --- /dev/null +++ b/example_gradle_8/macos/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/example_gradle_8/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/example_gradle_8/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/example_gradle_8/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/example_gradle_8/macos/Runner/AppDelegate.swift b/example_gradle_8/macos/Runner/AppDelegate.swift new file mode 100644 index 0000000..8e02df2 --- /dev/null +++ b/example_gradle_8/macos/Runner/AppDelegate.swift @@ -0,0 +1,9 @@ +import Cocoa +import FlutterMacOS + +@main +class AppDelegate: FlutterAppDelegate { + override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { + return true + } +} diff --git a/example_gradle_8/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/example_gradle_8/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..a2ec33f --- /dev/null +++ b/example_gradle_8/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,68 @@ +{ + "images" : [ + { + "size" : "16x16", + "idiom" : "mac", + "filename" : "app_icon_16.png", + "scale" : "1x" + }, + { + "size" : "16x16", + "idiom" : "mac", + "filename" : "app_icon_32.png", + "scale" : "2x" + }, + { + "size" : "32x32", + "idiom" : "mac", + "filename" : "app_icon_32.png", + "scale" : "1x" + }, + { + "size" : "32x32", + "idiom" : "mac", + "filename" : "app_icon_64.png", + "scale" : "2x" + }, + { + "size" : "128x128", + "idiom" : "mac", + "filename" : "app_icon_128.png", + "scale" : "1x" + }, + { + "size" : "128x128", + "idiom" : "mac", + "filename" : "app_icon_256.png", + "scale" : "2x" + }, + { + "size" : "256x256", + "idiom" : "mac", + "filename" : "app_icon_256.png", + "scale" : "1x" + }, + { + "size" : "256x256", + "idiom" : "mac", + "filename" : "app_icon_512.png", + "scale" : "2x" + }, + { + "size" : "512x512", + "idiom" : "mac", + "filename" : "app_icon_512.png", + "scale" : "1x" + }, + { + "size" : "512x512", + "idiom" : "mac", + "filename" : "app_icon_1024.png", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/example_gradle_8/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png b/example_gradle_8/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png new file mode 100644 index 0000000..82b6f9d Binary files /dev/null and b/example_gradle_8/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png differ diff --git a/example_gradle_8/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png b/example_gradle_8/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png new file mode 100644 index 0000000..13b35eb Binary files /dev/null and b/example_gradle_8/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png differ diff --git a/example_gradle_8/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png b/example_gradle_8/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png new file mode 100644 index 0000000..0a3f5fa Binary files /dev/null and b/example_gradle_8/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png differ diff --git a/example_gradle_8/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png b/example_gradle_8/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png new file mode 100644 index 0000000..bdb5722 Binary files /dev/null and b/example_gradle_8/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png differ diff --git a/example_gradle_8/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png b/example_gradle_8/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png new file mode 100644 index 0000000..f083318 Binary files /dev/null and b/example_gradle_8/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png differ diff --git a/example_gradle_8/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png b/example_gradle_8/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png new file mode 100644 index 0000000..326c0e7 Binary files /dev/null and b/example_gradle_8/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png differ diff --git a/example_gradle_8/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png b/example_gradle_8/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png new file mode 100644 index 0000000..2f1632c Binary files /dev/null and b/example_gradle_8/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png differ diff --git a/example_gradle_8/macos/Runner/Base.lproj/MainMenu.xib b/example_gradle_8/macos/Runner/Base.lproj/MainMenu.xib new file mode 100644 index 0000000..80e867a --- /dev/null +++ b/example_gradle_8/macos/Runner/Base.lproj/MainMenu.xib @@ -0,0 +1,343 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example_gradle_8/macos/Runner/Configs/AppInfo.xcconfig b/example_gradle_8/macos/Runner/Configs/AppInfo.xcconfig new file mode 100644 index 0000000..2f23c00 --- /dev/null +++ b/example_gradle_8/macos/Runner/Configs/AppInfo.xcconfig @@ -0,0 +1,14 @@ +// Application-level settings for the Runner target. +// +// This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the +// future. If not, the values below would default to using the project name when this becomes a +// 'flutter create' template. + +// The application's name. By default this is also the title of the Flutter window. +PRODUCT_NAME = example_gradle_8 + +// The application's bundle identifier +PRODUCT_BUNDLE_IDENTIFIER = com.example.exampleGradle8 + +// The copyright displayed in application information +PRODUCT_COPYRIGHT = Copyright ยฉ 2024 com.example. All rights reserved. diff --git a/example_gradle_8/macos/Runner/Configs/Debug.xcconfig b/example_gradle_8/macos/Runner/Configs/Debug.xcconfig new file mode 100644 index 0000000..36b0fd9 --- /dev/null +++ b/example_gradle_8/macos/Runner/Configs/Debug.xcconfig @@ -0,0 +1,2 @@ +#include "../../Flutter/Flutter-Debug.xcconfig" +#include "Warnings.xcconfig" diff --git a/example_gradle_8/macos/Runner/Configs/Release.xcconfig b/example_gradle_8/macos/Runner/Configs/Release.xcconfig new file mode 100644 index 0000000..dff4f49 --- /dev/null +++ b/example_gradle_8/macos/Runner/Configs/Release.xcconfig @@ -0,0 +1,2 @@ +#include "../../Flutter/Flutter-Release.xcconfig" +#include "Warnings.xcconfig" diff --git a/example_gradle_8/macos/Runner/Configs/Warnings.xcconfig b/example_gradle_8/macos/Runner/Configs/Warnings.xcconfig new file mode 100644 index 0000000..42bcbf4 --- /dev/null +++ b/example_gradle_8/macos/Runner/Configs/Warnings.xcconfig @@ -0,0 +1,13 @@ +WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings +GCC_WARN_UNDECLARED_SELECTOR = YES +CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES +CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE +CLANG_WARN__DUPLICATE_METHOD_MATCH = YES +CLANG_WARN_PRAGMA_PACK = YES +CLANG_WARN_STRICT_PROTOTYPES = YES +CLANG_WARN_COMMA = YES +GCC_WARN_STRICT_SELECTOR_MATCH = YES +CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES +CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES +GCC_WARN_SHADOW = YES +CLANG_WARN_UNREACHABLE_CODE = YES diff --git a/example_gradle_8/macos/Runner/DebugProfile.entitlements b/example_gradle_8/macos/Runner/DebugProfile.entitlements new file mode 100644 index 0000000..dddb8a3 --- /dev/null +++ b/example_gradle_8/macos/Runner/DebugProfile.entitlements @@ -0,0 +1,12 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.cs.allow-jit + + com.apple.security.network.server + + + diff --git a/example_gradle_8/macos/Runner/Info.plist b/example_gradle_8/macos/Runner/Info.plist new file mode 100644 index 0000000..4789daa --- /dev/null +++ b/example_gradle_8/macos/Runner/Info.plist @@ -0,0 +1,32 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSMinimumSystemVersion + $(MACOSX_DEPLOYMENT_TARGET) + NSHumanReadableCopyright + $(PRODUCT_COPYRIGHT) + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/example_gradle_8/macos/Runner/MainFlutterWindow.swift b/example_gradle_8/macos/Runner/MainFlutterWindow.swift new file mode 100644 index 0000000..3cc05eb --- /dev/null +++ b/example_gradle_8/macos/Runner/MainFlutterWindow.swift @@ -0,0 +1,15 @@ +import Cocoa +import FlutterMacOS + +class MainFlutterWindow: NSWindow { + override func awakeFromNib() { + let flutterViewController = FlutterViewController() + let windowFrame = self.frame + self.contentViewController = flutterViewController + self.setFrame(windowFrame, display: true) + + RegisterGeneratedPlugins(registry: flutterViewController) + + super.awakeFromNib() + } +} diff --git a/example_gradle_8/macos/Runner/Release.entitlements b/example_gradle_8/macos/Runner/Release.entitlements new file mode 100644 index 0000000..852fa1a --- /dev/null +++ b/example_gradle_8/macos/Runner/Release.entitlements @@ -0,0 +1,8 @@ + + + + + com.apple.security.app-sandbox + + + diff --git a/example_gradle_8/macos/RunnerTests/RunnerTests.swift b/example_gradle_8/macos/RunnerTests/RunnerTests.swift new file mode 100644 index 0000000..61f3bd1 --- /dev/null +++ b/example_gradle_8/macos/RunnerTests/RunnerTests.swift @@ -0,0 +1,12 @@ +import Cocoa +import FlutterMacOS +import XCTest + +class RunnerTests: XCTestCase { + + func testExample() { + // If you add code to the Runner application, consider adding tests here. + // See https://developer.apple.com/documentation/xctest for more information about using XCTest. + } + +} diff --git a/example_gradle_8/pubspec.lock b/example_gradle_8/pubspec.lock new file mode 100644 index 0000000..eb7f5eb --- /dev/null +++ b/example_gradle_8/pubspec.lock @@ -0,0 +1,297 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + async: + dependency: transitive + description: + name: async + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" + source: hosted + version: "2.11.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + characters: + dependency: transitive + description: + name: characters + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" + source: hosted + version: "1.3.0" + clock: + dependency: transitive + description: + name: clock + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" + source: hosted + version: "1.1.1" + collection: + dependency: transitive + description: + name: collection + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + url: "https://pub.dev" + source: hosted + version: "1.18.0" + cupertino_icons: + dependency: "direct main" + description: + name: cupertino_icons + sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 + url: "https://pub.dev" + source: hosted + version: "1.0.8" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" + source: hosted + version: "1.3.1" + ffi: + dependency: transitive + description: + name: ffi + sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" + url: "https://pub.dev" + source: hosted + version: "2.1.3" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_in_store_app_version_checker: + dependency: "direct main" + description: + path: ".." + relative: true + source: path + version: "1.8.0" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c" + url: "https://pub.dev" + source: hosted + version: "4.0.0" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + http: + dependency: transitive + description: + name: http + sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 + url: "https://pub.dev" + source: hosted + version: "1.2.2" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" + source: hosted + version: "4.0.2" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" + url: "https://pub.dev" + source: hosted + version: "10.0.5" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" + url: "https://pub.dev" + source: hosted + version: "3.0.5" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" + lints: + dependency: transitive + description: + name: lints + sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235" + url: "https://pub.dev" + source: hosted + version: "4.0.0" + matcher: + dependency: transitive + description: + name: matcher + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + url: "https://pub.dev" + source: hosted + version: "0.12.16+1" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + url: "https://pub.dev" + source: hosted + version: "0.11.1" + meta: + dependency: transitive + description: + name: meta + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 + url: "https://pub.dev" + source: hosted + version: "1.15.0" + package_info_plus: + dependency: transitive + description: + name: package_info_plus + sha256: a75164ade98cb7d24cfd0a13c6408927c6b217fa60dee5a7ff5c116a58f28918 + url: "https://pub.dev" + source: hosted + version: "8.0.2" + package_info_plus_platform_interface: + dependency: transitive + description: + name: package_info_plus_platform_interface + sha256: ac1f4a4847f1ade8e6a87d1f39f5d7c67490738642e2542f559ec38c37489a66 + url: "https://pub.dev" + source: hosted + version: "3.0.1" + path: + dependency: transitive + description: + name: path + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + url: "https://pub.dev" + source: hosted + version: "1.9.0" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" + url: "https://pub.dev" + source: hosted + version: "2.1.8" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.99" + source_span: + dependency: transitive + description: + name: source_span + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" + source: hosted + version: "1.10.0" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + url: "https://pub.dev" + source: hosted + version: "1.11.1" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + url: "https://pub.dev" + source: hosted + version: "2.1.2" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" + source: hosted + version: "1.2.1" + test_api: + dependency: transitive + description: + name: test_api + sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" + url: "https://pub.dev" + source: hosted + version: "0.7.2" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + url: "https://pub.dev" + source: hosted + version: "1.3.2" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: f652077d0bdf60abe4c1f6377448e8655008eef28f128bc023f7b5e8dfeb48fc + url: "https://pub.dev" + source: hosted + version: "14.2.4" + web: + dependency: transitive + description: + name: web + sha256: d43c1d6b787bf0afad444700ae7f4db8827f701bc61c255ac8d328c6f4d52062 + url: "https://pub.dev" + source: hosted + version: "1.0.0" + win32: + dependency: transitive + description: + name: win32 + sha256: "68d1e89a91ed61ad9c370f9f8b6effed9ae5e0ede22a270bdfa6daf79fc2290a" + url: "https://pub.dev" + source: hosted + version: "5.5.4" +sdks: + dart: ">=3.4.0 <4.0.0" + flutter: ">=3.19.0" diff --git a/example_gradle_8/pubspec.yaml b/example_gradle_8/pubspec.yaml new file mode 100644 index 0000000..3967d72 --- /dev/null +++ b/example_gradle_8/pubspec.yaml @@ -0,0 +1,31 @@ +name: example_gradle_8 + +description: Demonstrates how to use the flutter_in_store_app_version_checker + +version: 1.0.0 + +publish_to: none + +environment: + sdk: '>=3.0.0 <4.0.0' + flutter: ">=3.0.0" + +dependencies: + flutter: + sdk: flutter + + cupertino_icons: any + + flutter_in_store_app_version_checker: + path: ../ + +dev_dependencies: + flutter_test: + sdk: flutter + + # Linting + flutter_lints: ^4.0.0 + + +flutter: + uses-material-design: true diff --git a/lib/src/in_store_app_version_checker.dart b/lib/src/in_store_app_version_checker.dart index 7967049..29bcd5d 100644 --- a/lib/src/in_store_app_version_checker.dart +++ b/lib/src/in_store_app_version_checker.dart @@ -7,7 +7,9 @@ import 'package:flutter_in_store_app_version_checker/src/model/in_store_app_vers import 'package:http/http.dart' as http; import 'package:package_info_plus/package_info_plus.dart'; +/// {@template android_store} /// Possible types of android store +/// {@endtemplate} enum AndroidStore { /// The default AAB googlePlayStore, @@ -17,13 +19,31 @@ enum AndroidStore { } /// {@template in_store_app_version_checker} -/// InStoreAppVersionChecker +/// [InStoreAppVersionChecker] is an interface for checking the current version +/// of an app available in app stores such as Google Play and ApkPure, +/// comparing it with the installed version on the device. +/// It supports both Android and iOS platforms. +/// +/// Properties: +/// - [appId]: The app's identifier (if not provided, Flutter's app ID is used). +/// - [locale]: The language/locale of the app store (default is "ru"). +/// - [currentVersion]: The current version of the app (if not provided, it is fetched from Flutter). +/// - [androidStore]: Specifies the Android app store (Google Play or ApkPure). +/// - [httpClient]: A custom HTTP client for making API requests. +/// +/// Methods: +/// - `checkUpdate()`: Checks for app updates in the selected app store. +/// +/// This class simplifies the process of checking for app updates by automating API +/// requests to app stores and is compatible with popular mobile platforms. /// {@endtemplate} abstract interface class InStoreAppVersionChecker { + /// {@macro in_store_app_version_checker} factory InStoreAppVersionChecker({ String? appId, String? locale, String? currentVersion, + http.Client? httpClient, AndroidStore? androidStore, }) = _InStoreAppVersionCheckerImpl; @@ -43,16 +63,11 @@ abstract interface class InStoreAppVersionChecker { /// Default will be `AndroidStore.GooglePlayStore` AndroidStore? get androidStore; - /// The overriden http client. - void setHttpClient(http.Client client); - /// Check update current store type. Future checkUpdate(); } -/// {@template in_store_app_version_checker} -/// InStoreAppVersionChecker implementation -/// {@endtemplate} +/// {@macro in_store_app_version_checker} final class _InStoreAppVersionCheckerImpl implements InStoreAppVersionChecker { /// {@macro in_store_app_version_checker} _InStoreAppVersionCheckerImpl({ @@ -60,7 +75,8 @@ final class _InStoreAppVersionCheckerImpl implements InStoreAppVersionChecker { this.locale = 'ru', this.currentVersion, this.androidStore = AndroidStore.googlePlayStore, - }) : _httpClient = http.Client(); + http.Client? httpClient, + }) : _httpClient = httpClient ?? http.Client(); @override final AndroidStore? androidStore; @@ -74,37 +90,18 @@ final class _InStoreAppVersionCheckerImpl implements InStoreAppVersionChecker { @override final String? appId; - @override - void setHttpClient(http.Client client) { - _httpClient = client; - } - /// This is http client. - late http.Client _httpClient; + late final http.Client _httpClient; bool get _isIOS => defaultTargetPlatform == TargetPlatform.iOS; bool get _isAndroid => defaultTargetPlatform == TargetPlatform.android; - // ignore: unused_field - static bool _kIsWeb = false; - /// {@macro in_store_app_version_checker} @override Future checkUpdate() async { - try { - if (_isAndroid || _isIOS) { - _kIsWeb = false; - } else { - _kIsWeb = true; - } - } on Object catch (_, __) { - _kIsWeb = true; - } - final packageInfo = await PackageInfo.fromPlatform(); final packageName = appId ?? packageInfo.packageName; final currentVersion = this.currentVersion ?? packageInfo.version; - if (_isAndroid) { return await switch (androidStore) { AndroidStore.apkPure => @@ -112,8 +109,11 @@ final class _InStoreAppVersionCheckerImpl implements InStoreAppVersionChecker { _ => _checkPlayStore(currentVersion, packageName), }; } else if (_isIOS) { - return await _checkAppleStore(currentVersion, packageName, - locale: locale); + return await _checkAppleStore( + currentVersion, + packageName, + locale: locale, + ); } else { return InStoreAppVersionCheckerResult( currentVersion, @@ -181,7 +181,7 @@ final class _InStoreAppVersionCheckerImpl implements InStoreAppVersionChecker { final uri = Uri.https( 'play.google.com', '/store/apps/details', - {'id': packageName}, + {'id': packageName, 'hl': locale}, ); final response = await _httpClient.get(uri); if (response.statusCode != 200) { diff --git a/lib/src/model/in_store_app_version_checker_result.dart b/lib/src/model/in_store_app_version_checker_result.dart index 7e42609..c286b43 100644 --- a/lib/src/model/in_store_app_version_checker_result.dart +++ b/lib/src/model/in_store_app_version_checker_result.dart @@ -54,11 +54,15 @@ class InStoreAppVersionCheckerResult { } @override - String toString() => 'Current Version: $currentVersion\n' - 'New Version: $newVersion\n' - 'App URL: $appURL\n' - 'can update: $canUpdate\n' - 'error: $errorMessage'; + String toString() { + final buffer = StringBuffer() + ..write('Current version: $currentVersion\n') + ..write('New version: $newVersion\n') + ..write('App url: $appURL\n') + ..write('Can update: $canUpdate'); + if (errorMessage != null) buffer.write('\nError: $errorMessage, '); + return buffer.toString(); + } @override bool operator ==(covariant InStoreAppVersionCheckerResult other) { @@ -66,6 +70,7 @@ class InStoreAppVersionCheckerResult { return other.currentVersion == currentVersion && other.newVersion == newVersion && other.appURL == appURL && + other.canUpdate == canUpdate && other.errorMessage == errorMessage; } diff --git a/pubspec.lock b/pubspec.lock index 95ec3cf..42162ad 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,26 +5,31 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: eb376e9acf6938204f90eb3b1f00b578640d3188b4c8a8ec054f9f479af8d051 + sha256: f256b0c0ba6c7577c15e2e4e114755640a875e885099367bf6e012b19314c834 url: "https://pub.dev" source: hosted - version: "64.0.0" + version: "72.0.0" + _macros: + dependency: transitive + description: dart + source: sdk + version: "0.3.2" analyzer: dependency: transitive description: name: analyzer - sha256: "69f54f967773f6c26c7dcb13e93d7ccee8b17a641689da39e878d5cf13b06893" + sha256: b652861553cd3990d8ed361f7979dc6d7053a9ac8843fa73820ab68ce5410139 url: "https://pub.dev" source: hosted - version: "6.2.0" + version: "6.7.0" args: dependency: transitive description: name: args - sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596 + sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a" url: "https://pub.dev" source: hosted - version: "2.4.2" + version: "2.5.0" async: dependency: transitive description: @@ -61,34 +66,34 @@ packages: dependency: transitive description: name: build_daemon - sha256: "0343061a33da9c5810b2d6cee51945127d8f4c060b7fbdd9d54917f0a3feaaa1" + sha256: "79b2aef6ac2ed00046867ed354c88778c9c0f029df8a20fe10b5436826721ef9" url: "https://pub.dev" source: hosted - version: "4.0.1" + version: "4.0.2" build_resolvers: dependency: transitive description: name: build_resolvers - sha256: "64e12b0521812d1684b1917bc80945625391cb9bdd4312536b1d69dcb6133ed8" + sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a" url: "https://pub.dev" source: hosted - version: "2.4.1" + version: "2.4.2" build_runner: dependency: "direct dev" description: name: build_runner - sha256: "644dc98a0f179b872f612d3eb627924b578897c629788e858157fa5e704ca0c7" + sha256: dd09dd4e2b078992f42aac7f1a622f01882a8492fef08486b27ddde929c19f04 url: "https://pub.dev" source: hosted - version: "2.4.11" + version: "2.4.12" build_runner_core: dependency: transitive description: name: build_runner_core - sha256: c9e32d21dd6626b5c163d48b037ce906bbe428bc23ab77bcd77bb21e593b6185 + sha256: f8126682b87a7282a339b871298cc12009cb67109cfa1614d6436fb0289193e0 url: "https://pub.dev" source: hosted - version: "7.2.11" + version: "7.3.2" built_collection: dependency: transitive description: @@ -101,10 +106,10 @@ packages: dependency: transitive description: name: built_value - sha256: "69acb7007eb2a31dc901512bfe0f7b767168be34cb734835d54c070bfa74c1b2" + sha256: c7913a9737ee4007efedaffc968c049fd0f3d0e49109e778edc10de9426005cb url: "https://pub.dev" source: hosted - version: "8.8.0" + version: "8.9.2" characters: dependency: transitive description: @@ -133,18 +138,18 @@ packages: dependency: transitive description: name: code_builder - sha256: b2151ce26a06171005b379ecff6e08d34c470180ffe16b8e14b6d52be292b55f + sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37 url: "https://pub.dev" source: hosted - version: "4.8.0" + version: "4.10.0" collection: dependency: "direct dev" description: name: collection - sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf url: "https://pub.dev" source: hosted - version: "1.18.0" + version: "1.19.0" convert: dependency: transitive description: @@ -157,18 +162,18 @@ packages: dependency: transitive description: name: crypto - sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + sha256: ec30d999af904f33454ba22ed9a86162b35e52b44ac4807d1d93c288041d7d27 url: "https://pub.dev" source: hosted - version: "3.0.3" + version: "3.0.5" dart_style: dependency: transitive description: name: dart_style - sha256: "40ae61a5d43feea6d24bd22c0537a6629db858963b99b4bc1c3db80676f32368" + sha256: "7856d364b589d1f08986e140938578ed36ed948581fbc3bc9aef1805039ac5ab" url: "https://pub.dev" source: hosted - version: "2.3.4" + version: "2.3.7" fake_async: dependency: transitive description: @@ -181,10 +186,10 @@ packages: dependency: transitive description: name: ffi - sha256: "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21" + sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.3" file: dependency: transitive description: @@ -228,10 +233,10 @@ packages: dependency: transitive description: name: frontend_server_client - sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612" + sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 url: "https://pub.dev" source: hosted - version: "3.2.0" + version: "4.0.0" glob: dependency: transitive description: @@ -244,10 +249,10 @@ packages: dependency: transitive description: name: graphs - sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19 + sha256: "741bbf84165310a68ff28fe9e727332eef1407342fca52759cb21ad8177bb8d0" url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.3.2" http: dependency: "direct main" description: @@ -284,34 +289,34 @@ packages: dependency: transitive description: name: js - sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 + sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf url: "https://pub.dev" source: hosted - version: "0.6.7" + version: "0.7.1" json_annotation: dependency: transitive description: name: json_annotation - sha256: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467 + sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" url: "https://pub.dev" source: hosted - version: "4.8.1" + version: "4.9.0" leak_tracker: dependency: transitive description: name: leak_tracker - sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06" url: "https://pub.dev" source: hosted - version: "10.0.4" + version: "10.0.7" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379" url: "https://pub.dev" source: hosted - version: "3.0.3" + version: "3.0.8" leak_tracker_testing: dependency: transitive description: @@ -336,6 +341,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.0" + macros: + dependency: transitive + description: + name: macros + sha256: "0acaed5d6b7eab89f63350bccd82119e6c602df0f391260d0e32b5e23db79536" + url: "https://pub.dev" + source: hosted + version: "0.1.2-main.4" matcher: dependency: transitive description: @@ -348,26 +361,26 @@ packages: dependency: transitive description: name: material_color_utilities - sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec url: "https://pub.dev" source: hosted - version: "0.8.0" + version: "0.11.1" meta: dependency: "direct main" description: name: meta - sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 url: "https://pub.dev" source: hosted - version: "1.12.0" + version: "1.15.0" mime: dependency: transitive description: name: mime - sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e + sha256: "801fd0b26f14a4a58ccb09d5892c3fbdeff209594300a542492cf13fba9d247a" url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "1.0.6" mockito: dependency: "direct dev" description: @@ -388,18 +401,18 @@ packages: dependency: "direct main" description: name: package_info_plus - sha256: b93d8b4d624b4ea19b0a5a208b2d6eff06004bc3ce74c06040b120eeadd00ce0 + sha256: a75164ade98cb7d24cfd0a13c6408927c6b217fa60dee5a7ff5c116a58f28918 url: "https://pub.dev" source: hosted - version: "8.0.0" + version: "8.0.2" package_info_plus_platform_interface: dependency: transitive description: name: package_info_plus_platform_interface - sha256: f49918f3433a3146047372f9d4f1f847511f2acd5cd030e1f44fe5a50036b70e + sha256: ac1f4a4847f1ade8e6a87d1f39f5d7c67490738642e2542f559ec38c37489a66 url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "3.0.1" path: dependency: "direct dev" description: @@ -436,10 +449,10 @@ packages: dependency: transitive description: name: pubspec_parse - sha256: c63b2876e58e194e4b0828fcb080ad0e06d051cb607a6be51a9e084f47cb9367 + sha256: c799b721d79eb6ee6fa56f00c04b472dcd44a30d258fac2174a6ec57302678f8 url: "https://pub.dev" source: hosted - version: "1.2.3" + version: "1.3.0" shelf: dependency: transitive description: @@ -452,23 +465,23 @@ packages: dependency: transitive description: name: shelf_web_socket - sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" + sha256: "073c147238594ecd0d193f3456a5fe91c4b0abbcc68bf5cd95b36c4e194ac611" url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "2.0.0" sky_engine: dependency: transitive description: flutter source: sdk - version: "0.0.99" + version: "0.0.0" source_gen: dependency: transitive description: name: source_gen - sha256: fc0da689e5302edb6177fdd964efcb7f58912f43c28c2047a808f5bfff643d16 + sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832" url: "https://pub.dev" source: hosted - version: "1.4.0" + version: "1.5.0" source_span: dependency: transitive description: @@ -505,10 +518,10 @@ packages: dependency: transitive description: name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.3.0" term_glyph: dependency: transitive description: @@ -521,10 +534,10 @@ packages: dependency: transitive description: name: test_api - sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" + sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c" url: "https://pub.dev" source: hosted - version: "0.7.0" + version: "0.7.3" timing: dependency: transitive description: @@ -553,10 +566,10 @@ packages: dependency: transitive description: name: vm_service - sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" + sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" url: "https://pub.dev" source: hosted - version: "14.2.1" + version: "14.2.5" watcher: dependency: transitive description: @@ -569,26 +582,34 @@ packages: dependency: transitive description: name: web - sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" + sha256: d43c1d6b787bf0afad444700ae7f4db8827f701bc61c255ac8d328c6f4d52062 + url: "https://pub.dev" + source: hosted + version: "1.0.0" + web_socket: + dependency: transitive + description: + name: web_socket + sha256: "3c12d96c0c9a4eec095246debcea7b86c0324f22df69893d538fcc6f1b8cce83" url: "https://pub.dev" source: hosted - version: "0.5.1" + version: "0.1.6" web_socket_channel: dependency: transitive description: name: web_socket_channel - sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b + sha256: "9f187088ed104edd8662ca07af4b124465893caf063ba29758f97af57e61da8f" url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "3.0.1" win32: dependency: transitive description: name: win32 - sha256: a79dbe579cb51ecd6d30b17e0cae4e0ea15e2c0e66f69ad4198f22a6789e94f4 + sha256: "68d1e89a91ed61ad9c370f9f8b6effed9ae5e0ede22a270bdfa6daf79fc2290a" url: "https://pub.dev" source: hosted - version: "5.5.1" + version: "5.5.4" yaml: dependency: transitive description: @@ -598,5 +619,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.4.0 <4.0.0" + dart: ">=3.5.0-259.0.dev <4.0.0" flutter: ">=3.19.0" diff --git a/pubspec.yaml b/pubspec.yaml index 0861b47..bf96500 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ name: flutter_in_store_app_version_checker description: > A lightweight flutter plugin to check if your app is up-to-date on GooglePlay or AppStore. -version: 1.7.1 +version: 1.8.0 homepage: https://github.com/ziqq/flutter_in_store_app_version_checker @@ -11,6 +11,11 @@ repository: https://github.com/ziqq/flutter_in_store_app_version_checker issue_tracker: https://github.com/ziqq/flutter_in_store_app_version_checker/issues +funding: + - https://www.buymeacoffee.com/ziqq + - https://www.patreon.com/ziqq + - https://boosty.to/ziqq + environment: sdk: '>=3.0.0 <4.0.0' flutter: ">=3.0.0" @@ -20,13 +25,13 @@ dependencies: sdk: flutter # Annotations - meta: ^1.9.1 + meta: ^1.0.0 # Http http: ^1.2.2 # Utilities - package_info_plus: ^8.0.0 + package_info_plus: ^8.0.2 dev_dependencies: flutter_test: @@ -36,7 +41,7 @@ dev_dependencies: collection: any path: any - build_runner: ^2.4.11 + build_runner: ^2.4.12 # Testing mockito: ^5.4.4 @@ -48,7 +53,7 @@ flutter: plugin: platforms: android: - package: com.example.in_store_app_version_checker + package: flutter_in_store_app_version_checker pluginClass: InStoreAppVersionCheckerPlugin ios: pluginClass: InStoreAppVersionCheckerPlugin diff --git a/test/flutter_in_store_app_version_checker_test.dart b/test/flutter_in_store_app_version_checker_test.dart index b93c705..772a8f0 100644 --- a/test/flutter_in_store_app_version_checker_test.dart +++ b/test/flutter_in_store_app_version_checker_test.dart @@ -1,6 +1,10 @@ // Autor - Anton Ustinoff, 11 December 2023 +import 'package:flutter_test/flutter_test.dart'; + import 'unit/in_store_app_version_checker_test.dart' as in_store_app_version_checker; -void main() => in_store_app_version_checker.main(); +void main() { + group('Unit_test -', in_store_app_version_checker.main); +} diff --git a/test/unit/in_store_app_version_checker_test.dart b/test/unit/in_store_app_version_checker_test.dart index 49eef5e..81db8f5 100644 --- a/test/unit/in_store_app_version_checker_test.dart +++ b/test/unit/in_store_app_version_checker_test.dart @@ -9,319 +9,319 @@ import 'package:mockito/mockito.dart'; import '../util/mocks.dart'; -void main() => group( - 'Unit_tests -', - () => group('InStoreAppVersionChecker', () { - const channel = - MethodChannel('dev.fluttercommunity.plus/package_info'); - late MockClient mockHttpClient; - - setUp(() { - TestWidgetsFlutterBinding.ensureInitialized(); - - // PackageInfo.setMockInitialValues( - // installerStore: 'installerStore', - // buildNumber: '2', - // version: '2.0.0', - // appName: 'appName', - // packageName: 'packageName', - // buildSignature: 'buildSignature', - // ); - - TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger - .setMockMethodCallHandler( - channel, - (methodCall) async { - if (methodCall.method == 'getDeviceInfo') { - if (defaultTargetPlatform == TargetPlatform.android) { - return fakeAndroidDeviceInfo; - } else if (defaultTargetPlatform == TargetPlatform.iOS) { - return iosDeviceInfoMap; - } - return iosDeviceInfoMap; - } - return iosDeviceInfoMap; - }, - ); - - mockHttpClient = MockClient(); - }); - - tearDown(() { - TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger - .setMockMethodCallHandler(channel, null); - }); - - test('Init with default `http.Client()`', () async { - debugDefaultTargetPlatformOverride = TargetPlatform.android; - - final checker = InStoreAppVersionChecker( - currentVersion: '1.0.0', - appId: 'com.example.app', - ); - - final result = await checker.checkUpdate(); - - expect(result.errorMessage, isNotNull); - expect(result.canUpdate, isFalse); - }); - - group('Check is web -', () { - test( - 'When called, should return with error message', - () async { - debugDefaultTargetPlatformOverride = TargetPlatform.macOS; - - final checker = InStoreAppVersionChecker( - currentVersion: '1.0.0', - appId: 'com.example.app', - )..setHttpClient(mockHttpClient); - - final result = await checker.checkUpdate(); - - expect( - result, - const InStoreAppVersionCheckerResult( - '1.0.0', - null, - '', - 'This platform is not yet supported by this package. We support iOS or Android platrforms.', - ), - ); - }); - }); - - group('Apple Store -', () { - test('Successful check for Apple Store', () async { - debugDefaultTargetPlatformOverride = TargetPlatform.iOS; - - const vesion = '1.2.3'; - - when(mockHttpClient.get(any)).thenAnswer( - (_) async => http.Response( - '{"resultCount":1,"results":[{"version":"$vesion","trackViewUrl":"https://apps.apple.com/us/app/your-app-name/id123456789"}]}', - 200, - ), - ); - - final checker = InStoreAppVersionChecker( - currentVersion: '1.0.0', - appId: 'com.example.app', - )..setHttpClient(mockHttpClient); - - final result = await checker.checkUpdate(); - - expect(result.currentVersion, equals('1.0.0')); - expect(result.newVersion, equals(vesion)); - }); - test('Successful check hashCode should be false', () async { - debugDefaultTargetPlatformOverride = TargetPlatform.iOS; - - const vesion = '1.2.3'; - - when(mockHttpClient.get(any)).thenAnswer( - (_) async => http.Response( - '{"resultCount":1,"results":[{"version":"$vesion","trackViewUrl":"https://apps.apple.com/us/app/your-app-name/id123456789"}]}', - 200, - ), - ); - - final checker_1 = InStoreAppVersionChecker( - currentVersion: '1.0.0', - appId: 'com.example.app', - )..setHttpClient(mockHttpClient); - - final checker_2 = InStoreAppVersionChecker( - currentVersion: '2.0.0', - appId: 'com.example.app', - )..setHttpClient(mockHttpClient); - - final result_1 = await checker_1.checkUpdate(); - final result_2 = await checker_2.checkUpdate(); - - expect(result_1.hashCode == result_2.hashCode, isFalse); - }); - test( - 'When results is empty, should get error response with error message as ', - () async { - debugDefaultTargetPlatformOverride = TargetPlatform.iOS; - - when(mockHttpClient.get(any)).thenAnswer( - (_) async => http.Response( - '{"resultCount": 0,"results":[]}', - 200, - ), - ); - - final checker = InStoreAppVersionChecker( - currentVersion: '1.0.0', - appId: 'com.example.app', - )..setHttpClient(mockHttpClient); - - final result = await checker.checkUpdate(); - - expect(result.currentVersion, equals('1.0.0')); - expect( - result.errorMessage, - "Can't find an app in the Apple Store with the id: com.example.app", - ); - expect(result.newVersion, isNull); - expect(result.canUpdate, isFalse); - }); - test('Error response as from Google Play Store', () async { - debugDefaultTargetPlatformOverride = TargetPlatform.iOS; - const errorMessage = "It's error"; - - when(mockHttpClient.get(any)).thenThrow(errorMessage); - - final checker = InStoreAppVersionChecker( - currentVersion: '1.0.0', - appId: 'com.example.app', - )..setHttpClient(mockHttpClient); - - final result = await checker.checkUpdate(); - - expect(result.currentVersion, equals('1.0.0')); - expect(result.errorMessage, errorMessage); - expect(result.newVersion, isNull); - expect(result.canUpdate, isFalse); - }); - test('Error response from Apple Store', () async { - debugDefaultTargetPlatformOverride = TargetPlatform.iOS; - - when(mockHttpClient.get(any)) - .thenAnswer((_) async => http.Response('Error', 404)); - - final checker = InStoreAppVersionChecker( - currentVersion: '1.0.0', - appId: 'com.example.app', - )..setHttpClient(mockHttpClient); - - final result = await checker.checkUpdate(); - - expect(result.errorMessage, isNotNull); - }); - }); - - group('AndroidS tore -', () { - group('Default -', () { - test('Successful check for Google Play Store', () async { - debugDefaultTargetPlatformOverride = TargetPlatform.android; - const vesion = '1.2.3'; - - when(mockHttpClient.get(any)).thenAnswer( - (_) async => http.Response(',[[["$vesion"]],', 200), - ); - - final checker = InStoreAppVersionChecker( - currentVersion: '1.0.0', - appId: 'com.example.app', - )..setHttpClient(mockHttpClient); - - final result = await checker.checkUpdate(); - - expect(result.currentVersion, equals('1.0.0')); - expect(result.newVersion, equals(vesion)); - expect(result.canUpdate, isTrue); - }); - test('Error response as from Google Play Store', - () async { - debugDefaultTargetPlatformOverride = TargetPlatform.android; - const errorMessage = "It's error"; - - when(mockHttpClient.get(any)).thenThrow(errorMessage); - - final checker = InStoreAppVersionChecker( - currentVersion: '1.0.0', - appId: 'com.example.app', - )..setHttpClient(mockHttpClient); - - final result = await checker.checkUpdate(); - - expect(result.currentVersion, equals('1.0.0')); - expect(result.errorMessage, errorMessage); - expect(result.newVersion, isNull); - expect(result.canUpdate, isFalse); - }); - test('Error response from Google Play Store', () async { - debugDefaultTargetPlatformOverride = TargetPlatform.android; - - when(mockHttpClient.get(any)) - .thenAnswer((_) async => http.Response('Error', 404)); - - final checker = InStoreAppVersionChecker( - currentVersion: '1.0.0', - appId: 'com.example.app', - )..setHttpClient(mockHttpClient); - - final result = await checker.checkUpdate(); - - expect(result.errorMessage, isNotNull); - expect(result.canUpdate, isFalse); - }); - }); - group('Apk Pure -', () { - test('Successful check for Google Play Store', () async { - debugDefaultTargetPlatformOverride = TargetPlatform.android; - const vesion = '1.2.3'; - - when(mockHttpClient.get(any)).thenAnswer( - (_) async => http.Response( - '
$vesionfor Android
', - 200, - ), - ); - - final checker = InStoreAppVersionChecker( - currentVersion: '1.0.0', - appId: 'com.example.app', - androidStore: AndroidStore.apkPure, - )..setHttpClient(mockHttpClient); - - final result = await checker.checkUpdate(); - - expect(result.currentVersion, equals('1.0.0')); - expect(result.newVersion, equals(vesion)); - expect(result.canUpdate, isTrue); - }); - test('Error response as from Google Play Store', - () async { - debugDefaultTargetPlatformOverride = TargetPlatform.android; - const errorMessage = "It's error"; - - when(mockHttpClient.get(any)).thenThrow(errorMessage); - - final checker = InStoreAppVersionChecker( - currentVersion: '1.0.0', - appId: 'com.example.app', - androidStore: AndroidStore.apkPure, - )..setHttpClient(mockHttpClient); - - final result = await checker.checkUpdate(); - - expect(result.currentVersion, equals('1.0.0')); - expect(result.errorMessage, errorMessage); - expect(result.newVersion, isNull); - expect(result.canUpdate, isFalse); - }); - test('Error response from Google Play Store', () async { - debugDefaultTargetPlatformOverride = TargetPlatform.android; - - when(mockHttpClient.get(any)) - .thenAnswer((_) async => http.Response('Error', 404)); - - final checker = InStoreAppVersionChecker( - currentVersion: '1.0.0', - appId: 'com.example.app', - androidStore: AndroidStore.apkPure, - )..setHttpClient(mockHttpClient); - - final result = await checker.checkUpdate(); - - expect(result.errorMessage, isNotNull); - expect(result.canUpdate, isFalse); - expect(result.toString(), isA()); - }); - }); - }); - })); +void main() { + group('InStoreAppVersionChecker', () { + const channel = MethodChannel('dev.fluttercommunity.plus/package_info'); + late MockClient mockHttpClient; + + setUp(() { + TestWidgetsFlutterBinding.ensureInitialized(); + TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger + .setMockMethodCallHandler( + channel, + (methodCall) async { + if (methodCall.method == 'getDeviceInfo') { + if (defaultTargetPlatform == TargetPlatform.android) { + return fakeAndroidDeviceInfo; + } else if (defaultTargetPlatform == TargetPlatform.iOS) { + return iosDeviceInfoMap; + } + return iosDeviceInfoMap; + } + return iosDeviceInfoMap; + }, + ); + + mockHttpClient = MockClient(); + }); + + tearDown(() { + TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger + .setMockMethodCallHandler(channel, null); + }); + + test('Init with default `http.Client()`', () async { + debugDefaultTargetPlatformOverride = TargetPlatform.android; + + final checker = InStoreAppVersionChecker( + currentVersion: '1.0.0', + appId: 'com.example.app', + ); + + final result = await checker.checkUpdate(); + + expect(result.errorMessage, isNotNull); + expect(result.canUpdate, isFalse); + }); + + group('Check is web -', () { + test( + 'When called, should return with error message', + () async { + debugDefaultTargetPlatformOverride = TargetPlatform.macOS; + + final checker = InStoreAppVersionChecker( + currentVersion: '1.0.0', + appId: 'com.example.app', + httpClient: mockHttpClient, + ); + + final result = await checker.checkUpdate(); + + expect( + result, + const InStoreAppVersionCheckerResult( + '1.0.0', + null, + '', + 'This platform is not yet supported by this package. We support iOS or Android platrforms.', + ), + ); + }); + }); + + group('Apple Store -', () { + test('Successful check for Apple Store', () async { + debugDefaultTargetPlatformOverride = TargetPlatform.iOS; + + const vesion = '1.2.3'; + + when(mockHttpClient.get(any)).thenAnswer( + (_) async => http.Response( + '{"resultCount":1,"results":[{"version":"$vesion","trackViewUrl":"https://apps.apple.com/us/app/your-app-name/id123456789"}]}', + 200, + ), + ); + + final checker = InStoreAppVersionChecker( + currentVersion: '1.0.0', + appId: 'com.example.app', + httpClient: mockHttpClient, + ); + + final result = await checker.checkUpdate(); + + expect(result.currentVersion, equals('1.0.0')); + expect(result.newVersion, equals(vesion)); + }); + test('Successful check hashCode should be false', () async { + debugDefaultTargetPlatformOverride = TargetPlatform.iOS; + + const vesion = '1.2.3'; + + when(mockHttpClient.get(any)).thenAnswer( + (_) async => http.Response( + '{"resultCount":1,"results":[{"version":"$vesion","trackViewUrl":"https://apps.apple.com/us/app/your-app-name/id123456789"}]}', + 200, + ), + ); + + final checker_1 = InStoreAppVersionChecker( + currentVersion: '1.0.0', + appId: 'com.example.app', + httpClient: mockHttpClient, + ); + + final checker_2 = InStoreAppVersionChecker( + currentVersion: '2.0.0', + appId: 'com.example.app', + httpClient: mockHttpClient, + ); + + final result_1 = await checker_1.checkUpdate(); + final result_2 = await checker_2.checkUpdate(); + + expect(result_1.hashCode == result_2.hashCode, isFalse); + }); + test( + 'When results is empty, should get error response with error message as ', + () async { + debugDefaultTargetPlatformOverride = TargetPlatform.iOS; + + when(mockHttpClient.get(any)).thenAnswer( + (_) async => http.Response( + '{"resultCount": 0,"results":[]}', + 200, + ), + ); + + final checker = InStoreAppVersionChecker( + currentVersion: '1.0.0', + appId: 'com.example.app', + httpClient: mockHttpClient, + ); + + final result = await checker.checkUpdate(); + + expect(result.currentVersion, equals('1.0.0')); + expect( + result.errorMessage, + "Can't find an app in the Apple Store with the id: com.example.app", + ); + expect(result.newVersion, isNull); + expect(result.canUpdate, isFalse); + }); + test('Error response as from Google Play Store', () async { + debugDefaultTargetPlatformOverride = TargetPlatform.iOS; + const errorMessage = "It's error"; + + when(mockHttpClient.get(any)).thenThrow(errorMessage); + + final checker = InStoreAppVersionChecker( + currentVersion: '1.0.0', + appId: 'com.example.app', + httpClient: mockHttpClient, + ); + + final result = await checker.checkUpdate(); + + expect(result.currentVersion, equals('1.0.0')); + expect(result.errorMessage, errorMessage); + expect(result.newVersion, isNull); + expect(result.canUpdate, isFalse); + }); + test('Error response from Apple Store', () async { + debugDefaultTargetPlatformOverride = TargetPlatform.iOS; + + when(mockHttpClient.get(any)) + .thenAnswer((_) async => http.Response('Error', 404)); + + final checker = InStoreAppVersionChecker( + currentVersion: '1.0.0', + appId: 'com.example.app', + httpClient: mockHttpClient, + ); + + final result = await checker.checkUpdate(); + + expect(result.errorMessage, isNotNull); + }); + }); + + group('AndroidS tore -', () { + group('Default -', () { + test('Successful check for Google Play Store', () async { + debugDefaultTargetPlatformOverride = TargetPlatform.android; + const vesion = '1.2.3'; + + when(mockHttpClient.get(any)).thenAnswer( + (_) async => http.Response(',[[["$vesion"]],', 200), + ); + + final checker = InStoreAppVersionChecker( + currentVersion: '1.0.0', + appId: 'com.example.app', + httpClient: mockHttpClient, + ); + + final result = await checker.checkUpdate(); + + expect(result.currentVersion, equals('1.0.0')); + expect(result.newVersion, equals(vesion)); + expect(result.canUpdate, isTrue); + }); + test('Error response as from Google Play Store', () async { + debugDefaultTargetPlatformOverride = TargetPlatform.android; + const errorMessage = "It's error"; + + when(mockHttpClient.get(any)).thenThrow(errorMessage); + + final checker = InStoreAppVersionChecker( + currentVersion: '1.0.0', + appId: 'com.example.app', + httpClient: mockHttpClient, + ); + + final result = await checker.checkUpdate(); + + expect(result.currentVersion, equals('1.0.0')); + expect(result.errorMessage, errorMessage); + expect(result.newVersion, isNull); + expect(result.canUpdate, isFalse); + }); + test('Error response from Google Play Store', () async { + debugDefaultTargetPlatformOverride = TargetPlatform.android; + + when(mockHttpClient.get(any)) + .thenAnswer((_) async => http.Response('Error', 404)); + + final checker = InStoreAppVersionChecker( + currentVersion: '1.0.0', + appId: 'com.example.app', + httpClient: mockHttpClient, + ); + + final result = await checker.checkUpdate(); + + expect(result.errorMessage, isNotNull); + expect(result.canUpdate, isFalse); + }); + }); + group('Apk Pure -', () { + test('Successful check for Google Play Store', () async { + debugDefaultTargetPlatformOverride = TargetPlatform.android; + const vesion = '1.2.3'; + + when(mockHttpClient.get(any)).thenAnswer( + (_) async => http.Response( + '
$vesionfor Android
', + 200, + ), + ); + + final checker = InStoreAppVersionChecker( + currentVersion: '1.0.0', + appId: 'com.example.app', + androidStore: AndroidStore.apkPure, + httpClient: mockHttpClient, + ); + + final result = await checker.checkUpdate(); + + expect(result.currentVersion, equals('1.0.0')); + expect(result.newVersion, equals(vesion)); + expect(result.canUpdate, isTrue); + }); + test('Error response as from Google Play Store', () async { + debugDefaultTargetPlatformOverride = TargetPlatform.android; + const errorMessage = "It's error"; + + when(mockHttpClient.get(any)).thenThrow(errorMessage); + + final checker = InStoreAppVersionChecker( + currentVersion: '1.0.0', + appId: 'com.example.app', + androidStore: AndroidStore.apkPure, + httpClient: mockHttpClient, + ); + + final result = await checker.checkUpdate(); + + expect(result.currentVersion, equals('1.0.0')); + expect(result.errorMessage, errorMessage); + expect(result.newVersion, isNull); + expect(result.canUpdate, isFalse); + }); + test('Error response from Google Play Store', () async { + debugDefaultTargetPlatformOverride = TargetPlatform.android; + + when(mockHttpClient.get(any)) + .thenAnswer((_) async => http.Response('Error', 404)); + + final checker = InStoreAppVersionChecker( + currentVersion: '1.0.0', + appId: 'com.example.app', + androidStore: AndroidStore.apkPure, + httpClient: mockHttpClient, + ); + + final result = await checker.checkUpdate(); + + expect(result.errorMessage, isNotNull); + expect(result.canUpdate, isFalse); + expect(result.toString(), isA()); + }); + }); + }); + }); +} diff --git a/tool/makefile/main.mk b/tool/makefile/main.mk deleted file mode 100644 index e26844a..0000000 --- a/tool/makefile/main.mk +++ /dev/null @@ -1,74 +0,0 @@ -.PHONY: doctor version clean-cache clean-and-generate fvm fluttergen l10n build-runner codegen gen upgrade upgrade outdated dependencies locales run-build-runner run-build-runner-watch - -# Check fvm flutter doctor -doctor: - @fvm flutter doctor - -# Check fvm flutter version -version: - @fvm flutter --version - - -# Clean the pub cache -clean-cache: - @echo "โ•  CLEAN PUB CACHE" - @fvm flutter pub cache repair - @echo "โ•  PUB CACHE CLEANED SUCCESSFULLY" - -# Clean all generated files and run build_runner:build -clean-and-generate: clean build-runner - -# Generate assets -fvm fluttergen: - @echo "โ•  RUN FLUTTERGEN..." - @fvm dart pub global activate fvm flutter_gen - @fvm fluttergen -c pubspec.yaml || (echo "โ–“โ–“ Fluttergen error โ–“โ–“"; exit 1) - @echo "โ•  FLUTTERGEN SUCCESSFULLY" - -# Generate localization -l10n: - @fvm dart pub global activate intl_utils - @(dart pub global run intl_utils:generate) - @(fvm flutter gen-l10n --arb-dir lib/src/core/localization --output-dir lib/src/core/localization/generated --template-arb-file intl_ru.arb) - -# Generate code -codegen: get fvm fluttergen l10n build_runner format - -# Fix code -fix: format - @fvm dart fix --apply lib - -# Generate all -gen: codegen - -# Upgrade dependencies -upgrade: - @echo "โ•  RUN UPGRADE DEPENDENCIES..." - @fvm flutter pub upgrade || (echo "โ–“โ–“ Upgrade error โ–“โ–“"; exit 1) - @echo "โ•  DEPENDENCIES UPGRADED SUCCESSFULLY" - -# Upgrade to major versions -upgrade-major: - @echo "โ•  RUN UPGRADE DEPENDENCIES TO MAJOR VERSIONS..." - @fvm flutter pub upgrade --major-versions - @echo "โ•  DEPENDENCIES UPGRADED SUCCESSFULLY" - -# Check outdated dependencies -outdated: get - @fvm flutter pub outdated - -# Check outdated dependencies -dependencies: upgrade - @fvm flutter pub outdated --dependency-overrides \ - --dev-dependencies --prereleases --show-all --transitive - -# Run build_runner:build -build-runner: - @echo "โ•  RUN BUILD RUNNER:BUILD" - @fvm dart --disable-analytics && dart run build_runner build --delete-conflicting-outputs --release - @echo "โ•  BUILD RUNNER:BUILD SUCCESSFULLY" - -# Run build_runner:watch -build-runner-watch: - @echo "โ•  RUN BUILD RUNNER:WATCH" - @fvm dart --disable-analytics && dart run build_runner watch --delete-conflicting-outputs \ No newline at end of file diff --git a/tool/makefile/pub.mk b/tool/makefile/pub.mk deleted file mode 100644 index f6353f2..0000000 --- a/tool/makefile/pub.mk +++ /dev/null @@ -1,34 +0,0 @@ -.PHONY: get format analyze check publish - -# Get dependencies -get: - @echo "โ•  RUN GET DEPENDENCIES..." - @flutter pub get || (echo "โ–“โ–“ Get dependencies error โ–“โ–“"; exit 1) - @echo "โ•  DEPENDENCIES GETED SUCCESSFULLY" - -# Format code -format: - @echo "โ•  RUN FORMAT THE CODE..." - @dart format --fix -l 80 . || (echo "โ–“โ–“ Format code error โ–“โ–“"; exit 1) - @(dart format --fix -l 80 . || (echo "โ–“โ–“ Format code error โ–“โ–“"; exit 2)) - @echo "โ•  CODE FORMATED SUCCESSFULLY" - -# Analyze code -analyze: get format - @echo "โ•  RUN ANALYZE THE CODE..." - @dart analyze --fatal-infos --fatal-warnings - @echo "โ•  ANALYZED CODE SUCCESSFULLY" - -# Check code -check: analyze - @echo "โ•  RUN CECK CODE..." - @dart pub publish --dry-run - @dart pub global activate pana - @pana --json --no-warning --line-length 80 > log.pana.json - @echo "โ•  CECKED CODE SUCCESSFULLY" - -# Publish package -publish: - @echo "โ•  RUN PUBLISHING..." - @dart pub publish --server=https://pub.dartlang.org || (echo "โ–“โ–“ Publish error โ–“โ–“"; exit 1) - @echo "โ•  PUBLISH PACKAGE SUCCESSFULLY" \ No newline at end of file diff --git a/tool/makefile/setup.mk b/tool/makefile/setup.mk deleted file mode 100644 index ac02500..0000000 --- a/tool/makefile/setup.mk +++ /dev/null @@ -1,38 +0,0 @@ -.PHONY: icons splash-screen init-firebase - -# Run generate launcher icons used https://pub.dev/packages/flutter_launcher_icons -icons: - @echo "โ•  CREATE ICONS" - @dart run flutter_launcher_icons:main -f flutter_launcher_icons* || (echo "โ–“โ–“ Create icons error โ–“โ–“"; exit 1) - @echo "โ•  ICONS CREATED SUCCESSFULLY" - -# Run generate app splash screen used https://pub.dev/packages/flutter_native_splash -splash-screen: - @echo "โ•  CREATE SPLASH SCREEN" - @dart run flutter_native_splash:create || (echo "โ–“โ–“ Create splash screen error โ–“โ–“"; exit 1) - @echo "โ•  SPLASH SCREEN CREATED SUCCESSFULLY" - -init-firebase: - @npm install -g firebase-tools - @firebase login - @firebase init -# @dart pub global activate flutterfire_cli -# @flutterfire configure \ -# -i tld.domain.app \ -# -m tld.domain.app \ -# -a tld.domain.app \ -# -p project \ -# -e email@gmail.com \ -# -o lib/src/common/constant/firebase_options.g.dart - -# "assets/images/products\/(\d+)\/(\d+)\.jpg" -#downscale-images: -# @cd assets/data/images -# @find . -name "*.jpg" -exec mogrify -format webp {} \; -# @find . -name "*.jpeg" -exec mogrify -format webp {} \; -# @find . -name "*.png" -exec mogrify -format webp {} \; -# @find . -name "*.jpg" -exec rm -f {} \; -# @find . -name "*.jpeg" -exec rm -f {} \; -# @find . -name "*.png" -exec rm -f {} \; -# @find . -type f \( -name "0.webp" -o -name "1.webp" -o -name "2.webp" -o -name "3.webp" -o -name "4.webp" -o -name "5.webp" -o -name "6.webp" -o -name "7.webp" -o -name "8.webp" -o -name "9.webp" \) -exec mogrify -resize '512x512>' -quality 80 {} \; -# @find . -name "thumbnail.webp" -exec mogrify -resize '256x256>' -quality 75 {} \; \ No newline at end of file diff --git a/tool/makefile/test.mk b/tool/makefile/test.mk deleted file mode 100644 index 08a1f1b..0000000 --- a/tool/makefile/test.mk +++ /dev/null @@ -1,17 +0,0 @@ -.PHONY: coverage genhtml test-unit - -# Runs get coverage -coverage: - @lcov --summary coverage/lcov.info - -# Runs generage coverage html -genhtml: - @genhtml coverage/lcov.info -o coverage/html - -# Runs unit tests -test-unit: - @echo "โ•  RUNNING UNIT TESTS..." - @flutter test --coverage || (echo "Error while running tests"; exit 1) - @genhtml coverage/lcov.info --output=coverage -o coverage/html || (echo "Error while running tests"; exit 2) - @echo "โ•  UNIT TESTS SUCCESSFULLY" -