From bc72577e277cf59fe672d4d048545a5c505f1a9d Mon Sep 17 00:00:00 2001 From: 9oya Date: Sun, 16 Apr 2023 22:16:02 +0900 Subject: [PATCH 1/2] build: Update version to 1.0.2 - Update a dependency to the latest release. --- CHANGELOG.md | 3 +++ README.md | 6 +++--- example/pubspec.lock | 2 +- pubspec.yaml | 4 ++-- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b377c85..f5119d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 1.0.2 +* Update a dependency to the latest release. + ## 1.0.1 * Update a dependency to the latest release. diff --git a/README.md b/README.md index b5ca35e..32348be 100644 --- a/README.md +++ b/README.md @@ -7,10 +7,10 @@ flutter packages pub run build_runner build # if you want to delete the generated files before building -# > flutter packages pub run build_runner build --delete-conflicting-outputs +flutter packages pub run build_runner build --delete-conflicting-outputs -# if generated files are not updated after modifying the CSV file, run the following command -# > flutter pub run build_runner clean +# if generated files are not updated after modifying the CSV file +flutter pub run build_runner clean ``` ## Basic Usage The builders generate code when they find members annotated with `@AnalyticsLogger`. diff --git a/example/pubspec.lock b/example/pubspec.lock index 7e938f6..b371074 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -31,7 +31,7 @@ packages: path: ".." relative: true source: path - version: "1.0.0" + version: "1.0.2" analyzer: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index c87aca3..466c58e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: analytics_logger_gen description: analytics_logger_gen is a Flutter plugin that generates an integrated event logger for various analytics tools including Firebase, AppsFlyer, Amplitude, Mixpanel, Singular, and DataDog. Import data from Google Spreadsheets, remote repositories, or local CSV files. -version: 1.0.1 +version: 1.0.2 homepage: https://github.com/9oya repository: https://github.com/9oya/analytics_logger_gen issue_tracker: https://github.com/9oya/analytics_logger_gen/issues @@ -17,7 +17,7 @@ environment: dependencies: flutter: sdk: flutter - analyzer: ^5.0.0 + analyzer: ^5.1.0 build: ^2.3.1 source_gen: ^1.2.7 http: ^0.13.5 From 3f8584e629d07b1f232c722a3d7989a878c5424f Mon Sep 17 00:00:00 2001 From: 9oya Date: Sun, 16 Apr 2023 22:39:44 +0900 Subject: [PATCH 2/2] fix: dart analysis --- README.md | 2 +- lib/src/analytics_logger.dart | 1 - lib/src/analytics_logger_generator.dart | 9 ++++----- pubspec.yaml | 2 +- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 32348be..5e81f9f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # analytics_logger_gen -[analytics_logger_gen](https://github.com/9oya/analytics_logger_gen) is a Flutter plugin that generates an integrated event logger for various analytics tools including Firebase, AppsFlyer, Amplitude, Mixpanel, Singular, and DataDog. Import data from Google Spreadsheets, remote repositories, or local CSV files. +[analytics_logger_gen](https://github.com/9oya/analytics_logger_gen) is a code generator that generates an event logger for analytics tools like FirebaseAnalytics and AppsFlyer. Import data from Google Spreadsheets, remote repositories or CSV files. ## Running the generator ```shell diff --git a/lib/src/analytics_logger.dart b/lib/src/analytics_logger.dart index 416a501..9b84ff4 100644 --- a/lib/src/analytics_logger.dart +++ b/lib/src/analytics_logger.dart @@ -1,4 +1,3 @@ - /// The [AnalyticsLogger] annotation is used to generate the logger class. class AnalyticsLogger { /// When [localCsvPath] is provided, the logger and events will be diff --git a/lib/src/analytics_logger_generator.dart b/lib/src/analytics_logger_generator.dart index 400e948..0171c46 100644 --- a/lib/src/analytics_logger_generator.dart +++ b/lib/src/analytics_logger_generator.dart @@ -107,7 +107,8 @@ class AnalyticsLoggerGenerator extends GeneratorForAnnotation { 'The event flag names for the \'$_eventLoggerColumnName\' in the header row ($headerRows) of the CSV file do not match those declared in the @AnalyticsLogger annotation.'); } - int _indexOfEventLoggerName = headerRows.indexOf(_eventLoggerColumnName); + int _indexOfEventLoggerName = + headerRows.indexOf(_eventLoggerColumnName); String _eventFlagKey = headerRows[_indexOfEventLoggerName]; String _eventFlag = 'false'; if (bodyRows[i][_eventFlagKey] != null) { @@ -207,8 +208,7 @@ class AnalyticsLoggerGenerator extends GeneratorForAnnotation { buffer.writeln('Map attributes = {'); buffer.writeln(paramsDict); buffer.writeln('};'); - buffer.writeln( - '$className.logEvent($_enumName.$eventName, attributes);'); + buffer.writeln('$className.logEvent($_enumName.$eventName, attributes);'); buffer.writeln('}'); } buffer.writeln('}'); @@ -224,8 +224,7 @@ class AnalyticsLoggerGenerator extends GeneratorForAnnotation { buffer.writeln('static void setup() {'); for (String _loggerName in eventLoggerNamesDict.keys) { - buffer.writeln( - '${_loggerName.toLowerFirstCase()}.setup();'); + buffer.writeln('${_loggerName.toLowerFirstCase()}.setup();'); } buffer.writeln('}'); diff --git a/pubspec.yaml b/pubspec.yaml index 466c58e..7907294 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: analytics_logger_gen -description: analytics_logger_gen is a Flutter plugin that generates an integrated event logger for various analytics tools including Firebase, AppsFlyer, Amplitude, Mixpanel, Singular, and DataDog. Import data from Google Spreadsheets, remote repositories, or local CSV files. +description: analytics_logger_gen generates an event logger for analytics tools like FirebaseAnalytics and AppsFlyer. Import data from Google Spreadsheets, remote repositories or CSV files. version: 1.0.2 homepage: https://github.com/9oya repository: https://github.com/9oya/analytics_logger_gen