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

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

Info

Publication number
CN112148303A
CN112148303A CN202011045364.3A CN202011045364A CN112148303A CN 112148303 A CN112148303 A CN 112148303A CN 202011045364 A CN202011045364 A CN 202011045364A CN 112148303 A CN112148303 A CN 112148303A
Authority
CN
China
Prior art keywords
file
module
compiling
calling
generate
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.)
Granted
Application number
CN202011045364.3A
Other languages
Chinese (zh)
Other versions
CN112148303B (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

Images

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)
  • General Engineering & Computer Science (AREA)
  • Software Systems (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 to generate a first file by using a first compiling mode; calling a second module to compile to 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 method and the device avoid the defects and shortcomings of file compiling on a certain dependence, the problem that compiling work cannot be completed is solved, the breadth of compiling support is improved, and further the completeness and the accuracy of compiling file support are improved.

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 file generation method, an apparatus, a terminal, and a storage medium.
Background
The current chrome kernel (web browser engine) is compiled based on gn + ninja, and gn tools generate gn configuration files according to modules, and then ninja tools generate final target files, such as static libraries, dynamic libraries, exe executable files or apk files (Android application packages), and the like.
The existing compiling mode has the main defects that: the inability to support maven (project object model) dependencies results in compilation work being incomplete when kernel code needs to rely on components of the maven repository.
Disclosure of Invention
The embodiment of the application aims to solve the technical problems that the existing compiling mode cannot support maven dependence and compiling work cannot be completed when kernel codes need to depend on components of a maven warehouse by providing a file generating method, a device terminal and a storage medium.
In order to achieve the above object, an aspect of the present application provides a file generating method, where the file generating method includes:
calling a first module to compile to generate a first file by using a first compiling mode;
calling a second module to compile to 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 applying a first compiling mode;
the control module is further used for calling a second module to compile to generate a second file by using a second compiling mode, and the second compiling mode supports Maven dependence;
and the generating module is used for 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 terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the following steps:
calling a first module to compile to generate a first file by using a first compiling mode;
calling a second module to compile to 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 further provides a computer-readable storage medium, on which a computer program is stored, the computer program, when executed by a processor, implementing the steps of:
calling a first module to compile to generate a first file by using a first compiling mode;
calling a second module to compile to 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 method and the device have the advantages that the support of the Maven dependency is increased by increasing the second module, so that files of all dependencies are supported by compiling in the development process, the defects and the defects of file compiling on a certain dependency are avoided, the problem that compiling work cannot be completed is solved, the breadth of compiling support is improved, and the completeness and the accuracy of compiling file support are 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 operational flow diagram of an embodiment of a document generation method of the present application;
fig. 3 is a schematic view of an operation flow of generating a target file according to the first file and the second file in an embodiment of the present application;
FIG. 4 is a schematic operational flow diagram of another embodiment of a document generation method of the present application;
fig. 5 is a schematic diagram of an operation flow of invoking a second module to compile to generate a second file using a second compiling mode in an embodiment of the file generating method of the present application, where the second compiling mode supports Maven dependency;
FIG. 6 is a schematic operational flow chart of another embodiment of a document generation method of the present application;
FIG. 7 is a diagram illustrating a class diagram of a compilation process according to an embodiment of the document generation method;
FIG. 8 is a schematic diagram illustrating a working timing sequence of a plug-in an embodiment of a file generation method of the present application;
FIG. 9 is a block diagram illustrating an architecture of a document creation apparatus according to an embodiment of the present application;
FIG. 10 is a schematic diagram of an architecture of a document generating apparatus according to another embodiment of the present application;
FIG. 11 is a block diagram illustrating a file generation control architecture according to another embodiment of the present application.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
Embodiments of the present application are: calling a first module to compile to generate a first file by using a first compiling mode; calling a second module to compile to 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 described herein may be implemented in various forms. For example, the terminal may include a mobile terminal such as a mobile phone, a tablet computer, a notebook computer, a palm top computer, a Personal Digital Assistant (PDA), a Portable Media Player (PMP), a navigation device, a wearable device, a smart band, a pedometer, and the like. Of course, the terminal may also be a broad terminal device, for example, a device loaded with a processor, such as a notebook, a mobile phone, and the like, and the terminal may include a device supporting file generation.
Referring to fig. 1, fig. 1 is a schematic device structure diagram of a hardware operating environment related to a method according to 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, a display unit 1005. The communication bus 1004 is used for realizing connection and communication between the processor 1001 and the memory 1003. The memory 1003 may be a high-speed RAM memory or a non-volatile memory (e.g., a disk memory). The memory 1003 may alternatively be a storage device separate from the processor 1001.
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 magnitude of acceleration in each direction (generally three axes), can detect the magnitude and direction of gravity when the mobile phone is static, and can be used for applications of recognizing the gesture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and knocking) and the like; as for other sensors such as a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the mobile phone, further description is omitted here.
Alternatively, 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, and the Display panel may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
Alternatively, the user input unit 1002 may be used to receive input numeric or character messages 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 called a touch screen, may collect touch operations of a user (for example, operations of the user on or near the touch panel using any suitable object or accessory such as a finger, a stylus, etc.) and drive the corresponding connection device according to a preset program. The user input unit 1002 may include other input devices in addition to a touch panel. In particular, the other input devices may include, but are not limited to, one or more of a physical keyboard, a function key (such as a volume control key, a switch key, etc.), a trackball, a mouse, a joystick, and the like, which are 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. Processor 1001 may include one or more processing units; optionally, the processor 1001 may integrate an application processor and a modem processor, wherein the application processor mainly handles operating systems, user interfaces, application programs, and the like, and the modem processor mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 1001.
Alternatively, 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 and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, and the like), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 1003 may include high speed random access memory, and may also 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 architecture shown in fig. 1 is not intended to be limiting of the terminal, and may include more or fewer components than those shown, or some components may be combined, 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 in the memory 1003, and implement the following steps:
calling a first module to compile to generate a first file by using a first compiling mode;
calling a second module to compile to 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 view illustrating an operation flow of the document generation method of the present application; the file generation method comprises the following steps:
step S10, calling a first module to compile to generate a first file by using a first compiling mode;
the terminal develops and lays a first module, and the first module uses a gn + ninja compiling mode, namely the first compiling mode is the gn + ninja compiling mode. Generating a first file through a first compiling mode, namely compiling through a gn + ninja compiling mode, wherein the file generating process through the gn + ninja compiling mode comprises the following steps: the gn tool generates the final first file from the gn profile of each module, and then the ninja tool generates the final first file.
In an embodiment, the first module is a master module, the master module runs a master code logic, and the first file is generated by compiling the master code logic in a gn + ninja compiling mode.
Step S20, calling a second module to compile to generate a second file by using a second compiling mode, wherein the second compiling mode supports Maven dependence;
and the terminal develops and lays out a second module, and the second module is compiled by using the gradle, namely the second compiling mode is the gradle compiling. And generating a second file through a second compiling mode, namely through gradle compiling, wherein the second compiling mode supports Maven dependence. The first compiling mode is a compiling mode different from the second compiling mode, the first compiling mode does not support Maven dependence, and the second compiling mode supports Maven dependence.
In one embodiment, the second module is a plug-in module that accesses the code logic of the primary module. Optionally, defining a functional interface in the main module, providing plug-in insertion logic, and compiling by using an original gn + ninja mode; and realizing a functional interface in a plug-in module, and inserting the plug-in module into the main code logic, wherein the plug-in module uses the gradle compiling, and the gradle compiling supports the Maven dependence. The method comprises the steps of compiling files by adopting different compiling modes through a first module, namely a main module and a second module (plug-in module), generating files which support dependent resources under the respective compiling modes, providing plug-in modules which support Maven dependence, and providing files which support assemblies of a Maven warehouse under compiling in the development process.
Step S30, generating a target file according to the first file and the second file.
After the first file and the second file are respectively generated through the first module and the 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 and provided for a development project, and the kernel requirement of the web browser is supported.
In an embodiment, referring to fig. 3, the step of generating the target file according to the first file and the second file includes:
step S31, merging the first file and the second file, and using the merged file as a target file.
The method comprises the steps that a main module and a plug-in module are developed and laid out, the main module and the plug-in module jointly complete the compiling process of a browser kernel file, after the main module and the plug-in module respectively complete respective compiling items to form a first file and a second file, the generated first file and the generated second file are combined 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 parts supported by different dependencies of the complete kernel aar package is realized through different modules, and the support of the Maven dependency is realized by introducing plug-in modules through different modules. The first file portion may be a compiled file of portions that do not require Maven support, while the second file portion may be a compiled file of portions that require Maven support.
In one embodiment, in order to reasonably allocate resources, the compiling process is accelerated, and the kernel file is quickly formed. When the kernel file is determined to be compiled and the development process is completed, determining the dependent resources of the corresponding parts needing to be supported according to the compiling requirement of the kernel file; and selecting different modules to complete the compiling work according to different dependent resources of the supporting part, and selecting corresponding modules to support the compiling work.
It will be appreciated that before the second module, i.e. the plug-in module, is started, the following process may be performed: before the step of calling the second module to compile to generate the second file by using the second compiling mode, the step of compiling the second file by using the second compiling mode to support the Maven dependency further includes:
judging whether the file generation needs to support the Maven dependence;
and if the Maven dependency needs to be supported, executing and calling a second module to compile and generate a second file by using a second compiling mode, wherein the second compiling mode supports the step of the Maven dependency. If the support of Maven dependency is not needed, in the development process, when a kernel file is formed, a second module is not needed to be started to complete the compiling work.
In the embodiment, the support of Maven dependency is increased by adding the second module, so that files of all dependencies are supported by compiling in the development process, the defects and shortcomings of file compiling on a certain dependency are avoided, the problem that compiling cannot be completed is solved, the breadth of compiling support is improved, and the completeness and the 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 needed to be supported by the target file;
and step S50, adding declaration information of the components on which the Maven depends in the target file.
After the object file is generated, according to the condition of compiling by using the first module and the second module, determining the component information required to be supported by the object file, for example, the information of the supported Maven warehouse components, and when the components of the Maven warehouse need to be supported, adding declaration information of the components on which the Maven depends in the object file. It can be understood that after the compiling operation, a complete kernel aar package is finally output, which contains kernels so, jar and resource files, and the dependent component codes are not directly contained in the output package; the exported aar declares the required dependent component when it is uploaded to the maven repository.
The embodiment only declares the components needing to be depended on when outputting the target file, and does not contain the dependent component codes; the applications accessing the kernel do not cause conflict if the applications themselves depend on the kernel as well.
In an embodiment, referring to fig. 5, the step of calling the second module to compile using a second compiling mode to generate a second file, where the step of the second compiling mode supporting Maven dependency includes:
step S21, determining source code data generated by the file, and determining document parameters according to the source code data;
and step S22, calling a Maven component to execute compiling operation based on the document parameters and the second compiling mode to generate a second file.
During the development process, a development document, for example, a JavaDoc document, is maintained, and the source code data of the target interface is the data for writing the interface. Optionally, reading the source code data of the target interface through the JavaDoc plug-in includes reading the target source code data through a Doclet interface provided by the JavaDoc plug-in. And the JavaDoc extracts comments such as classes, methods, members and the like from the program source code to form an API help document matched with the source code. That is, only a specific set of tags is used for annotation when the program is written, and after the program is written, the development document of the program can be formed at the same time through the JavaDoc. The JavaDoc command is used for generating the API document of the user, and the use mode is as follows: and inputting Java doc + file name java in the directory where the target file is located by using the command line. And after reading the source code data of the target interface through the JavaDoc plug-in, determining the document parameters of the target interface according to the source code data.
The document parameters of the target interface comprise: request mode, request path, entry and return values. The request mode and the request path are determined by detection, and the entry and return values 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 the second compiling mode to generate a second file. And calling the Maven component through a second compiling mode and document parameters, namely the coding requirement, and the compiling mode to complete the compiling work of the second file, and compiling to form a file with accurate load kernel requirements.
Alternatively, 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 target interface corresponding to file generation;
step S02, determining a corresponding Java class according to the interface parameters;
and step S03, according to the document parameters corresponding to the java class matching.
The target interface can be an REST interface, and the Java class of the target interface is a Controller; and if the target Interface is an RPC Interface, the Java class of the target Interface is an Interface.
The Interface parameters are Interface types, the Interface types comprise REST and PRC, 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, the JavaDoc mainly analyzes and processes two classes, namely a Controller class and an Interface class, and can quickly and accurately describe the document parameters of the target interfaces of various classes. After the API interface parameters are read, in the Maven project, executing a Maven instruction to use a Maven plug-in to acquire the document parameters therein, and generating a second file.
According to the method and the device, different interface parameters are determined through different interfaces, the document parameters are determined according to the interface parameters, and the 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 scheme of the embodiment, referring to fig. 7 and 8, fig. 7 is a schematic diagram of a class diagram of a compiling process; FIG. 8 is a timing diagram of the operation of the card.
The kernel file compiling process of the embodiment includes:
according to the scheme, maven dependence is processed in a plug-in mode, the project is split into the main module and each plug-in module, the main module uses an original gn + ninja compiling mode, the plug-in modules use gradle compiling, and the gradle can well process the maven dependence.
Defining a functional interface in the main module, providing plug-in insertion logic, and compiling by using an original gn + ninja mode; realizing a functional interface in a plug-in module, inserting the plug-in module into main code logic, and compiling the plug-in module by using a gradle; and finally, generating the target file by the main module and each plug-in module together.
The benefits of kernel file compilation in this embodiment include:
the maven dependency is conveniently accessed, various types of dependencies can be completely supported, and additional development adaptation is not needed;
the output package only declares the components needing to be depended on, and does not contain the codes of the depended components; the applications accessing the kernel do not cause conflict if the applications themselves depend on the kernel as well.
The present application also proposes a file generation apparatus, referring to fig. 9, the file generation apparatus including: a control module 10 and a generation module 20,
the control module 10 is configured to invoke a first module to generate a first file by compiling in a first compiling manner;
the control module 10 is further configured to invoke a second module to compile to generate a second file by using a second compiling mode, where the second compiling mode supports Maven dependency;
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 the code logic of the main module.
Further, the generating module 20 is configured to merge the first file and the second file, and use the merged 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 in the target file.
Further, referring to fig. 11, the apparatus further includes: the decision block 50 is used to determine whether,
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, if Maven dependency needs to be supported, execute a step of calling a second module to compile to generate a second file by using a second compiling mode, where the second compiling mode supports 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 a target interface corresponding to file generation; determining a corresponding Java class according to the interface parameters; and according to the document parameters corresponding to the java class matching.
The present application also proposes a terminal, where the terminal includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to implement the following steps:
calling a first module to compile to generate a first file by using a first compiling mode;
calling a second module to compile to 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 finishes the compiling work of the browser kernel file through the connected main module and the plug-in module to form a target file. The target file is a complete kernel aar package, including but not limited to kernels so, jar, and 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 through the main module and the plug-in module.
The terminal of the application increases the support of the Maven dependency in a mode of increasing the second module, so that files of all dependencies are supported by compiling in the development process, the defects and the defects of file compiling on a certain dependency are avoided, the problem that compiling work cannot be completed occurs, the breadth of compiling support is improved, and the completeness and the accuracy of compiling file support are further improved.
The present application also proposes a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, realizes the steps of:
calling a first module to compile to generate a first file by using a first compiling mode;
calling a second module to compile to 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.
As will be appreciated by one skilled in the art, 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 flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams 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 can 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 usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
While alternative embodiments of the present application have been described, additional variations and modifications of these 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 changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (10)

