Class AARGenerator

  • java.lang.Object

  • public class AARGenerator
    extends java.lang.Object
    Generator to generate API archive file(.aar) from API projects
    • Constructor Summary

      Constructor and Description
      AARGenerator(java.lang.String inputProjectPath, java.lang.String outputDirOrFilePath)
      Creates an instance of AARGenerator.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      boolean createAARFile()
      Creates .aar file.
      java.lang.String getOutputZipFilePath()
      Allows BuildToolkit CLI to get the generated .aar path.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AARGenerator

        public AARGenerator(java.lang.String inputProjectPath,
                            java.lang.String outputDirOrFilePath)
                     throws GenerateAarException
        Creates an instance of AARGenerator. Sets up the projectDir and checks that package.xml exists in the input project. Ensures that the output file is the correct filetype: .aar.
        inputProjectPath - The input project path.
        outputDirOrFilePath - The output directory or file path. File name must end with .aar.
        GenerateAarException - if package.xml doesn't exist, if the input project doesn't exist or if the output filename isn't a .aar file.
    • Method Detail

      • createAARFile

        public boolean createAARFile()
                              throws GenerateAarException,
        Creates .aar file. If a capabilities file exists, writes the apiName and capabilitiesList to a manifest for the .aar file, which is then stored in a manifest file. The manifest file is then added to the outputZipFile. The new package.xml is then added to the outputZipFile. Any other resources in the input project are also added to the outputZipFile. Any object added to the outputZipFile is a ZipEntry.
        true if one or more methods or paths did not have any services associated with them. These methods and paths have been omitted from the API package.
        GenerateAarException - if unmarshalling the package.xml file throws a JAXBException. - if an IOException is thrown.
      • getOutputZipFilePath

        public java.lang.String getOutputZipFilePath()
        Allows BuildToolkit CLI to get the generated .aar path.
        outputZipFile the path to the generated .aar file