Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,11 @@ public CppToolRunTask(ObjectFactory objects, ExecOperations execOperations) {
@TaskAction
public void runTool() {
boolean isWindows = OperatingSystem.current().isWindows();
boolean isMac = OperatingSystem.current().isMacOsX();
if (isWindows) {
runToolWindows();
} else if (isMac) {
runToolMac();
} else {
runToolUnix();
}
Expand Down Expand Up @@ -86,6 +89,18 @@ private void runToolUnix() {
});
}

private void runToolMac() {
Directory toolsFolder = this.toolsFolder.get();
String toolName = this.toolName.get();
String toolApp = toolName + ".app";
File outputFile = toolsFolder.file(toolApp).getAsFile();
String argPath = getArgumentPath(toolName.toLowerCase());
operations.exec(spec -> {
spec.setExecutable("open");
spec.args(outputFile.getAbsolutePath(), "--args", argPath);
});
}

@Override
@Internal
public Provider<String> getSingletonName() {
Expand Down
Loading