diff --git a/app/build.yaml b/app/build.yaml index e04d58fd..10317e58 100644 --- a/app/build.yaml +++ b/app/build.yaml @@ -8,7 +8,7 @@ targets: new_sql_code_generation: true scoped_dart_components: true generate_connect_constructor: true - to_string: + to_string_build: options: formatStringNameMapping: double: "${$?.toStringAsFixed(3)}" diff --git a/app/pubspec.lock b/app/pubspec.lock index e63e6431..2d5cb934 100644 --- a/app/pubspec.lock +++ b/app/pubspec.lock @@ -834,12 +834,19 @@ packages: source: hosted version: "2.0.1" np_codegen: - dependency: "direct dev" + dependency: "direct main" description: path: "../codegen" relative: true source: path version: "1.0.0" + np_codegen_build: + dependency: "direct dev" + description: + path: "../codegen_build" + relative: true + source: path + version: "1.0.0" octo_image: dependency: transitive description: @@ -1287,11 +1294,20 @@ packages: source: hosted version: "1.0.0" to_string: + dependency: "direct main" + description: + path: to_string + ref: HEAD + resolved-ref: "104d4bf9db5ed8982ffb802c0acaaf1a3f0acf3a" + url: "https://gitlab.com/nkming2/dart-to-string" + source: git + version: "1.0.0" + to_string_build: dependency: "direct dev" description: - path: "." - ref: "1c8c2df0eace366a87eb5a5642b4528f3d7af3f4" - resolved-ref: "1c8c2df0eace366a87eb5a5642b4528f3d7af3f4" + path: to_string_build + ref: HEAD + resolved-ref: "104d4bf9db5ed8982ffb802c0acaaf1a3f0acf3a" url: "https://gitlab.com/nkming2/dart-to-string" source: git version: "1.0.0" diff --git a/app/pubspec.yaml b/app/pubspec.yaml index db782dbc..6a307248 100644 --- a/app/pubspec.yaml +++ b/app/pubspec.yaml @@ -87,6 +87,8 @@ dependencies: native_device_orientation: ^1.1.0 nc_photos_plugin: path: ../plugin + np_codegen: + path: ../codegen page_view_indicators: ^2.0.0 path: ^1.8.0 path_provider: ^2.0.6 @@ -97,6 +99,11 @@ dependencies: sqlite3: any sqlite3_flutter_libs: ^0.5.8 synchronized: ^3.0.0 + to_string: + git: + url: https://gitlab.com/nkming2/dart-to-string + ref: HEAD + path: to_string tuple: ^2.0.0 url_launcher: ^6.0.3 uuid: ^3.0.6 @@ -123,12 +130,13 @@ dev_dependencies: sdk: flutter # integration_test: # sdk: flutter - np_codegen: - path: ../codegen - to_string: + np_codegen_build: + path: ../codegen_build + to_string_build: git: url: https://gitlab.com/nkming2/dart-to-string - ref: 1c8c2df0eace366a87eb5a5642b4528f3d7af3f4 + ref: HEAD + path: to_string_build # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec diff --git a/codegen/pubspec.yaml b/codegen/pubspec.yaml index 7f0b2a84..f7b58d4c 100644 --- a/codegen/pubspec.yaml +++ b/codegen/pubspec.yaml @@ -6,17 +6,5 @@ version: 1.0.0 environment: sdk: '>=2.17.0 <3.0.0' -dependencies: - analyzer: '>=4.0.0' - build: ^2.3.1 - source_gen: ^1.2.6 - dev_dependencies: - build_test: ^2.1.5 lints: ^2.0.0 - test: ^1.16.0 - code_gen_tester: - git: - url: https://github.com/rrousselGit/functional_widget - ref: v0.10.0 - path: packages/code_gen_tester diff --git a/codegen_build/.gitignore b/codegen_build/.gitignore new file mode 100644 index 00000000..65c34dc8 --- /dev/null +++ b/codegen_build/.gitignore @@ -0,0 +1,10 @@ +# Files and directories created by pub. +.dart_tool/ +.packages + +# Conventional directory for build outputs. +build/ + +# Omit committing pubspec.lock for library packages; see +# https://dart.dev/guides/libraries/private-files#pubspeclock. +pubspec.lock diff --git a/codegen_build/analysis_options.yaml b/codegen_build/analysis_options.yaml new file mode 100644 index 00000000..dee8927a --- /dev/null +++ b/codegen_build/analysis_options.yaml @@ -0,0 +1,30 @@ +# This file configures the static analysis results for your project (errors, +# warnings, and lints). +# +# This enables the 'recommended' set of lints from `package:lints`. +# This set helps identify many issues that may lead to problems when running +# or consuming Dart code, and enforces writing Dart using a single, idiomatic +# style and format. +# +# If you want a smaller set of lints you can change this to specify +# 'package:lints/core.yaml'. These are just the most critical lints +# (the recommended set includes the core lints). +# The core lints are also what is used by pub.dev for scoring packages. + +include: package:lints/recommended.yaml + +# Uncomment the following section to specify additional rules. + +# linter: +# rules: +# - camel_case_types + +# analyzer: +# exclude: +# - path/to/excluded/files/** + +# For more information about the core and recommended set of lints, see +# https://dart.dev/go/core-lints + +# For additional information about configuring this file, see +# https://dart.dev/guides/language/analysis-options diff --git a/codegen/build.yaml b/codegen_build/build.yaml similarity index 83% rename from codegen/build.yaml rename to codegen_build/build.yaml index 5d1ceab3..37c266ea 100644 --- a/codegen/build.yaml +++ b/codegen_build/build.yaml @@ -1,6 +1,6 @@ builders: - np_log: - import: "package:np_codegen/builder.dart" + np_log_build: + import: "package:np_codegen_build/builder.dart" builder_factories: ["npLogBuilder"] # The `partId` argument to `SharedPartBuilder` is "some_cool_builder" build_extensions: {".dart": [".np_log.g.part"]} diff --git a/codegen/lib/builder.dart b/codegen_build/lib/builder.dart similarity index 74% rename from codegen/lib/builder.dart rename to codegen_build/lib/builder.dart index 55d4cbb2..699b99c8 100644 --- a/codegen/lib/builder.dart +++ b/codegen_build/lib/builder.dart @@ -1,5 +1,5 @@ import 'package:build/build.dart'; -import 'package:np_codegen/src/np_log_generator.dart'; +import 'package:np_codegen_build/src/np_log_generator.dart'; import 'package:source_gen/source_gen.dart'; Builder npLogBuilder(BuilderOptions options) => diff --git a/codegen/lib/src/np_log_generator.dart b/codegen_build/lib/src/np_log_generator.dart similarity index 96% rename from codegen/lib/src/np_log_generator.dart rename to codegen_build/lib/src/np_log_generator.dart index 352c4067..a7cc05ee 100644 --- a/codegen/lib/src/np_log_generator.dart +++ b/codegen_build/lib/src/np_log_generator.dart @@ -1,6 +1,6 @@ import 'package:analyzer/dart/element/element.dart'; import 'package:build/build.dart'; -import 'package:np_codegen/src/np_log_annotations.dart'; +import 'package:np_codegen/np_codegen.dart'; import 'package:source_gen/source_gen.dart'; /// Add a properly tagged logger to a class or extension diff --git a/codegen_build/pubspec.yaml b/codegen_build/pubspec.yaml new file mode 100644 index 00000000..26a37027 --- /dev/null +++ b/codegen_build/pubspec.yaml @@ -0,0 +1,25 @@ +name: np_codegen_build +description: A starting point for Dart libraries or applications. +version: 1.0.0 +# homepage: https://www.example.com +publish_to: none + +environment: + sdk: '>=2.17.0 <3.0.0' + +dependencies: + analyzer: '>=4.0.0' + build: ^2.3.1 + np_codegen: + path: ../codegen + source_gen: ^1.2.6 + +dev_dependencies: + build_test: ^2.1.5 + lints: ^2.0.0 + test: ^1.16.0 + code_gen_tester: + git: + url: https://github.com/rrousselGit/functional_widget + ref: v0.10.0 + path: packages/code_gen_tester diff --git a/codegen/test/np_log_test.dart b/codegen_build/test/np_log_test.dart similarity index 92% rename from codegen/test/np_log_test.dart rename to codegen_build/test/np_log_test.dart index 616f77af..2dc84ed7 100644 --- a/codegen/test/np_log_test.dart +++ b/codegen_build/test/np_log_test.dart @@ -1,5 +1,5 @@ import 'package:code_gen_tester/code_gen_tester.dart'; -import 'package:np_codegen/src/np_log_generator.dart'; +import 'package:np_codegen_build/src/np_log_generator.dart'; import 'package:test/test.dart'; // dummy class to free us from importing the actual logger library diff --git a/codegen/test/src/np_log.dart b/codegen_build/test/src/np_log.dart similarity index 100% rename from codegen/test/src/np_log.dart rename to codegen_build/test/src/np_log.dart