Nothing Special   »   [go: up one dir, main page]

CN112148303B - File generation method, device, terminal and storage medium - Google Patents

File generation method, device, terminal and storage medium Download PDF

Info

Publication number
CN112148303B
CN112148303B CN202011045364.3A CN202011045364A CN112148303B CN 112148303 B CN112148303 B CN 112148303B CN 202011045364 A CN202011045364 A CN 202011045364A CN 112148303 B CN112148303 B CN 112148303B
Authority
CN
China
Prior art keywords
file
module
compiling
maven
mode
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011045364.3A
Other languages
Chinese (zh)
Other versions
CN112148303A (en
Inventor
吴帅
孙庆波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Oppo Chongqing Intelligent Technology Co Ltd
Original Assignee
Oppo Chongqing Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo Chongqing Intelligent Technology Co Ltd filed Critical Oppo Chongqing Intelligent Technology Co Ltd
Priority to CN202011045364.3A priority Critical patent/CN112148303B/en
Publication of CN112148303A publication Critical patent/CN112148303A/en
Application granted granted Critical
Publication of CN112148303B publication Critical patent/CN112148303B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses a file generation method, which comprises the following steps: calling a first module to compile and generate a first file by using a first compiling mode; calling a second module to compile and generate a second file by using a second compiling mode, wherein the second compiling mode supports Maven dependence; and generating a target file according to the first file and the second file. The application also discloses a file generation device, a terminal and a computer readable storage medium. The application avoids the defect and deficiency of file compiling on a certain dependence, and the problem that compiling work cannot be completed, improves the breadth of compiling support, and further improves the integrity and accuracy of compiling file support.

Description

File generation method, device, terminal and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, a terminal, and a storage medium for generating a file.
Background
The existing chromium kernel (web browser engine) is compiled based on gn+ ninja, and the gn tool generates final target files, such as static libraries, dynamic libraries, exe executable files or apk files (Android application package, android application packages) and the like, according to the gn configuration files of the modules, and then the ninja tool.
The existing compiling mode has the main defects that: maven (project object model) dependencies cannot be supported, resulting in the compilation work not being completed when kernel code needs to rely on components of the maven repository.
Disclosure of Invention
The embodiment of the application provides a file generation method, a device terminal and a storage medium, which aim to solve the technical problem that the existing compiling mode cannot support maven dependence, and when kernel codes need to depend on components of a maven warehouse, compiling work cannot be completed.
In order to achieve the above object, an aspect of the present application provides a file generation method, including:
calling a first module to compile and generate a first file by using a first compiling mode;
Calling a second module to compile and generate a second file by using a second compiling mode, wherein the second compiling mode supports Maven dependence;
And generating a target file according to the first file and the second file.
In order to achieve the above object, another aspect of the present application further provides a file generating apparatus, including:
The control module is used for calling the first module to compile and generate a first file by using a first compiling mode;
the control module is further used for calling a second module to compile and generate a second file by using a second compiling mode, and the second compiling mode supports Maven dependence;
The generating module is used for generating a target file according to the first file and the second file.
To achieve the above object, another aspect of the present application provides a terminal, including a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
calling a first module to compile and generate a first file by using a first compiling mode;
Calling a second module to compile and generate a second file by using a second compiling mode, wherein the second compiling mode supports Maven dependence;
And generating a target file according to the first file and the second file.
To achieve the above object, another aspect of the present application also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of:
calling a first module to compile and generate a first file by using a first compiling mode;
Calling a second module to compile and generate a second file by using a second compiling mode, wherein the second compiling mode supports Maven dependence;
And generating a target file according to the first file and the second file.
According to the application, by adding the second module, the support of Maven dependence is increased, so that the compiling of the development process supports all dependent files, the defect and deficiency of compiling the files on a certain dependence are avoided, the problem that the compiling work cannot be completed is solved, the breadth of the compiling support is improved, and the completeness and accuracy of the compiling file support are further improved.
Drawings
Fig. 1 is a schematic diagram of a hardware structure of a terminal implementing various embodiments of the present application;
FIG. 2 is a schematic diagram illustrating an operation flow of an embodiment of a file generating method according to the present application;
FIG. 3 is a schematic diagram illustrating an operation flow of generating a target file according to the first file and the second file according to an embodiment of the application;
FIG. 4 is a schematic diagram illustrating an operation flow of another embodiment of the file generating method according to the present application;
FIG. 5 is a schematic diagram illustrating an operation flow of invoking a second module to compile a second file using a second compiling method according to an embodiment of the file generating method of the present application, where the second compiling method supports Maven dependence;
FIG. 6 is a schematic diagram illustrating an operation flow of a file generating method according to another embodiment of the present application;
FIG. 7 is a class diagram of a compiling process according to an embodiment of the document generating method of the present application;
FIG. 8 is a schematic diagram illustrating the operation timing of a plug-in module according to an embodiment of the file generation method of the present application;
FIG. 9 is a schematic diagram of a file generating apparatus according to an embodiment of the present application;
FIG. 10 is a schematic diagram of a file generating apparatus according to another embodiment of the present application;
fig. 11 is a schematic diagram of a file generating apparatus according to another embodiment of the application.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
Embodiments of the application are: calling a first module to compile and generate a first file by using a first compiling mode; calling a second module to compile and generate a second file by using a second compiling mode, wherein the second compiling mode supports Maven dependence; and generating a target file according to the first file and the second file.
The terminal according to the present application may be embodied in various forms. For example, the terminal may include a mobile terminal such as a mobile phone, tablet computer, notebook computer, palm computer, personal digital assistant (Personal DIGITAL ASSISTANT, PDA), portable media player (Portable MEDIA PLAYER, PMP), navigation device, wearable device, smart bracelet, pedometer, etc. Of course, a broad sense of terminal device is also possible, for example, a device loaded with a processor, for example, a notebook, a mobile phone, etc., and the terminal may include a device supporting file generation.
Referring to fig. 1, fig. 1 is a schematic diagram of a device structure of a hardware running environment according to a method of an embodiment of the present application
As shown in fig. 1, taking a mobile terminal as an example, the mobile terminal may include: a processor 1001 such as a CPU, a memory 1003, a communication bus 1004, a user input unit 1002, and a display unit 1005. Wherein a communication bus 1004 is used to enable connectivity communication between the processor 1001 and the memory 1003. The memory 1003 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1003 may alternatively be a storage device separate from the processor 1001 described above.
Optionally, the mobile terminal further comprises at least one sensor, such as a light sensor, a motion sensor and other sensors. The accelerometer sensor is used as one of the motion sensors, can detect the acceleration in all directions (generally three axes), can detect the gravity and the direction when the accelerometer sensor is static, and can be used for recognizing the application of the gesture of a mobile phone (such as horizontal and vertical screen switching, related games and magnetometer gesture calibration), vibration recognition related functions (such as pedometer and knocking) and the like; as for other sensors such as fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. that may also be configured in the mobile phone, the detailed description thereof will be omitted.
Optionally, the display unit 1005 is used to display a message input by the user or a message provided to the user. The display unit 1005 may include a display panel, which may be configured in the form of a Liquid crystal display (Liquid CRYSTAL DISPLAY, LCD), an organic light-Emitting Diode (OLED), or the like.
Alternatively, the user input unit 1002 may be used to receive an input numeric or character message and generate key signal inputs related to user settings and function control of the mobile terminal. In particular, the user input unit 1002 may include a touch panel and other input devices. The touch panel, also referred to as a touch screen, may collect touch operations thereon or thereabout by a user (e.g., operations thereon or thereabout by a user using any suitable object or accessory such as a finger, stylus, etc.), and drive the corresponding connection device according to a predetermined program. The user input unit 1002 may include other input devices in addition to a touch panel. In particular, other input devices may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, etc., as specifically not limited herein.
Alternatively, the processor 1001 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by running or executing software programs and/or modules stored in the memory 1003 and calling data stored in the memory 1003, thereby performing overall monitoring of the mobile terminal. The processor 1001 may include one or more processing units; alternatively, the processor 1001 may integrate an application processor that mainly processes an operating system, a user interface, an application program, and the like, and a modem processor that mainly processes wireless communication. It will be appreciated that the modem processor described above may not be integrated into the processor 1001.
Optionally, the memory 1003 may be used to store software programs as well as various data. The memory 1003 may mainly include a storage program area that may store an operating system, application programs required for at least one function (such as a sound playing function, an image playing function, etc.), and a storage data area; the storage data area may store data (such as audio data, phonebook, etc.) created according to the use of the handset, etc. In addition, memory 1003 may include high-speed random access memory, and may include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
Those skilled in the art will appreciate that the mobile terminal structure shown in fig. 1 is not limiting of the terminal and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
In the mobile terminal shown in fig. 1, the processor 1001 is configured to execute a file generation application program in the memory 1003, and the following steps are implemented:
calling a first module to compile and generate a first file by using a first compiling mode;
Calling a second module to compile and generate a second file by using a second compiling mode, wherein the second compiling mode supports Maven dependence;
And generating a target file according to the first file and the second file.
Referring to fig. 2, fig. 2 is a schematic operation flow diagram of the file generating method according to the present application; the file generation method comprises the following steps:
step S10, a first module is called to compile and generate a first file by using a first compiling mode;
The terminal development lays out a first module using the gn+ ninja compilation, i.e., the first compilation is gn+ ninja compilation. Compiling and generating a first file in a first compiling mode, namely in a gn+ ninja compiling mode, wherein the file process generated in the gn+ ninja compiling mode comprises the following steps: the gn configuration file is first generated by the gn tool from the gn configuration files of each module, and then the ninja tool generates the final first file.
In an embodiment, the first module is a main module, and the main module runs with main code logic, and generates the first file by compiling the main code logic in the compiling mode of gn+ ninja.
Step S20, calling a second module to compile and generate a second file by using a second compiling mode, wherein the second compiling mode supports Maven dependence;
The terminal development lays out a second module that is compiled using gradle, i.e., the second compilation mode is gradle compilation. The second file is generated by a second compilation mode, i.e., by gradle compilations, which supports Maven dependencies. The first compilation mode is a different compilation mode than the second compilation mode, the first compilation mode does not support Maven dependencies, and the second compilation mode supports Maven dependencies.
In an embodiment, the second module is a plug-in module, and the plug-in module accesses the code logic of the main module. Optionally, defining a functional interface in the main module, providing plug-in logic, and compiling by using an original gn+ ninja mode; the functional interface is implemented in the plug-in module and the plug-in module is inserted into the main code logic, the plug-in module uses gradle compilations, gradle compilations support Maven dependencies. And compiling the file by adopting different compiling modes through the first module, the main module and the second module (plug-in module), generating the file of the dependent resource supported by each compiling mode, providing the plug-in module supporting the Maven dependence, and providing the file of the component supporting the Maven warehouse under compiling in the development process.
And step S30, generating a target file according to the first file and the second file.
After a first file and a second file are respectively generated through a first module and a second module, a final target file is generated according to the first file and the second file, the compiling process inside the web browser is completed through the target file, a developed browser kernel compiling file is generated, the development project is provided, and the kernel requirement of the web browser is supported.
In one embodiment, referring to fig. 3, the step of generating the target file according to the first file and the second file includes:
and S31, merging the first file and the second file, and taking the merged file as a target file.
The method comprises the steps of developing and arranging a main module and an inserting module, completing the compiling process of the browser kernel file by the main module and the inserting module, forming a first file and a second file by completing respective compiling matters through the main module and the inserting module respectively, and merging the generated first file and second file to generate a final target file. The generated target file is a complete kernel aar package and comprises kernels so, jar and resource files. The compiling work of the parts of the complete kernel aar, which comprise different dependency supports, is realized through different modules, and the support of Maven dependency is realized through the different modules which are arranged and the plug-in modules. The first file portion may be a compiled file of a portion that does not require Maven support, and the second file portion may be a compiled file of a portion that requires Maven support.
In one embodiment, in order to reasonably allocate resources, the compiling process is quickened, and kernel files are quickly formed. When the kernel file is determined to be compiled, determining dependent resources corresponding to the part to be supported according to the compiling requirement of the kernel file when the development process is completed; according to the different depending resources of the support part, different modules are selected to complete the compiling work, and the compiling work is selected to be supported by the corresponding modules.
It will be appreciated that before the second module, i.e. the plug-in module, is started, the following procedure may be performed: the step of calling the second module to compile and generate a second file by using a second compiling mode, wherein before the step of supporting Maven dependence by the second compiling mode, the method further comprises the following steps:
Judging whether the file generation needs to support Maven dependence or not;
and if the Maven dependence needs to be supported, executing the step of calling a second module to compile and generate a second file by using a second compiling mode, wherein the second compiling mode supports the Maven dependence. If Maven-dependent support is not needed, a second module is not required to be started to complete compiling work when a kernel file is formed in the development process.
According to the method, the support of Maven dependence is increased by adding the second module, so that compiling in a development process supports all dependent files, defects and defects of compiling the files on a certain dependence are avoided, the problem that compiling work cannot be completed is solved, the breadth of compiling support is improved, and the completeness and accuracy of compiling file support are further improved.
In an embodiment of the present application, referring to fig. 4, after the step of generating the target file according to the first file and the second file, the method further includes:
step S40, determining the component information required to be supported by the target file;
and step S50, adding declaration information of the Maven-dependent component in the target file.
After the target file is generated, determining component information required to be supported by the target file, for example, information of supported components of a Maven warehouse according to the condition of compiling by using the first module and the second module, and adding declaration information of components dependent on Maven in the target file when the components of the Maven warehouse are required to be supported. It can be understood that the complete kernel aar package is finally output after compiling operation, and contains kernel so, jar and resource files, and the dependent component codes are not directly contained in the output package; the aar of the output, when uploaded to the maven warehouse, declares the components that need to be relied upon.
The embodiment only declares the components which need to be relied on when outputting the target file, and does not contain the dependent component codes; the applications accessing the kernel do not cause conflict if they have the same dependency.
In an embodiment, referring to fig. 5, the step of calling the second module to compile and generate the second file by using a second compiling method, where the second compiling method supports Maven dependency includes:
S21, determining source code data generated by a file, and determining document parameters according to the source code data;
And S22, calling a Maven component to execute compiling operation based on the document parameters and the second compiling mode to generate a second file.
In the development process, a development document, for example, a java doc document, is maintained, and the source code data of the target interface is the data written on the interface. Optionally, the source code data of the target interface is read through a java doc plug-in, including reading the target source code data through a Doclet interface provided by the java doc plug-in. And Javadoc extracts class, method, member and other comments from the program source code to form an API help document matched with the source code. That is, only by annotating a specific set of labels when writing a program, after the program is written, the development document of the program can be formed at the same time through JavaDoc. The JavaDoc command is used to generate its own API document, using the following modes: and inputting Java+file names in the directory where the target file is located by using the command line. After the source code data of the target interface are read through the Java doc plug-in, determining the document parameters of the target interface according to the source code data.
The document parameters of the target interface include: request mode, request path, entry and return values. Wherein the request mode and the request path are determined by detection, the entry and the return value may include the entry itself and the parameter type of the entry.
And after the document parameters are determined, calling a Maven component to execute compiling operation based on the document parameters and a second compiling mode to generate a second file. And calling the Maven component to complete the compiling work of the second file through a second compiling mode, document parameters, namely the coding requirement and the compiling mode, and compiling the file to form an accurate file with the load kernel requirement.
Optionally, referring to fig. 6, the process of determining the document parameters of the target interface according to the source code data may include:
Step S01, determining interface parameters of a file generation corresponding target interface;
Step S02, determining a corresponding Java class according to the interface parameter;
and S03, matching corresponding document parameters with the java class.
The target interface is selected as a REST interface, and then the Java class of the target interface is a Controller; if the target Interface is an RPC Interface, the Java class of the target Interface is Interface.
The Interface parameters are Interface types, the Interface types comprise two categories, namely REST and RPC, wherein the Interface parameters corresponding to the REST Interface are controllers, and the Interface parameters corresponding to the RPC Interface are interfaces. In the implementation process, java doc mainly analyzes and processes the two classes of the Controller and the Interface, and can rapidly and accurately describe document parameters of various classes of target interfaces. After the API parameters are read, in the Maven project, a Maven instruction is executed to use a Maven plug-in to acquire the document parameters therein, and a second file is generated.
According to the method and the device, different interface parameters are determined according to the difference of the interfaces, the document parameters are determined according to the interface parameters, and compiling of the second file is completed according to the document parameters and the second compiling mode of the second module, so that the compiling parameters of the file are more accurate, and the compiling accuracy of the file is improved.
In an embodiment, to better describe the solution of the present embodiment, referring to fig. 7 and 8, fig. 7 is a class diagram illustration of the compiling process; fig. 8 is a timing diagram of the operation of the plug-in.
The kernel file compiling process of the embodiment comprises the following steps:
According to the scheme, maven dependence is processed in a plug-in mode, the project is split into a main module and each plug-in module, the main module uses an original gn+ ninja compiling mode, the plug-in modules use gradle compiling mode, and gradle can well process maven dependence.
Defining a functional interface in a main module, providing plug-in insertion logic, and compiling by using an original gn+ ninja mode; realizing a functional interface in the plug-in module, inserting the plug-in module into the main code logic, and compiling the plug-in module by using gradle; and finally, generating the target file by the main module and each plug-in module together.
The benefits of compiling the kernel file of this embodiment include:
the maven dependence is convenient to access, various types of dependence can be completely supported, and additional development and adaptation are not needed;
the output package only declares the components that need to be relied upon and does not contain the dependent component code; the applications accessing the kernel do not cause conflict if they have the same dependency.
The present application also proposes a document generating apparatus, referring to fig. 9, comprising: a control module 10 and a generation module 20,
The control module 10 is configured to invoke the first module to compile and generate a first file by using a first compiling mode;
the control module 10 is further configured to invoke a second module to compile and generate a second file by using a second compiling mode, where the second compiling mode supports Maven dependence;
The generating module 20 is configured to generate a target file according to the first file and the second file.
Further, the first module is a main module, the second module is a plug-in module, and the plug-in module is accessed to code logic of the main module.
Further, the generating module 20 is configured to combine the first file and the second file, and take the combined file as a target file.
Further, referring to fig. 10, the apparatus further includes: a determination module 30 and an addition module 40,
The determining module 30 is configured to determine component information that needs to be supported by the target file;
the adding module 40 is configured to add declaration information of a Maven dependent component to the target file.
Further, referring to fig. 11, the apparatus further includes: the decision module 50,
The judging module 50 is configured to judge whether the file generation needs to support Maven dependency;
The control module 10 is further configured to execute the step of calling the second module to compile and generate the second file by using a second compiling mode if the Maven dependency needs to be supported, where the second compiling mode supports the Maven dependency.
Further, the generating module 20 is further configured to determine source code data generated by the file, and determine a document parameter according to the source code data; and calling a Maven component to execute compiling operation based on the document parameters and the second compiling mode to generate a second file.
Further, the determining module 30 is further configured to determine interface parameters of the file generation corresponding to the target interface; determining a corresponding Java class according to the interface parameters; and matching corresponding document parameters with the java class.
The application also proposes a terminal comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
calling a first module to compile and generate a first file by using a first compiling mode;
Calling a second module to compile and generate a second file by using a second compiling mode, wherein the second compiling mode supports Maven dependence;
And generating a target file according to the first file and the second file.
The terminal is provided with a processor, a main module connected with the processor and a plug-in module connected with the main module and the processor, and the processor completes compiling work of the browser kernel file through the connected main module and plug-in module to form a target file. The target file is a complete kernel aar package including, but not limited to, kernel so, jar, resource files. The kernel file compiling work of the application needs to add a second module, namely, on the basis of the previous compiling module, the file compiling project needs to be divided into a main module and a plug-in module, and all dependencies, such as Maven dependencies, are covered by the main module and the plug-in module.
The terminal of the application increases the support of Maven dependence by adding the second module, so that the compiling of the development process supports all dependent files, the defect and deficiency of compiling the files on a certain dependence are avoided, the problem that the compiling work cannot be completed is solved, the breadth of the compiling support is improved, and the completeness and accuracy of the compiling file support are further improved.
The application also proposes a computer-readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, realizes the steps of:
calling a first module to compile and generate a first file by using a first compiling mode;
Calling a second module to compile and generate a second file by using a second compiling mode, wherein the second compiling mode supports Maven dependence;
And generating a target file according to the first file and the second file.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It should be noted that in the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The application may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the words first, second, third, etc. do not denote any order. These words may be interpreted as names.
While alternative embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following appended claims be interpreted as including alternative embodiments and all such alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present application without departing from the application
Clear spirit and scope. Thus, it is intended that the present application also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (7)

1. A file generation method, characterized in that the file generation method comprises:
Calling a first module to compile and generate a first file by using a first compiling mode, wherein the first compiling mode is a gn+ ninja compiling mode;
Judging whether the file generation needs to support Maven dependence or not;
if the Maven dependence needs to be supported, a second module is called to compile and generate a second file by using a second compiling mode, wherein the second compiling mode is gradle compiling and supports the Maven dependence;
Merging the first file and the second file, and taking the merged file as a target file, wherein the generated target file is a complete kernel aar package and comprises kernels so, jar and resource files;
the first module is a main module, the second module is a plug-in module, and the plug-in module is accessed to code logic of the main module.
2. The file generating method according to claim 1, wherein after said step of generating a target file from said first file and said second file, further comprising:
Determining the component information required to be supported by the target file;
and adding declaration information of the Maven-dependent components in the target file.
3. The method for generating a file according to claim 1, wherein the step of calling the second module to compile the second file using a second compiling method, the second compiling method supporting Maven dependency comprises:
Determining source code data generated by a file, and determining document parameters according to the source code data;
and calling a Maven component to execute compiling operation based on the document parameters and the second compiling mode to generate a second file.
4. A file generation method according to claim 3, characterized in that the method further comprises:
determining interface parameters of a corresponding target interface generated by the file;
determining a corresponding Java class according to the interface parameters;
according to the document parameters corresponding to the Java class matching.
5. A document generating apparatus, the apparatus comprising: the control module, the judging module and the generating module,
The control module is used for calling the first module to compile and generate a first file by using a first compiling mode, wherein the first compiling mode is a gn+ ninja compiling mode;
The judging module is further used for judging whether the file generation needs to support Maven dependence or not;
The control module is further configured to invoke the second module to compile and generate a second file by using a second compiling mode if the Maven dependency needs to be supported, where the second compiling mode is gradle compiling and supports the Maven dependency;
the generating module is configured to combine the first file and the second file, and take the combined file as a target file, where the generated target file is a complete kernel aar package, and includes kernels so, jar, and resource files;
the first module is a main module, the second module is a plug-in module, and the plug-in module is accessed to code logic of the main module.
6. A terminal comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
Calling a first module to compile and generate a first file by using a first compiling mode, wherein the first compiling mode is a gn+ ninja compiling mode;
Judging whether the file generation needs to support Maven dependence or not;
if the Maven dependence needs to be supported, a second module is called to compile and generate a second file by using a second compiling mode, wherein the second compiling mode is gradle compiling and supports the Maven dependence;
Merging the first file and the second file, and taking the merged file as a target file, wherein the generated target file is a complete kernel aar package and comprises kernels so, jar and resource files;
the first module is a main module, the second module is a plug-in module, and the plug-in module is accessed to code logic of the main module.
7. A computer readable storage medium, having stored thereon a computer program, characterized in that the computer program when executed by a processor performs the steps of:
Calling a first module to compile and generate a first file by using a first compiling mode, wherein the first compiling mode is a gn+ ninja compiling mode;
Judging whether the file generation needs to support Maven dependence or not;
if the Maven dependence needs to be supported, a second module is called to compile and generate a second file by using a second compiling mode, wherein the second compiling mode is gradle compiling and supports the Maven dependence;
Merging the first file and the second file, and taking the merged file as a target file, wherein the generated target file is a complete kernel aar package and comprises kernels so, jar and resource files;
the first module is a main module, the second module is a plug-in module, and the plug-in module is accessed to code logic of the main module.
CN202011045364.3A 2020-09-28 2020-09-28 File generation method, device, terminal and storage medium Active CN112148303B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011045364.3A CN112148303B (en) 2020-09-28 2020-09-28 File generation method, device, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011045364.3A CN112148303B (en) 2020-09-28 2020-09-28 File generation method, device, terminal and storage medium

Publications (2)

Publication Number Publication Date
CN112148303A CN112148303A (en) 2020-12-29
CN112148303B true CN112148303B (en) 2024-05-28

Family

ID=73895173

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011045364.3A Active CN112148303B (en) 2020-09-28 2020-09-28 File generation method, device, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN112148303B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112748927A (en) * 2020-12-30 2021-05-04 上海微盟企业发展有限公司 Project interface analysis method and related device

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101963915A (en) * 2010-09-25 2011-02-02 中兴通讯股份有限公司 Building method of compilation and system thereof
CN104778033A (en) * 2014-01-09 2015-07-15 大唐电信科技股份有限公司 Construction method and device of building block type software
CN106569869A (en) * 2016-11-14 2017-04-19 平安科技(深圳)有限公司 Plug-in packaging method and device
CN107908407A (en) * 2017-12-11 2018-04-13 北京奇虎科技有限公司 Compilation Method, device and terminal device
CN109086048A (en) * 2018-07-05 2018-12-25 杭州涂鸦信息技术有限公司 Multiple modules individually issue the implementation method of AAR under a kind of Android client project
CN110554876A (en) * 2018-05-31 2019-12-10 北京京东尚科信息技术有限公司 Method and device for compiling android project
CN110825365A (en) * 2019-11-14 2020-02-21 福州汇思博信息技术有限公司 Method, device, equipment and medium for customizing webview characteristics
CN111124420A (en) * 2019-12-19 2020-05-08 北京百度网讯科技有限公司 Compiling method, device, electronic equipment and readable storage medium
CN111258563A (en) * 2020-01-16 2020-06-09 江苏满运软件科技有限公司 Interface document generation method and device, storage medium and electronic equipment
CN111273943A (en) * 2018-12-04 2020-06-12 北京嘀嘀无限科技发展有限公司 Application file generation method and device and electronic equipment
CN111399840A (en) * 2020-03-04 2020-07-10 腾讯音乐娱乐科技(深圳)有限公司 Module development method and device
CN111443921A (en) * 2020-03-27 2020-07-24 中国平安财产保险股份有限公司 Method, system and computer equipment for subpackage deployment of web front-end projects

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10963230B2 (en) * 2019-02-14 2021-03-30 International Business Machines Corporation Single page application continuous integration, build, and deployment

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101963915A (en) * 2010-09-25 2011-02-02 中兴通讯股份有限公司 Building method of compilation and system thereof
CN104778033A (en) * 2014-01-09 2015-07-15 大唐电信科技股份有限公司 Construction method and device of building block type software
CN106569869A (en) * 2016-11-14 2017-04-19 平安科技(深圳)有限公司 Plug-in packaging method and device
CN107908407A (en) * 2017-12-11 2018-04-13 北京奇虎科技有限公司 Compilation Method, device and terminal device
CN110554876A (en) * 2018-05-31 2019-12-10 北京京东尚科信息技术有限公司 Method and device for compiling android project
CN109086048A (en) * 2018-07-05 2018-12-25 杭州涂鸦信息技术有限公司 Multiple modules individually issue the implementation method of AAR under a kind of Android client project
CN111273943A (en) * 2018-12-04 2020-06-12 北京嘀嘀无限科技发展有限公司 Application file generation method and device and electronic equipment
CN110825365A (en) * 2019-11-14 2020-02-21 福州汇思博信息技术有限公司 Method, device, equipment and medium for customizing webview characteristics
CN111124420A (en) * 2019-12-19 2020-05-08 北京百度网讯科技有限公司 Compiling method, device, electronic equipment and readable storage medium
CN111258563A (en) * 2020-01-16 2020-06-09 江苏满运软件科技有限公司 Interface document generation method and device, storage medium and electronic equipment
CN111399840A (en) * 2020-03-04 2020-07-10 腾讯音乐娱乐科技(深圳)有限公司 Module development method and device
CN111443921A (en) * 2020-03-27 2020-07-24 中国平安财产保险股份有限公司 Method, system and computer equipment for subpackage deployment of web front-end projects

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
CBNG-THE NEW BUILD TOOL USED TO BUILD MILLIONS OF LINES OF JAVA CODE AT CERN;V. Baggiolini等;《16th Int. Conf. on Accelerator and Large Experimental Control Systems》;20171231;789-793 *
Detecting Incorrect Build Rules;Na´ndor Licker等;《2019 IEEE/ACM 41st International Conference on Software Engineering (ICSE)》;20190826;1234-1244 *
基于Jenkins的项目持续集成方案研究与实现;张力文;《中国优秀硕士学位论文全文数据库 信息科技辑》;20170715;I138-164 *
基于Ninja的分布式编译系统;张朝滨;《中国优秀硕士学位论文全文数据库 信息科技辑》;20160615;I138-483 *

Also Published As

Publication number Publication date
CN112148303A (en) 2020-12-29

Similar Documents

Publication Publication Date Title
CN108027722B (en) Dynamically updating applications in compilation and deployment
US9430200B1 (en) Cross-library framework architecture feature sets
US10241784B2 (en) Hierarchical directives-based management of runtime behaviors
US9442707B2 (en) Incremental whole program compilation of code
RU2643484C2 (en) Generation of own code from code in intermediate language for application
US10175964B2 (en) Compiler caching for runtime routine redundancy tracking
US9436449B1 (en) Scenario-based code trimming and code reduction
CN111736916B (en) Java language-based dynamic expansion method and device, electronic equipment and storage medium
US7818730B1 (en) Automatic minimal build dependency determination and building an executable with source code
US20200264866A1 (en) Caching build graphs
US9772925B2 (en) Storage access debugging with disassembly and symbol entries
US9817643B2 (en) Incremental interprocedural dataflow analysis during compilation
CN108845839B (en) Application page loading method and device and computer readable storage medium
EP3123315A1 (en) Hierarchical directives-based management of runtime behaviors
CN109597621B (en) Method and device for packaging Dagger, terminal equipment and storage medium
US11789913B2 (en) Integration of model execution engine containers with a model development environment
US20160077831A1 (en) Accurate and performant code design using memoization
CN112148303B (en) File generation method, device, terminal and storage medium
CN112698867A (en) Method and device for dynamically modifying annotation information, electronic equipment and medium
CN107077365B (en) Selectively loading precompiled headers and/or portions thereof
CN113407186A (en) Control execution method, control execution device, terminal, and readable storage medium
Liu et al. Exploring sensor usage behaviors of android applications based on data flow analysis
CN110908882A (en) Performance analysis method and device of application program, terminal equipment and medium
CN109426546B (en) Application starting method and device, computer storage medium and equipment
CN112685095B (en) Virtual device loading method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant