blob: 7158e8047e72a73e2688a818d4c9419edb7d8065 [file] [log] [blame]
Mads Ager418d1ca2017-05-22 09:35:49 +02001// Copyright (c) 2016, the R8 project authors. Please see the AUTHORS file
2// for details. All rights reserved. Use of this source code is governed by a
3// BSD-style license that can be found in the LICENSE file.
4package utils;
5
Jean-Marie Henaff34d85f72017-06-14 10:32:04 +02006import java.io.File;
7
Mads Ager418d1ca2017-05-22 09:35:49 +02008public class Utils {
9 public static String toolsDir() {
Jean-Marie Henaff39587a82017-06-08 15:20:13 +020010 String osName = System.getProperty("os.name");
11 if (osName.equals("Mac OS X")) {
12 return "mac";
13 } else if (osName.contains("Windows")) {
14 return "windows";
15 } else {
16 return "linux";
17 }
Mads Ager418d1ca2017-05-22 09:35:49 +020018 }
Jean-Marie Henaff34d85f72017-06-14 10:32:04 +020019
20 public static File dexMergerExecutable() {
21 String executableName = Utils.toolsDir().equals("windows") ? "dexmerger.bat" : "dexmerger";
22 return new File("tools/" + Utils.toolsDir() + "/dx/bin/" + executableName);
23 }
24}