Class DxStep

  • All Implemented Interfaces:
    Step

    public class DxStep
    extends ShellStep
    • Constructor Detail

      • DxStep

        public DxStep​(ProjectFilesystem filesystem,
                      AndroidPlatformTarget androidPlatformTarget,
                      Path outputDexFile,
                      Iterable<Path> filesToDex)
        Parameters:
        outputDexFile - path to the file where the generated classes.dex should go.
        filesToDex - each element in this set is a path to a .class file, a zip file of .class files, or a directory of .class files.
      • DxStep

        public DxStep​(ProjectFilesystem filesystem,
                      AndroidPlatformTarget androidPlatformTarget,
                      Path outputDexFile,
                      Iterable<Path> filesToDex,
                      EnumSet<DxStep.Option> options,
                      String dexTool)
        Parameters:
        outputDexFile - path to the file where the generated classes.dex should go.
        filesToDex - each element in this set is a path to a .class file, a zip file of .class files, or a directory of .class files.
        options - to pass to dx.
        dexTool - the tool used to perform dexing.
      • DxStep

        public DxStep​(ProjectFilesystem filesystem,
                      AndroidPlatformTarget androidPlatformTarget,
                      Path outputDexFile,
                      Iterable<Path> filesToDex,
                      EnumSet<DxStep.Option> options,
                      Optional<String> maxHeapSize,
                      String dexTool,
                      boolean intermediate)
        Parameters:
        outputDexFile - path to the file where the generated classes.dex should go.
        filesToDex - each element in this set is a path to a .class file, a zip file of .class files, or a directory of .class files.
        options - to pass to dx.
        maxHeapSize - The max heap size used for out of process dex.
        dexTool - the tool used to perform dexing.
      • DxStep

        public DxStep​(ProjectFilesystem filesystem,
                      AndroidPlatformTarget androidPlatformTarget,
                      Path outputDexFile,
                      Iterable<Path> filesToDex,
                      EnumSet<DxStep.Option> options,
                      Optional<String> maxHeapSize,
                      String dexTool,
                      boolean intermediate,
                      @Nullable
                      Collection<Path> classpathFiles,
                      Optional<String> bucketId,
                      Optional<Integer> minSdkVersion)
        Parameters:
        outputDexFile - path to the file where the generated classes.dex should go.
        filesToDex - each element in this set is a path to a .class file, a zip file of .class files, or a directory of .class files.
        options - to pass to dx.
        maxHeapSize - The max heap size used for out of process dex.
        dexTool - the tool used to perform dexing.
        classpathFiles - specifies classpath for interface static and default methods desugaring.
        minSdkVersion -
    • Method Detail

      • getShellCommandInternal

        protected com.google.common.collect.ImmutableList<String> getShellCommandInternal​(ExecutionContext context)
        Description copied from class: ShellStep
        Implementations of this method should not have any observable side-effects.
        Specified by:
        getShellCommandInternal in class ShellStep
      • shouldPrintStderr

        protected boolean shouldPrintStderr​(Verbosity verbosity)
        Overrides:
        shouldPrintStderr in class ShellStep
        Returns:
        whether the stderr of the shell command, when executed, should be printed to the stderr of the specified ExecutionContext. If false, stderr will only be printed on error and only if verbosity is set to standard information.
      • shouldPrintStdout

        protected boolean shouldPrintStdout​(Verbosity verbosity)
        Overrides:
        shouldPrintStdout in class ShellStep
        Parameters:
        verbosity - is provided in case that affects what should be printed.
        Returns:
        whether the stdout of the shell command, when executed, should be printed to the stderr of the specified ExecutionContext. If false, stdout will only be printed on error and only if verbosity is set to standard information.
      • getShortName

        public String getShortName()
        Returns:
        a short name/description for the command, such as "javac". Should fit on one line.
      • getOutputDexFile

        public Path getOutputDexFile()