Class MainDexListBuilder

java.lang.Object
com.android.multidex.MainDexListBuilder

public class MainDexListBuilder extends Object
This is a command line tool used by mainDexClasses script to build a main dex classes list. First argument of the command line is an archive, each class file contained in this archive is used to identify a class that can be used during secondary dex installation, those class files are not opened by this tool only their names matter. Other arguments must be zip files or directories, they constitute in a classpath in with the classes named by the first argument will be searched. Each searched class must be found. On each of this classes are searched for their dependencies to other classes. The tool also browses for classes annotated by runtime visible annotations and adds them to the list/ Finally the tools prints on standard output a list of class files names suitable as content of the file argument --main-dex-list of dx.
  • Constructor Details

  • Method Details

    • main

      public static void main(String[] args)
    • getMainDexList

      public Set<String> getMainDexList()
      Returns a list of classes to keep. This can be passed to dx as a file with --main-dex-list.