build method
Build the dart binaries for the platform given in buildCmd
.
Implementation
Future<String> build() async {
await Directory(buildFolder).create(recursive: true);
final executable = '$buildFolder/$executableName';
await runProcess(
dartSdkPath,
[
'compile',
'exe',
mainPath,
'-o',
executable,
...buildArgs,
],
printCall: true,
// Must run in shell to correctly resolve paths on Windows
runInShell: true,
);
return executable;
}