1. A file generation method, characterized in that the file generation method comprises:
calling a first module to compile to generate a first file by using a first compiling mode;
calling a second module to compile to 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.
2. The file generation method of claim 1, wherein the first module is a master module and the second module is a plug-in module, and the plug-in module accesses code logic of the master module.
3. The file generation method according to claim 1, wherein the step of generating the target file from the first file and the second file comprises:
and combining the first file and the second file, and taking the combined file as a target file.
4. The file generation method according to any one of claims 1 to 3, further comprising, after the step of generating the target file from the first file and the second file:
determining component information required to be supported by the target file;
and adding declaration information of the components on which the Maven depends in the target file.
5. The file generation method according to any one of claims 1 to 3, wherein the step of calling the second module to compile and generate the second file using a second compilation mode, and before the step of supporting Maven dependency by the second compilation mode, the method further comprises:
judging whether the file generation needs to support the Maven dependence;
and if the Maven dependency needs to be supported, executing and calling a second module to compile and generate a second file by using a second compiling mode, wherein the second compiling mode supports the step of the Maven dependency.
6. The file generation method of any one of claims 1 to 3, wherein the step of calling the second module to compile using a second compilation mode to generate the second file, and the step of supporting Maven dependency in the second compilation mode 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.
7. The file generation method of claim 6, further comprising:
determining interface parameters of a target interface corresponding to file generation;
determining a corresponding Java class according to the interface parameters;
and according to the document parameters corresponding to the java class matching.
8. A file generation apparatus, characterized in that the apparatus comprises: a control module and a generation module, wherein the control module is used for controlling the generation module,
the control module is used for calling the first module to compile and generate a first file by applying a first compiling mode;
the control module is further used for calling a second module to compile to generate a second file by using a second compiling mode, and the second compiling mode supports Maven dependence;
and the generating module is used for generating a target file according to the first file and the second file.
9. 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 to generate a first file by using a first compiling mode;
calling a second module to compile to 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.
10. A computer-readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, carries out the steps of:
calling a first module to compile to generate a first file by using a first compiling mode;
calling a second module to compile to 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.
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 true CN112148303A (en) 2020-12-29
CN112148303B 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)

