Method and apparatus for data compilation using intermediate class files, electronic device and non-transitory computer readable storage medium
AssigneeBeijing Elex Technology Co., Ltd.
InventorXiaolong Zhao
Life of this patent
Estimating the term…
Abstract
The embodiments of the present disclosure relate to information processing technology and provide a method for data compilation capable of reducing data compilation time. The method can include traversing files to be compiled in a project to be complied to obtain all initial class files; importing all the initial class files into a specified number of intermediate class files, the specified number being smaller than a total number of the initial class files; and compiling the intermediate class files to obtain target data.
Claims9
A method for data compilation, comprising:
- traversing files to be compiled in a project to be complied to obtain all initial class files, wherein the initial class files comprise header files and/or source files;
- importing all the initial class files into a specified number of intermediate class files, the specified number being smaller than a total number of the initial class files;
- and
- compiling the intermediate class files to obtain target data;
- wherein said compiling the intermediate class files to obtain the target data comprises:
- generating dynamic library files from the intermediate class files in accordance with a specified compilation rule;
- and
- packing the dynamic library files to obtain the target data,
- wherein the specified compilation rule is edited based on requirements in a file android.mk, the file android.mk is used to describe source codes of the project to be compiled to a compilation system, and the specified compilation rule defined by the file android.mk is used in compiling at least one of APK program, JAVA library, C/C++ application program, C/C++ static library, or C/C++ shared library, and
- wherein the APK program is compiled and packed into an apk file, the JAVA library that is a java class library is compiled and packed into a jar file, the C/C++ application program is an executable C/C++ application program, the C/C++ static library is a compiled and generated C/C++ static library and is packed into a .a file, and the C/C++ shared library is a compiled and generated shared library that is a dynamic link library, and is packed into a .so file.
An electronic device, comprising a processor, a memory, a communication interface and a bus, wherein the memory stores computer executable instructions, the processor is connected to the memory via the bus, and when the electronic device is operating, the processor executes the computer executable instructions stored in the memory to cause the electronic device to:
- traverse files to be compiled in a project to be complied to obtain all initial class files, wherein the initial class files comprise header files and/or source files;
- import all the initial class files into a specified number of intermediate class files, the specified number being smaller than a total number of the initial class files;
- and
- compile the intermediate class files to obtain target data;
- wherein said compiling the intermediate class files to obtain the target data comprises:
- generating dynamic library files from the intermediate class files in accordance with a specified compilation rule;
- and
- packing the dynamic library files to obtain the target data,
- wherein the specified compilation rule is edited based on requirements in a file android.mk, the file android.mk is used to describe source codes of the project to be compiled to a compilation system, and the specified compilation rule defined by the file android.mk is used in compiling at least one of APK program, JAVA library, C/C++ application program, C/C++ static library, or C/C++ shared library, and
- wherein the APK program is compiled and packed into an apk file, the JAVA library that is a java class library is compiled and packed into a jar file, the C/C++ application program is an executable C/C++ application program, the C/C++ static library is a compiled and generated C/C++ static library and is packed into a .a file, and the C/C++ shared library is a compiled and generated shared library that is a dynamic link library, and is packed into a .so file.
A non-transitory computer readable storage medium having a computer program stored thereon, the program, when executed by a processor, causes the processor to:
- traverse files to be compiled in a project to be complied to obtain all initial class files, wherein the initial class files comprise header files and/or source files;
- import all the initial class files into a specified number of intermediate class files, the specified number being smaller than a total number of the initial class files;
- and
- compile the intermediate class files to obtain target data;
- wherein said compiling the intermediate class files to obtain the target data comprises:
- generating dynamic library files from the intermediate class files in accordance with a specified compilation rule;
- and
- packing the dynamic library files to obtain the target data,
- wherein the specified compilation rule is edited based on requirements in a file android.mk, the file android.mk is used to describe source codes of the project to be compiled to a compilation system, and the specified compilation rule defined by the file android.mk is used in compiling at least one of APK program, JAVA library, C/C++ application program, C/C++ static library, or C/C++ shared library, and
- wherein the APK program is compiled and packed into an apk file, the JAVA library that is a java class library is compiled and packed into a jar file, the C/C++ application program is an executable C/C++ application program, the C/C++ static library is a compiled and generated C/C++ static library and is packed into a .a file, and the C/C++ shared library is a compiled and generated shared library that is a dynamic link library, and is packed into a .so file.
Dependencies are inferred from the claim text.