def __init__(self, install_dir, vndk_version): """GenBuildFile constructor. Args: install_dir: string, absolute path to the prebuilts/vndk/v{version} directory where the build files will be generated. vndk_version: int, VNDK snapshot version (e.g. 30) """ self._install_dir = install_dir self._vndk_version = vndk_version self._etc_paths = self._get_etc_paths() self._snapshot_archs = utils.get_snapshot_archs(install_dir) self._root_bpfile = os.path.join(install_dir, utils.ROOT_BP_PATH) self._common_bpfile = os.path.join(install_dir, utils.COMMON_BP_PATH) self._llndk = self._parse_lib_list( os.path.basename(self._etc_paths['llndk.libraries.txt'])) self._vndk_core = self._parse_lib_list( os.path.basename(self._etc_paths['vndkcore.libraries.txt'])) self._vndk_sp = self._parse_lib_list( os.path.basename(self._etc_paths['vndksp.libraries.txt'])) self._vndk_private = self._parse_lib_list( os.path.basename(self._etc_paths['vndkprivate.libraries.txt'])) self._vndk_product = self._parse_lib_list( os.path.basename(self._etc_paths['vndkproduct.libraries.txt'])) self._modules_with_notice = self._get_modules_with_notice()
def gather_notice_files(install_dir): """Gathers all NOTICE files to a common NOTICE_FILES directory.""" common_notices_dir = utils.NOTICE_FILES_DIR_PATH logging.info('Creating {} directory to gather all NOTICE files...'.format( common_notices_dir)) os.makedirs(common_notices_dir) for arch in utils.get_snapshot_archs(install_dir): notices_dir_per_arch = os.path.join(arch, utils.NOTICE_FILES_DIR_NAME) if os.path.isdir(notices_dir_per_arch): for notice_file in glob.glob( '{}/*.txt'.format(notices_dir_per_arch)): if not os.path.isfile( os.path.join(common_notices_dir, os.path.basename(notice_file))): shutil.copy(notice_file, common_notices_dir) shutil.rmtree(notices_dir_per_arch)
def __init__(self, install_dir, vndk_version): """GenBuildFile constructor. Args: install_dir: string, absolute path to the prebuilts/vndk/v{version} directory where the build files will be generated. vndk_version: int, VNDK snapshot version (e.g., 27, 28) """ self._install_dir = install_dir self._vndk_version = vndk_version self._etc_paths = self._get_etc_paths() self._snapshot_archs = utils.get_snapshot_archs(install_dir) self._mkfile = os.path.join(install_dir, utils.ANDROID_MK_PATH) self._vndk_core = self._parse_lib_list('vndkcore.libraries.txt') self._vndk_sp = self._parse_lib_list( os.path.basename(self._etc_paths['vndksp.libraries.txt'])) self._vndk_private = self._parse_lib_list('vndkprivate.libraries.txt')
def gather_notice_files(install_dir): """Gathers all NOTICE files to a common NOTICE_FILES directory.""" common_notices_dir = utils.NOTICE_FILES_DIR_PATH logging.info('Creating {} directory to gather all NOTICE files...'.format( common_notices_dir)) os.makedirs(common_notices_dir) for arch in utils.get_snapshot_archs(install_dir): notices_dir_per_arch = os.path.join(arch, utils.NOTICE_FILES_DIR_NAME) if os.path.isdir(notices_dir_per_arch): for notice_file in glob.glob( '{}/*.txt'.format(notices_dir_per_arch)): if not os.path.isfile( os.path.join(common_notices_dir, os.path.basename(notice_file))): shutil.copy(notice_file, common_notices_dir) shutil.rmtree(notices_dir_per_arch)
def __init__(self, install_dir, vndk_version): """GenBuildFile constructor. Args: install_dir: string, absolute path to the prebuilts/vndk/v{version} directory where the build files will be generated. vndk_version: int, VNDK snapshot version (e.g., 27, 28) """ self._install_dir = install_dir self._vndk_version = vndk_version self._etc_paths = self._get_etc_paths() self._snapshot_archs = utils.get_snapshot_archs(install_dir) self._root_bpfile = os.path.join(install_dir, utils.ROOT_BP_PATH) self._common_bpfile = os.path.join(install_dir, utils.COMMON_BP_PATH) self._vndk_core = self._parse_lib_list('vndkcore.libraries.txt') self._vndk_sp = self._parse_lib_list( os.path.basename(self._etc_paths['vndksp.libraries.txt'])) self._vndk_private = self._parse_lib_list('vndkprivate.libraries.txt') self._modules_with_notice = self._get_modules_with_notice()