Cited By (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 (13)

* 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
US20200264848A1 (en) * 2019-02-14 2020-08-20 International Business Machines Corporation Single page application continuous integration, build, and deployment

Patent Citations (13)

* 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
US20200264848A1 (en) * 2019-02-14 2020-08-20 International Business Machines Corporation Single page application continuous integration, build, and deployment
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 (6)

* Cited by examiner, † Cited by third party
Title
MOB604756E7ABE8: "Ninja - chromium核心构建工具", pages 1 - 11, Retrieved from the Internet <URL:https://blog.51cto.com/u_15127513/4760430> *
NA´NDOR LICKER等: "Detecting Incorrect Build Rules", 《2019 IEEE/ACM 41ST INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE)》, 26 August 2019 (2019-08-26), pages 1234 - 1244 *
V. BAGGIOLINI等: "CBNG-THE NEW BUILD TOOL USED TO BUILD MILLIONS OF LINES OF JAVA CODE AT CERN", 《16TH INT. CONF. ON ACCELERATOR AND LARGE EXPERIMENTAL CONTROL SYSTEMS》, 31 December 2017 (2017-12-31), pages 789 - 793 *
张力文: "基于Jenkins的项目持续集成方案研究与实现", 《中国优秀硕士学位论文全文数据库 信息科技辑》, 15 July 2017 (2017-07-15), pages 138 - 164 *
张朝滨: "基于Ninja的分布式编译系统", 《中国优秀硕士学位论文全文数据库 信息科技辑》, 15 June 2016 (2016-06-15), pages 138 - 483 *
挖坑埋你: "Maven 教程(10)— Maven依赖详解", pages 1 - 9, Retrieved from the Internet <URL:https://blog.csdn.net/liupeifeng3514/article/details/79545022> *

