Skip to content

Commit

Permalink
feature: Dart 2.x ready
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeMitterer committed Jun 6, 2018
1 parent 0603004 commit b8bc367
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 13 deletions.
File renamed without changes.
8 changes: 4 additions & 4 deletions bin/commands/ShellCommand.dart
Expand Up @@ -42,8 +42,8 @@ abstract class ShellCommand {
Map<String, String> 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,
Expand All @@ -56,8 +56,8 @@ abstract class ShellCommand {
Map<String, String> 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,
Expand Down
11 changes: 9 additions & 2 deletions build.jenkins
Expand Up @@ -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'
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions lib/l10n/L10NImpl.dart
Expand Up @@ -85,7 +85,7 @@ class L10NImpl implements L10N {

@override
String toString() {
return JSON.encode(toJson());
return json.encode(toJson());
}

String toPrettyString() {
Expand All @@ -104,7 +104,7 @@ class L10NImpl implements L10N {
return data as Map<String, dynamic>;

} else if(data is String) {
return JSON.decode(data) as Map<String, dynamic>;
return json.decode(data) as Map<String, dynamic>;
}

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}");
Expand Down
2 changes: 2 additions & 0 deletions lib/parser/Lexer.dart
Expand Up @@ -324,6 +324,8 @@ class Lexer {
return _character;
}

/// Keep as a reminder!
// ignore: unused_element
String _readStringParam() {
String value = "";
TokenizeState subState = TokenizeState.DEFAULT;
Expand Down
2 changes: 1 addition & 1 deletion lib/parser/pot.dart
Expand Up @@ -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);
};
}

Expand Down
9 changes: 5 additions & 4 deletions pubspec.yaml
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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

File renamed without changes.

0 comments on commit b8bc367

Please sign in to comment.