1 // 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. 4 package utils; 5 6 import java.io.File; 7 8 public class Utils { toolsDir()9 public static String toolsDir() { 10 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 } 18 } 19 dexMergerExecutable()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 }