Cited By (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

Also Published As

Publication number Publication date
CN112148303B (en) 2024-05-28

Similar Documents

Publication Publication Date Title
CN108027722B (en) Dynamically updating applications in compilation and deployment
US10152309B2 (en) Cross-library framework architecture feature sets
RU2643484C2 (en) Generation of own code from code in intermediate language for application
US9442707B2 (en) Incremental whole program compilation of code
US9389890B2 (en) Hierarchical directives-based management of runtime behaviors
US10175964B2 (en) Compiler caching for runtime routine redundancy tracking
US9436449B1 (en) Scenario-based code trimming and code reduction
US20150378871A1 (en) Techniques for edit-and-continue and enhanced optimized debugging on optimized code
US9817643B2 (en) Incremental interprocedural dataflow analysis during compilation
CN108845839B (en) Application page loading method and device and computer readable storage medium
CN103942078A (en) Method for loading driver and embedded device
EP3123315A1 (en) Hierarchical directives-based management of runtime behaviors
CN109597621B (en) Method and device for packaging Dagger, terminal equipment and storage medium
KR20070038637A (en) A method of data call stack tracing in data monitoring of java byte code
US20160077831A1 (en) Accurate and performant code design using memoization
WO2017087801A1 (en) Dynamic update of an application in compilation and deployment
US10902548B2 (en) Frame invalidation control with causality attribution
Gallant WebAssembly in action: with examples using C++ and Emscripten
KR20140050323A (en) Method and apparatus for license verification of binary file
CN112148303B (en) File generation method, device, terminal and storage medium
CN113407186A (en) Control execution method, control execution device, terminal, and readable storage medium
CN107077365B (en) Selectively loading precompiled headers and/or portions thereof
CN112685095B (en) Virtual device loading method, device, equipment and storage medium
CN111971655A (en) Native runtime techniques for hypertext markup language graphical content
US20200388174A1 (en) Method and system for automatically providing graphical user interfaces for computational algorithms described in printed publications

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