diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index ff6aef1..85f80fa 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,7 +1,2 @@ ### What does this change? -### What is the value of this and can you measure success? - -### Screenshots (Optional) - - diff --git a/.github/workflows/flutter-ci.yml b/.github/workflows/flutter-ci.yaml similarity index 92% rename from .github/workflows/flutter-ci.yml rename to .github/workflows/flutter-ci.yaml index 2d7113f..33715a8 100644 --- a/.github/workflows/flutter-ci.yml +++ b/.github/workflows/flutter-ci.yaml @@ -13,7 +13,10 @@ jobs: - uses: actions/checkout@v2.3.4 - uses: subosito/flutter-action@v1 with: - channel: 'beta' + flutter-version: '2.5.2' + - uses: dart-lang/setup-dart@v1 + with: + sdk: '2.14.3' - name: Cache Gradle modules uses: actions/cache@v2.1.6 @@ -46,7 +49,7 @@ jobs: ${{ runner.os }}- - name: Get flutter dependencies. - run: make dependencies + run: make deps # - name: Check for any formatting and statically analyze the code. # run: make format-analyze diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 0000000..85e3bab --- /dev/null +++ b/.tool-versions @@ -0,0 +1,3 @@ +dart 2.14.3 +flutter 2.5.2-stable +nodejs 16.9.0 diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..0196a19 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,14 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Run example on main.dart", + "program": "${workspaceFolder}/example/lib/main.dart", + "request": "launch", + "type": "dart", + "args": [ + "--debug" + ] + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..fede2d1 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,4 @@ +{ + "dart.flutterSdkPath": "~/.asdf/installs/flutter/2.5.2-stable", + "dart.sdkPath": "~/.asdf/installs/dart/2.14.3/dart-sdk" +} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index a53bae0..81ecea9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 1.1.0 + +Dependencies +- Update Flutter to >=2.0.0 +- Update Dart to >=2.12.0 + ## 1.0.2 Bug Fix: diff --git a/Makefile b/Makefile index 324241b..2e3dd68 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,5 @@ -.PHONY: setup -setup: - flutter channel beta - flutter upgrade - flutter pub get - npm install - gem update cocoapods - cd ios/ && pod install && cd .. - -.PHONY: dependencies -dependencies: +.PHONY: deps +deps: flutter pub get .PHONY: analyze diff --git a/android/build.gradle b/android/build.gradle index f89e84f..bce527e 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,15 +1,15 @@ group 'jp.wasabeef.ua.client_hints' -version '1.0.3' +version '1.1.0' buildscript { - ext.kotlin_version = '1.4.20' + ext.kotlin_version = '1.5.30' repositories { google() jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:4.1.0' + classpath 'com.android.tools.build:gradle:7.0.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } diff --git a/example/android/build.gradle b/example/android/build.gradle index 916ea28..49e02fc 100644 --- a/example/android/build.gradle +++ b/example/android/build.gradle @@ -1,12 +1,12 @@ buildscript { - ext.kotlin_version = '1.4.20' + ext.kotlin_version = '1.5.30' repositories { google() jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:4.1.0' + classpath 'com.android.tools.build:gradle:7.0.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } diff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/example/android/gradle/wrapper/gradle-wrapper.properties index 4d9ca16..7c08e4f 100644 --- a/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/example/android/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists +zipStorePath=wrapper/dists \ No newline at end of file diff --git a/example/ios/Flutter/AppFrameworkInfo.plist b/example/ios/Flutter/AppFrameworkInfo.plist index 6b4c0f7..f2872cf 100644 --- a/example/ios/Flutter/AppFrameworkInfo.plist +++ b/example/ios/Flutter/AppFrameworkInfo.plist @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 8.0 + 9.0 diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 764e18a..37deaf1 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -1,6 +1,6 @@ PODS: - Flutter (1.0.0) - - ua_client_hints (1.0.0): + - ua_client_hints (1.1.0): - Flutter DEPENDENCIES: @@ -14,9 +14,9 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/ua_client_hints/ios" SPEC CHECKSUMS: - Flutter: 0e3d915762c693b495b44d77113d4970485de6ec - ua_client_hints: 4f9c8b4d4a919e7fc89dc5c76d6afcbcf7a2fa27 + Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a + ua_client_hints: 314de6b4221bf713b1a6a5fb8bc68917ad3eaaec PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c -COCOAPODS: 1.10.0 +COCOAPODS: 1.11.2 diff --git a/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata index 1d526a1..919434a 100644 --- a/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ + location = "self:"> diff --git a/example/lib/main.dart b/example/lib/main.dart index a8d90bf..8f9cd98 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -1,4 +1,3 @@ -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:ua_client_hints/ua_client_hints.dart'; @@ -39,7 +38,34 @@ void main() async { print("Sec-CH-UA-Full-Version :${header['Sec-CH-UA-Full-Version']}"); print("Sec-CH-UA-Mobile :${header['Sec-CH-UA-Mobile']}"); - return runApp(const MaterialApp( - home: Scaffold(body: Center(child: Text('User-Agent Client Hints'))), + return runApp(MaterialApp( + home: Scaffold( + appBar: AppBar( + title: const Text("User-Agent Client Hints"), + ), + body: Container( + child: ListView.separated( + padding: const EdgeInsets.only(top: 16), + shrinkWrap: true, + itemBuilder: (context, index) { + return Container( + padding: const EdgeInsets.symmetric(horizontal: 8), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + header.keys.elementAt(index), + style: const TextStyle(fontWeight: FontWeight.bold), + ), + Text( + header.values.elementAt(index), + ), + ], + )); + }, + separatorBuilder: (_, index) => const Divider(), + itemCount: header.length), + ), + ), )); } diff --git a/example/pubspec.lock b/example/pubspec.lock index 43a8c04..f2da221 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -7,56 +7,56 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.5.0-nullsafety.3" + version: "2.8.1" boolean_selector: dependency: transitive description: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.3" + version: "2.1.0" characters: dependency: transitive description: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.5" + version: "1.1.0" charcode: dependency: transitive description: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.3" + version: "1.3.1" clock: dependency: transitive description: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.3" + version: "1.1.0" collection: dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.15.0-nullsafety.5" + version: "1.15.0" effective_dart: dependency: "direct dev" description: name: effective_dart url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.3.2" fake_async: dependency: transitive description: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.3" + version: "1.2.0" flutter: dependency: "direct main" description: flutter @@ -73,21 +73,21 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.10-nullsafety.3" + version: "0.12.10" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.6" + version: "1.7.0" path: dependency: transitive description: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.0-nullsafety.3" + version: "1.8.0" sky_engine: dependency: transitive description: flutter @@ -99,63 +99,63 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.0-nullsafety.4" + version: "1.8.1" stack_trace: dependency: transitive description: name: stack_trace url: "https://pub.dartlang.org" source: hosted - version: "1.10.0-nullsafety.6" + version: "1.10.0" stream_channel: dependency: transitive description: name: stream_channel url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.3" + version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.3" + version: "1.1.0" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.3" + version: "1.2.0" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.19-nullsafety.6" + version: "0.4.2" typed_data: dependency: transitive description: name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.5" + version: "1.3.0" ua_client_hints: dependency: "direct main" description: path: ".." relative: true source: path - version: "1.0.3" + version: "1.1.0" vector_math: dependency: transitive description: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.5" + version: "2.1.0" sdks: - dart: ">=2.12.0-29.10.beta <3.0.0" - flutter: ">=1.22.0" + dart: ">=2.14.0 <3.0.0" + flutter: ">=2.5.0" diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 34f4b4d..fa3b65d 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -6,8 +6,8 @@ version: 1.0.0+1 publish_to: 'none' environment: - sdk: '>=2.11.0 <3.0.0' - flutter: '>=1.22.0' + sdk: '>=2.14.0 <3.0.0' + flutter: '>=2.5.0' dependencies: flutter: @@ -19,7 +19,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - effective_dart: ^1.3.0 + effective_dart: ^1.3.2 flutter: uses-material-design: true diff --git a/ios/ua_client_hints.podspec b/ios/ua_client_hints.podspec index f3c5dcb..383ef1c 100644 --- a/ios/ua_client_hints.podspec +++ b/ios/ua_client_hints.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'ua_client_hints' - s.version = '1.0.3' + s.version = '1.1.0' s.summary = 'Provide User-Agent Client Hints plugin.' s.description = <<-DESC Provide User-Agent Client Hints plugin. diff --git a/package-lock.json b/package-lock.json index a5f3a5c..1787cc3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,7 +1,30 @@ { "name": "ua_client_hints", + "lockfileVersion": 2, "requires": true, - "lockfileVersion": 1, + "packages": { + "": { + "name": "ua_client_hints", + "devDependencies": { + "husky": "^7.0.2" + } + }, + "node_modules/husky": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/husky/-/husky-7.0.2.tgz", + "integrity": "sha512-8yKEWNX4z2YsofXAMT7KvA1g8p+GxtB1ffV8XtpAEGuXNAbCV5wdNKH+qTpw8SM9fh4aMPDR+yQuKfgnreyZlg==", + "dev": true, + "bin": { + "husky": "lib/bin.js" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/typicode" + } + } + }, "dependencies": { "husky": { "version": "7.0.2", diff --git a/pubspec.lock b/pubspec.lock index ee5f3a5..10cce73 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -7,56 +7,56 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.5.0-nullsafety.3" + version: "2.8.1" boolean_selector: dependency: transitive description: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.3" + version: "2.1.0" characters: dependency: transitive description: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.5" + version: "1.1.0" charcode: dependency: transitive description: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.3" + version: "1.3.1" clock: dependency: transitive description: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.3" + version: "1.1.0" collection: dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.15.0-nullsafety.5" + version: "1.15.0" effective_dart: dependency: "direct dev" description: name: effective_dart url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.3.2" fake_async: dependency: transitive description: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.3" + version: "1.2.0" flutter: dependency: "direct main" description: flutter @@ -73,21 +73,21 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.10-nullsafety.3" + version: "0.12.10" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.6" + version: "1.7.0" path: dependency: transitive description: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.0-nullsafety.3" + version: "1.8.0" sky_engine: dependency: transitive description: flutter @@ -99,56 +99,56 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.0-nullsafety.4" + version: "1.8.1" stack_trace: dependency: transitive description: name: stack_trace url: "https://pub.dartlang.org" source: hosted - version: "1.10.0-nullsafety.6" + version: "1.10.0" stream_channel: dependency: transitive description: name: stream_channel url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.3" + version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.3" + version: "1.1.0" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.3" + version: "1.2.0" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.19-nullsafety.6" + version: "0.4.2" typed_data: dependency: transitive description: name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.5" + version: "1.3.0" vector_math: dependency: transitive description: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.5" + version: "2.1.0" sdks: - dart: ">=2.12.0-29.10.beta <3.0.0" - flutter: ">=1.22.0" + dart: ">=2.12.0 <3.0.0" + flutter: ">=2.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 230ae0d..8e0529a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,15 +1,14 @@ name: ua_client_hints description: Provide User-Agent Client Hints to Flutter. -version: 1.0.3 -author: Daichi Furiya +version: 1.1.0 homepage: https://github.com/wasabeef/flutter_ua_client_hints repository: https://github.com/wasabeef/flutter_ua_client_hints documentation: https://github.com/wasabeef/flutter_ua_client_hints issue_tracker: https://github.com/wasabeef/flutter_ua_client_hints/issues environment: - sdk: '>=2.12.0-29.10.beta <3.0.0' - flutter: '>=1.22.0' + sdk: '>=2.12.0 <3.0.0' + flutter: '>=2.0.0' dependencies: flutter: @@ -19,7 +18,7 @@ dev_dependencies: flutter_test: sdk: flutter - effective_dart: ^1.3.0 + effective_dart: ^1.3.2 flutter: plugin: