diff --git a/.drone.yml b/.drone.yml index 059ac6b..57a906f 100644 --- a/.drone.yml +++ b/.drone.yml @@ -3,7 +3,7 @@ name: default steps: - name: prepare - image: v7lin/flutter:1.0.0-stable + image: v7lin/flutter:1.2.1-stable volumes: - name: pub-cache path: /opt/flutter/.pub-cache @@ -11,7 +11,7 @@ steps: - flutter packages get - name: analyze - image: v7lin/flutter:1.0.0-stable + image: v7lin/flutter:1.2.1-stable volumes: - name: pub-cache path: /opt/flutter/.pub-cache @@ -19,16 +19,17 @@ steps: - flutter analyze - name: test - image: v7lin/flutter:1.0.0-stable + image: v7lin/flutter:1.2.1-stable volumes: - name: pub-cache path: /opt/flutter/.pub-cache commands: + - flutter test - pushd example/ - flutter test - name: publish-check - image: v7lin/flutter:1.0.0-stable + image: v7lin/flutter:1.2.1-stable volumes: - name: pub-cache path: /opt/flutter/.pub-cache diff --git a/analysis_options.yaml b/analysis_options.yaml index 8383c4a..cd9690c 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -19,6 +19,10 @@ analyzer: # 'super_goes_last' is a deprecated lint rule and should not be used • included_file_warning included_file_warning: ignore + # 过滤 jaguar_serializer + exclude: + - "**/*.jser.dart" + linter: rules: # these rules are documented on and in the same order as diff --git a/android/build.gradle b/android/build.gradle index 44e0b02..b90aa9c 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -27,7 +27,7 @@ rootProject.allprojects { apply plugin: 'com.android.library' android { - compileSdkVersion 27 + compileSdkVersion 28 defaultConfig { minSdkVersion 16 diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index b37b6f7..d5d7601 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -25,7 +25,7 @@ apply plugin: 'com.android.application' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion 27 + compileSdkVersion 28 lintOptions { disable 'InvalidPackage' @@ -35,7 +35,7 @@ android { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "io.github.v7lin.fakeweiboexample" minSdkVersion 16 - targetSdkVersion 27 + targetSdkVersion 28 versionCode flutterVersionCode.toInteger() versionName flutterVersionName testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 1145e2d..6080fa2 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -3,7 +3,7 @@ description: Demonstrates how to use the fake_weibo plugin. publish_to: 'none' environment: - sdk: ">=2.0.0-dev.68.0 <3.0.0" + sdk: ">=2.1.0 <3.0.0" dependencies: flutter: diff --git a/pubspec.yaml b/pubspec.yaml index 2110887..2440581 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -5,7 +5,7 @@ author: v7lin homepage: https://github.com/v7lin/fake_weibo environment: - sdk: ">=2.0.0-dev.68.0 <3.0.0" + sdk: ">=2.1.0 <3.0.0" dependencies: flutter: @@ -13,12 +13,17 @@ dependencies: meta: ^1.1.6 + jaguar_serializer: ^2.2.12 + dev_dependencies: flutter_test: sdk: flutter pedantic: '>=1.4.0 <3.0.0' + build_runner: ^1.2.3 + jaguar_serializer_cli: ^2.2.5 + # For information on the generic Dart part of this file, see the # following page: https://www.dartlang.org/tools/pub/pubspec diff --git a/test/jaguar_test.dart b/test/jaguar_test.dart new file mode 100644 index 0000000..ab1e2bc --- /dev/null +++ b/test/jaguar_test.dart @@ -0,0 +1,26 @@ +import 'package:flutter_test/flutter_test.dart'; +import 'package:jaguar_serializer/jaguar_serializer.dart'; + +void main() { + test('smoke test - snake case', () { + print('${toSnakeCase('oneField')}'); + print('${toSnakeCase('oneField_street')}'); + print('${toSnakeCase('one_field')}'); + }); + + test('smoke test - kebab case', () { + print('${toKebabCase('oneField')}'); + print('${toKebabCase('oneField_street')}'); + print('${toKebabCase('one_field')}'); + }); + + test('smoke test - camel case', () { + print('${toCamelCase('oneField')}'); + print('${toCamelCase('oneField_street')}'); + print('${toCamelCase('one_field')}'); + }); + + test('smoke test - jaguar_serializer', () { + + }); +}