OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012, the Dart project authors. | 2 * Copyright (c) 2012, the Dart project authors. |
3 * | 3 * |
4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u
se this file except | 4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u
se this file except |
5 * in compliance with the License. You may obtain a copy of the License at | 5 * in compliance with the License. You may obtain a copy of the License at |
6 * | 6 * |
7 * http://www.eclipse.org/legal/epl-v10.html | 7 * http://www.eclipse.org/legal/epl-v10.html |
8 * | 8 * |
9 * Unless required by applicable law or agreed to in writing, software distribut
ed under the License | 9 * Unless required by applicable law or agreed to in writing, software distribut
ed under the License |
10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K
IND, either express | 10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K
IND, either express |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 | 310 |
311 // If we have a snapshot, use that. | 311 // If we have a snapshot, use that. |
312 if (snapshotCompiler != null && snapshotCompiler.getDestFile().exists()) { | 312 if (snapshotCompiler != null && snapshotCompiler.getDestFile().exists()) { |
313 args.add(snapshotCompiler.getDestFile().getPath()); | 313 args.add(snapshotCompiler.getDestFile().getPath()); |
314 } else { | 314 } else { |
315 args.add(builderFile.getName()); | 315 args.add(builderFile.getName()); |
316 } | 316 } |
317 | 317 |
318 args.addAll(buildArgs); | 318 args.addAll(buildArgs); |
319 | 319 |
| 320 //TODO (danrubel): Older build.dart may rely on DART_SDK env var... so leave
for now |
320 Map<String, String> env = builder.environment(); | 321 Map<String, String> env = builder.environment(); |
321 DartSdk sdk = DartSdkManager.getManager().getSdk(); | 322 DartSdk sdk = DartSdkManager.getManager().getSdk(); |
322 env.put("DART_SDK", sdk.getDirectory().getAbsolutePath()); | 323 env.put("DART_SDK", sdk.getDirectory().getAbsolutePath()); |
323 | 324 |
324 builder.command(args); | 325 builder.command(args); |
325 builder.directory(container.getLocation().toFile()); | 326 builder.directory(container.getLocation().toFile()); |
326 builder.redirectErrorStream(true); | 327 builder.redirectErrorStream(true); |
327 | 328 |
328 ProcessRunner runner = new ProcessRunner(builder); | 329 ProcessRunner runner = new ProcessRunner(builder); |
329 | 330 |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
580 /** | 581 /** |
581 * @return whether we should invoke any build.dart files in the given project | 582 * @return whether we should invoke any build.dart files in the given project |
582 */ | 583 */ |
583 private boolean shouldRunAnyBuildDart(IProject project) { | 584 private boolean shouldRunAnyBuildDart(IProject project) { |
584 boolean disableBuilder = DartCore.getPlugin().getDisableDartBasedBuilder(pro
ject); | 585 boolean disableBuilder = DartCore.getPlugin().getDisableDartBasedBuilder(pro
ject); |
585 | 586 |
586 return !disableBuilder; | 587 return !disableBuilder; |
587 } | 588 } |
588 | 589 |
589 } | 590 } |
OLD | NEW |