diff --git a/.analysis_options b/.analysis_options.yaml similarity index 100% rename from .analysis_options rename to .analysis_options.yaml diff --git a/bin/commands/ShellCommand.dart b/bin/commands/ShellCommand.dart index 78dffe0..86904e2 100644 --- a/bin/commands/ShellCommand.dart +++ b/bin/commands/ShellCommand.dart @@ -42,8 +42,8 @@ abstract class ShellCommand { Map environment, bool includeParentEnvironment: true, bool runInShell: false, - Encoding stdoutEncoding: SYSTEM_ENCODING, - Encoding stderrEncoding: SYSTEM_ENCODING}) => + Encoding stdoutEncoding: systemEncoding, + Encoding stderrEncoding: systemEncoding}) => Process.run(executable, arguments, workingDirectory: workingDirectory, includeParentEnvironment: includeParentEnvironment, @@ -56,8 +56,8 @@ abstract class ShellCommand { Map environment, bool includeParentEnvironment: true, bool runInShell: false, - Encoding stdoutEncoding: SYSTEM_ENCODING, - Encoding stderrEncoding: SYSTEM_ENCODING}) => + Encoding stdoutEncoding: systemEncoding, + Encoding stderrEncoding: systemEncoding}) => Process.runSync(executable, arguments, workingDirectory: workingDirectory, includeParentEnvironment: includeParentEnvironment, diff --git a/build.jenkins b/build.jenkins index 6ad840b..f0ea255 100644 --- a/build.jenkins +++ b/build.jenkins @@ -8,15 +8,22 @@ pipeline { timeout(time: 15, unit: 'MINUTES') { ansiColor('xterm') { sh 'pub update' - sh 'pub global activate grinder' } } } } + stage('Analyze') { + steps { + ansiColor('xterm') { + sh 'dartanalyzer bin/' + sh 'dartanalyzer lib/' + } + } + } stage('Test') { steps { ansiColor('xterm') { - sh 'pub run test' + sh 'pub run build_runner test' } } } diff --git a/lib/l10n/L10NImpl.dart b/lib/l10n/L10NImpl.dart index 488eef3..43f5fe2 100644 --- a/lib/l10n/L10NImpl.dart +++ b/lib/l10n/L10NImpl.dart @@ -85,7 +85,7 @@ class L10NImpl implements L10N { @override String toString() { - return JSON.encode(toJson()); + return json.encode(toJson()); } String toPrettyString() { @@ -104,7 +104,7 @@ class L10NImpl implements L10N { return data as Map; } else if(data is String) { - return JSON.decode(data) as Map; + return json.decode(data) as Map; } throw new ArgumentError("$data is not a valid basis for a JSON-Map. Data should be either a String or a Map but was ${data.runtimeType}"); diff --git a/lib/parser/Lexer.dart b/lib/parser/Lexer.dart index 1d37337..c704f20 100644 --- a/lib/parser/Lexer.dart +++ b/lib/parser/Lexer.dart @@ -324,6 +324,8 @@ class Lexer { return _character; } + /// Keep as a reminder! + // ignore: unused_element String _readStringParam() { String value = ""; TokenizeState subState = TokenizeState.DEFAULT; diff --git a/lib/parser/pot.dart b/lib/parser/pot.dart index 5efe1e1..0b117ac 100644 --- a/lib/parser/pot.dart +++ b/lib/parser/pot.dart @@ -173,7 +173,7 @@ POTVisitor WritePOTVisitor(final Logger logger, final File file) { buffer.writeln(); logger.fine(buffer.toString().replaceFirst(new RegExp(r"\n$"), "")); - file.writeAsStringSync(buffer.toString(),mode: FileMode.WRITE_ONLY_APPEND,flush: true); + file.writeAsStringSync(buffer.toString(),mode: FileMode.writeOnlyAppend,flush: true); }; } diff --git a/pubspec.yaml b/pubspec.yaml index b2f5428..860355d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -16,8 +16,6 @@ executables: mkl10n: dependencies: - browser: ^0.10.0 - logging: '>=0.11.3 <1.0.0' console_log_handler: '>=0.5.0 <1.0.0' # path: /Volumes/Daten/DevLocal/DevDart/ConsoleLogHandler @@ -26,7 +24,7 @@ dependencies: validate: ^1.0.0 - args: ^0.13.0 + args: ^1.0.0 dryice: ^1.8.0 # path: /Volumes/Daten/DevLocal/DevDart/dice @@ -38,6 +36,9 @@ dependencies: optional: ^1.2.0 dev_dependencies: - grinder: any test: any + build_runner: ^0.8.0 + build_test: ^0.10.0 + build_web_compilers: ^0.4.0 + diff --git a/tool/grind.dart b/tool/grind.dart.off similarity index 100% rename from tool/grind.dart rename to tool/grind.dart.off