CN112667228A - Application program construction method and device and computer equipment - Google Patents
Application program construction method and device and computer equipment Download PDFInfo
- Publication number
- CN112667228A CN112667228A CN202011583035.4A CN202011583035A CN112667228A CN 112667228 A CN112667228 A CN 112667228A CN 202011583035 A CN202011583035 A CN 202011583035A CN 112667228 A CN112667228 A CN 112667228A
- Authority
- CN
- China
- Prior art keywords
- task
- construction
- application program
- configuration information
- creating
- 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.)
- Pending
Links
- 238000010276 construction Methods 0.000 claims abstract description 287
- 238000000034 method Methods 0.000 claims abstract description 100
- 238000011161 development Methods 0.000 claims description 65
- 230000008569 process Effects 0.000 claims description 36
- 238000010367 cloning Methods 0.000 claims description 4
- 230000006870 function Effects 0.000 description 11
- 238000010586 diagram Methods 0.000 description 10
- 230000010354 integration Effects 0.000 description 8
- 238000004590 computer program Methods 0.000 description 6
- 238000012545 processing Methods 0.000 description 6
- 230000003287 optical effect Effects 0.000 description 5
- 230000007246 mechanism Effects 0.000 description 4
- 238000004891 communication Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 239000000463 material Substances 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 238000004540 process dynamic Methods 0.000 description 2
- 230000004075 alteration Effects 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/35—Creation or generation of source code model driven
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Stored Programmes (AREA)
Abstract
The application provides a construction method and a construction device of an application program and computer equipment, wherein the method comprises the following steps: receiving an application program creating instruction and creating configuration information of a developer client; creating a template of the application program in the construction server according to the application program creating instruction and the creating configuration information; receiving a task construction instruction and task configuration information of a developer client; creating a construction task in the construction server according to the task construction instruction and the task configuration information; and receiving the application program package generated by the construction server and sending the application program package to the developer client, so that the developer can select different construction task configuration information according to actual requirements and generate the application program package, thereby being suitable for application program construction tasks with different requirements, having good adaptability, and the pre-configured components can be expanded according to the requirements of the developer, and having strong expansibility and high construction efficiency of the application program.
Description
Technical Field
The present application relates to the field of information processing technologies, and in particular, to a method and an apparatus for constructing an application program, and a computer device.
Background
In the related technology, the construction method of the application program mainly comprises the steps of obtaining a Jenkins continuous integration tool provided by a third party; configuring a program on the continuous integration tool to construct required components according to the plug-in of the continuous integration tool; configuring a working space, a code hosting platform address, parameters required during construction and the like on the continuous integration tool; the build process of the application is then performed based on the build tasks created by the developer and the selected parameters.
In the above scheme, the tool provided by the third party is strongly dependent on, the configurable components in the tool provided by the third party are limited, and are difficult to be applied to the application program construction tasks with different requirements, and the adaptability is poor, and the configurable components are not adjustable and have poor expansibility, which results in poor construction efficiency of the application program.
Disclosure of Invention
The present application is directed to solving, at least to some extent, one of the technical problems in the related art.
According to the application program construction method, a developer can select different construction task configuration information according to actual requirements, the construction tasks are created by combining the different construction task configuration information, and the application program package is generated, so that the application program construction method is suitable for the application program construction tasks with different requirements, and is good in adaptability, the pre-configured components can be expanded according to the requirements of the developer, the expansibility is strong, and the construction efficiency of the application program is high.
An embodiment of a first aspect of the present application provides a method for constructing an application program, including:
receiving an application program creating instruction and creating configuration information of a developer client;
creating a template of the application program in a construction server according to the application program creating instruction and the creating configuration information;
receiving a task construction instruction and task configuration information of the developer client;
creating a construction task in the construction server according to the task construction instruction and the task configuration information; and
and receiving an application program package generated by the construction server and sending the application program package to the developer client, wherein the application program package is generated according to the construction task and the template of the application program.
According to the construction method of the application program, the application program creation instruction and the creation configuration information of the developer client are received; creating a template of the application program in the construction server according to the application program creating instruction and the creating configuration information; receiving a task construction instruction and task configuration information of a developer client; creating a construction task in the construction server according to the task construction instruction and the task configuration information; and receiving an application package generated by the construction server and sending the application package to the developer client, wherein the application package is generated according to the construction task and the template of the application program. In the scheme, a developer can select different construction task configuration information according to actual requirements, the construction tasks are created by combining the different construction task configuration information, and the application package is generated, so that the method and the device are suitable for the construction tasks of the application programs with different requirements, the adaptability is good, the pre-configured components can be expanded according to the requirements of the developer, the expansibility is strong, and the construction efficiency of the application programs is high.
An embodiment of a second aspect of the present application provides a method for constructing an application program, including:
receiving an application program creating instruction and creating configuration information sent by a developer client through a mobile development platform;
creating a template of the application program according to the application program creating instruction and the creating configuration information;
receiving a task construction instruction and task configuration information sent by the developer client through the mobile development platform;
creating a construction task according to the task construction instruction and the task configuration information;
executing the construction task, and generating an application program package by combining the template of the application program in the execution process of the construction task;
and sending the application program package to the developer client through the mobile development platform.
According to the construction method of the application program, the application program creation instruction and the creation configuration information sent by a developer client through a mobile development platform are received; creating a template of the application program according to the application program creating instruction and the creating configuration information; receiving a task construction instruction and task configuration information sent by a developer client through a mobile development platform; establishing a construction task according to the task construction instruction and the task configuration information; executing the construction task, and generating an application package by combining a template of an application program in the execution process of the construction task; and sending the application program package to the developer client through the mobile development platform. In the scheme, a developer can select different construction task configuration information according to actual requirements, the construction tasks are created by combining the different construction task configuration information, and the application package is generated, so that the method and the device are suitable for the construction tasks of the application programs with different requirements, the adaptability is good, the pre-configured components can be expanded according to the requirements of the developer, the expansibility is strong, and the construction efficiency of the application programs is high.
An embodiment of a third aspect of the present application provides an apparatus for constructing an application, including:
the receiving module is used for receiving an application program creating instruction and creating configuration information of a developer client;
the first creating module is used for creating a template of the application program in the construction server according to the application program creating instruction and the creating configuration information;
the receiving module is further used for receiving a task construction instruction and task configuration information of the developer client;
the second establishing module is used for establishing a construction task in the construction server according to the task construction instruction and the task configuration information; and
the receiving module is further configured to receive an application package generated by the build server and send the application package to the developer client, where the application package is generated according to the build task and the template of the application.
The application program constructing device receives an application program establishing instruction and establishing configuration information of a developer client; creating a template of the application program in the construction server according to the application program creating instruction and the creating configuration information; receiving a task construction instruction and task configuration information of a developer client; creating a construction task in the construction server according to the task construction instruction and the task configuration information; and receiving an application package generated by the construction server and sending the application package to the developer client, wherein the application package is generated according to the construction task and the template of the application program. In the scheme, a developer can select different construction task configuration information according to actual requirements, the construction tasks are created by combining the different construction task configuration information, and the application package is generated, so that the method and the device are suitable for the construction tasks of the application programs with different requirements, the adaptability is good, the pre-configured components can be expanded according to the requirements of the developer, the expansibility is strong, and the construction efficiency of the application programs is high.
An embodiment of a fourth aspect of the present application provides an apparatus for constructing an application, including:
the receiving module is used for receiving an application program creating instruction and creating configuration information sent by a developer client through a mobile development platform;
the first establishing module is used for establishing a template of the application program according to the application program establishing instruction and the establishing configuration information;
the receiving module is further configured to receive a task construction instruction and task configuration information sent by the developer client through the mobile development platform;
the second establishing module is used for establishing and constructing tasks according to the task establishing instructions and the task configuration information;
the execution module is used for executing the construction task and generating an application package by combining the template of the application program in the execution process of the construction task;
and the sending module is used for sending the application program package to the developer client through the mobile development platform.
The application program constructing device receives an application program establishing instruction and establishing configuration information sent by a developer client through a mobile development platform; creating a template of the application program according to the application program creating instruction and the creating configuration information; receiving a task construction instruction and task configuration information sent by a developer client through a mobile development platform; establishing a construction task according to the task construction instruction and the task configuration information; executing the construction task, and generating an application package by combining a template of an application program in the execution process of the construction task; and sending the application program package to the developer client through the mobile development platform. In the scheme, a developer can select different construction task configuration information according to actual requirements, the construction tasks are created by combining the different construction task configuration information, and the application package is generated, so that the method and the device are suitable for the construction tasks of the application programs with different requirements, the adaptability is good, the pre-configured components can be expanded according to the requirements of the developer, the expansibility is strong, and the construction efficiency of the application programs is high.
An embodiment of a fifth aspect of the present application provides a computer device, including: the application program comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, and when the processor executes the program, the application program construction method is realized as the application program construction method provided by the embodiment of the first aspect of the application.
A sixth aspect of the present application provides a computer program product, which, when executed by an instruction processor in the computer program product, performs the method for constructing an application program provided in the first aspect of the present application.
Additional aspects and advantages of the present application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the present application.
Drawings
The foregoing and/or additional aspects and advantages of the present application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 is a schematic flowchart of a method for constructing an application according to an embodiment of the present application;
FIG. 2 is a schematic diagram of interaction between a developer client, a mobile development platform, and a build server;
FIG. 3 is a schematic storage diagram of management data in the MySql database of the mobile development platform;
fig. 4 is a flowchart illustrating a method for constructing an application program according to a second embodiment of the present application;
fig. 5 is a schematic structural diagram of an application building apparatus according to a third embodiment of the present application;
fig. 6 is a schematic structural diagram of an application program constructing apparatus according to a fourth embodiment of the present application;
FIG. 7 illustrates a block diagram of an exemplary computer device suitable for use to implement embodiments of the present application.
Detailed Description
Reference will now be made in detail to embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are exemplary and intended to be used for explaining the present application and should not be construed as limiting the present application.
According to a traditional construction method of the application program, components required by program construction are configured on a continuous integration tool in combination with a plug-in of a Jenkins continuous integration tool provided by a third party, a working space, a code hosting platform address, parameters required during construction and the like are set on the continuous integration tool, and then the construction process of the application program is executed according to a construction task created by a developer. The scheme strongly depends on a tool provided by a third party, and has poor adaptability and expansibility, so that the construction efficiency of the application program is poor.
Therefore, the application provides a method for constructing the application program, mainly aiming at the technical problems that the application program is poor in adaptability, expansibility and construction efficiency of the application program depending on a Jenkins continuous integration tool provided by a third party in the prior art.
According to the construction method of the application program, the application program creation instruction and the creation configuration information of the developer client are received; creating a template of the application program in the construction server according to the application program creating instruction and the creating configuration information; receiving a task construction instruction and task configuration information of a developer client; creating a construction task in the construction server according to the task construction instruction and the task configuration information; and receiving an application package generated by the construction server and sending the application package to the developer client, wherein the application package is generated according to the construction task and the template of the application program. In the scheme, a developer can select different construction task configuration information according to actual requirements, the construction tasks are created by combining the different construction task configuration information, and the application package is generated, so that the method and the device are suitable for the construction tasks of the application programs with different requirements, the adaptability is good, the pre-configured components can be expanded according to the requirements of the developer, the expansibility is strong, and the construction efficiency of the application programs is high.
The following describes a method, an apparatus, and a computer device for constructing an application program according to an embodiment of the present application with reference to the drawings.
Fig. 1 is a flowchart illustrating a method for constructing an application according to an embodiment of the present application.
The embodiment of the present application is exemplified by configuring the construction method of the application in the construction device of the application, and the construction device of the application can be applied in any computer device, for example, a mobile development platform, so that the mobile development platform can execute the construction function of the application.
As shown in fig. 1, the method for constructing the application program may include the following steps:
step 101, receiving an application program creating instruction and creating configuration information of a developer client.
In the embodiment of the application, the developer client can serve the front end interacting with the developer. The mobile development platform is a mobile development platform service based on the MySql database. The developer client and the mobile development platform can communicate through a RESTful API (application programming interface), that is, the developer client can send data to the mobile development platform by calling the RESTful API. Correspondingly, the mobile development platform may receive the creation configuration information of the developer client through a restful API interface with the developer client, for example.
In the embodiment of the application, the manner in which the mobile development platform receives the application creation instruction of the developer client may be, for example, that the developer refers to a custom construction open source tool in a preset project code root directory through the developer client, and the mobile development platform determines to receive the application creation instruction of the developer client when acquiring the construction open source tool in the preset project code root directory.
In the embodiment of the present application, the creation configuration information sent by the developer client may include the following parameters, for example: addresses of the code hosting platform, etc., in order for the mobile development platform to create templates for applications among the build servers.
And step 102, creating a template of the application program in the construction server according to the application program creating instruction and the creating configuration information.
In this embodiment of the application, when the creation configuration information includes an address of the code hosting platform, the mobile development platform may execute the process of step 102, for example, to create a workspace corresponding to the application program in the build server according to the application program creation instruction; and adding the main branch code of the application program on the code hosting platform in the working space corresponding to the application program to generate a template of the application program.
In this embodiment of the application, the mobile development platform may specifically send the application creation instruction and the creation configuration information to the build server, and the build server creates a working space corresponding to the application when receiving the application creation instruction and the creation configuration information, acquires the main branch code of the application from the code hosting platform according to the address of the code hosting platform, copies the main branch code to the working space, and generates the template of the application. Wherein the primary branch code is saved under a primary directory in the workspace.
And 103, receiving a task construction instruction and task configuration information of the developer client.
In this embodiment of the application, the process of the mobile development platform to execute step 103 may be, for example, receiving a task construction instruction and task configuration information of the developer client through a restful API interface with the developer client.
In this embodiment, the task configuration information may include: and building version information of each component required by the application program so as to acquire the component code of the corresponding version from the code hosting platform. The components required for building the application program, such as project automation building open source tool gradle based on the concepts of Apache Ant and Apache Maven, Native Development Kit (NDK) used by different C/C + + codes, CPU architecture, and the like. Among them, the function of dynamically modifying the CPU architecture version is provided in the gradle tool.
And 104, creating a construction task in the construction server according to the task construction instruction and the task configuration information.
In this embodiment of the application, in the case that the template of the application is a workspace added with a main branch code of the application, the process of the mobile development platform executing step 104 may be, for example, creating a task branch directory copied with the main branch code in the workspace corresponding to the application according to the task construction instruction; and calling corresponding construction services according to the task configuration information, and loading the corresponding construction services to the task branch directory to generate a construction task. The construction server can synchronize the task branch directory and the working space through code cloning or code pulling.
In the embodiment of the application, the mobile development platform can specifically send the task construction instruction to the construction server, and call the corresponding construction service according to the task configuration information. The construction server creates a task branch directory in a working space corresponding to the application program according to the task construction instruction; obtaining main branch codes in a working space, and copying the main branch codes to a task branch directory; and when receiving a call request of the construction service corresponding to the task configuration information, loading the corresponding construction service to the task branch directory to generate the construction task.
In the embodiment of the present application, it should be noted that there may be a plurality of construction tasks of the same application, and each construction task corresponds to one sub-process, that is, if an application includes a plurality of branches, parallel execution of the construction tasks corresponding to the plurality of branches may be implemented, so that parallel construction of the plurality of branches may be implemented, and the construction processes of the branches do not interfere with each other, thereby speeding up construction efficiency of the application. In addition, the construction processes of different application programs are not interfered with each other, so that the parallel construction of a plurality of application programs can be realized, and the construction efficiency of the application programs is further accelerated. In addition, the same build service may also perform multiple build tasks.
Further, in the embodiment of the present application, version information of each component may be extended, that is, when there is new version information of a certain component, a plurality of building templates may be created in combination with new version information of the component and version information of other components, so that a developer sets task configuration information. Correspondingly, before step 104, the mobile development platform may further perform the following processes: receiving a construction template creating instruction of a developer client, wherein the construction template creating instruction comprises the following steps: template configuration information, wherein the template configuration information comprises: all components required by the task and version information corresponding to each component; and creating a plurality of construction templates according to the template configuration information, so that the developer selects the construction template from the plurality of created construction templates to generate the task configuration information.
And 105, receiving an application package generated by the construction server and sending the application package to the developer client, wherein the application package is generated according to the construction task and the template of the application program.
In the embodiment of the application, after the build task is created, when the execution time of the build task is reached, a process of executing the build task by a build service in a build server may be, for example, to obtain, from a code hosting platform, a component code having version information of each component in task configuration information according to the version information of the component in the task configuration information, add the obtained component codes of a plurality of components to a task branch directory, obtain a code file of an application program, compile and package the code file, and the like, so as to obtain an application package.
Wherein, the task configuration information includes: version information of a plurality of components. The method for obtaining the version information of each component in the task configuration information by the construction service in the construction server may be, for example, obtaining the version information of each component through child process mechanism child _ process.exec (command, { env }), further obtaining a component code corresponding to the version information, and executing gradle assembly debug or gradle assembly release in the child process to construct and generate a debug or release packet. All constructed sub-processes on the construction service are stored in a construction queue by taking the build id as key and the process id as value, and the corresponding sub-process dynamic kill constructed sub-process can be found according to the build id in the construction process, so that the capability of canceling the corresponding constructed sub-process is achieved.
In the embodiment of the application, after the application package is built, the building server can store the application package into the file server, and notify the developer client to download the application package through the mobile development platform through the websocket long connection mechanism, so that the developer client can download the application package on the file server through the mobile development platform. In the embodiment of the present application, a schematic diagram of interaction between a developer client, a mobile development platform and a build server can be shown in fig. 2, for example. In fig. 2, the developer client is used to create templates for applications, different build templates, and trigger build tasks. The mobile development platform is used for managing application programs, constructing tasks, constructing records, constructing task states and the like, and is responsible for communication between the construction server and the developer client. The builder server is used for calling the build service to execute the build task and generating the application package to return to the developer client. Wherein, DB refers to MySql database for storing management data of the mobile development platform, and the like. The file server is used for storing the application program package so as to be downloaded by the developer client.
In the embodiment of the present application, for example, as shown in fig. 3, a storage diagram of management data in the MySql database of the mobile development platform may be that, in fig. 3, basic information of an application program, construction record information, a construction task, a correspondence between the construction task and a development task of a developer, and the like are stored. The basic information of the application program includes, for example, an identifier (APP _ id) of the application program (APP), an address (git _ clone _ url) of the code hosting platform (git), and workspace information (git _ clone _ local _ path) of the application program. The task configuration information for constructing the task comprises the following steps: the method comprises the steps of identifying an application program, identifying an adopted construction template (template _ id), identifying version information of a gradle tool (gradle _ version), identifying version information of a native development kit (ndk _ version), identifying version information of a CPU architecture (abiFilters), identifying task branch directory information (apk _ build _ output _ path), and the like.
According to the construction method of the application program, the application program creation instruction and the creation configuration information of the developer client are received; creating a template of the application program in the construction server according to the application program creating instruction and the creating configuration information; receiving a task construction instruction and task configuration information of a developer client; creating a construction task in the construction server according to the task construction instruction and the task configuration information; and receiving an application package generated by the construction server and sending the application package to the developer client, wherein the application package is generated according to the construction task and the template of the application program. In the scheme, a developer can select different construction task configuration information according to actual requirements, the construction tasks are created by combining the different construction task configuration information, and the application package is generated, so that the method and the device are suitable for the construction tasks of the application programs with different requirements, the adaptability is good, the pre-configured components can be expanded according to the requirements of the developer, the expansibility is strong, and the construction efficiency of the application programs is high.
Fig. 4 is a flowchart illustrating a method for constructing an application program according to a second embodiment of the present application.
The embodiment of the present application is exemplified in that the construction method of the application is configured in the construction device of the application, and the construction device of the application can be applied to any computer device, for example, a construction server, so that the construction server can execute the construction function of the application.
As shown in fig. 4, the method for constructing the application program may include the following steps:
step 401, receiving an application program creating instruction and creating configuration information sent by a developer client through a mobile development platform.
In the embodiment of the application, communication between the build server and the mobile development platform may be realized through Remote Procedure Call (RPC), that is, the mobile development platform may send the application program creation instruction and the creation configuration information to the build server through the RPC.
In the embodiment of the present application, the creating configuration information may include, for example, the following parameters: addresses of the code hosting platform, etc., in order for the build server to create a template for the application in conjunction with the main branch code of the application on the code hosting platform.
Step 402, according to the application program creating instruction and the creating configuration information, a template of the application program is created.
In this embodiment of the present application, creating the configuration information may include: an address of a code hosting platform; correspondingly, the process of the construction server executing step 402 may be, for example, creating a workspace corresponding to the application program according to the application program creation instruction; acquiring a main branch code of the application program from a code hosting platform according to the address of the code hosting platform; and adding the main branch code into the working space and generating a template of the application program.
And 403, receiving a task construction instruction and task configuration information sent by the developer client through the mobile development platform.
In the embodiment of the application, the mobile development platform can send the task construction instruction and the task configuration information to the construction server through Remote Procedure Call (RPC). The task configuration information may include: and the version information of each component required by the application program is built, so that the building server acquires the component code of the corresponding version from the code hosting platform according to the version information of each component.
And step 404, creating a construction task according to the task construction instruction and the task configuration information.
In this embodiment of the present application, the process of the construction server executing step 404 may be, for example, creating a task branch directory in a workspace corresponding to the application program according to the task construction instruction; acquiring main branch codes in a working space; copying the main branch code into a task branch directory; and when receiving a call request of the construction service corresponding to the task configuration information, loading the corresponding construction service to the task branch directory to generate the construction task. The construction server can synchronize the task branch directory and the working space through code cloning or code pulling.
And 405, executing the construction task, and generating an application package by combining the templates of the application program in the execution process of the construction task.
In the embodiment of the present application, it should be noted that there may be a plurality of construction tasks of the same application, and each construction task corresponds to one sub-process, that is, if an application includes a plurality of branches, parallel execution of the construction tasks corresponding to the plurality of branches may be implemented, so that parallel construction of the plurality of branches may be implemented, and the construction processes of the branches do not interfere with each other, thereby speeding up construction efficiency of the application. In addition, the construction processes of different application programs are not interfered with each other, so that the parallel construction of a plurality of application programs can be realized, and the construction efficiency of the application programs is further accelerated. In addition, the same build service may also perform multiple build tasks.
In the embodiment of the application, after the build task is created, when the execution time of the build task is reached, a process of executing the build task by a build service in a build server may be, for example, to obtain, from a code hosting platform, a component code having version information of each component in task configuration information according to the version information of the component in the task configuration information, add the obtained component codes of a plurality of components to a task branch directory, obtain a code file of an application program, compile and package the code file, and the like, so as to obtain an application package.
Wherein, the task configuration information includes: version information of a plurality of components. The method for obtaining the version information of each component in the task configuration information by the construction service in the construction server may be, for example, obtaining the version information of each component through child process mechanism child _ process.exec (command, { env }), further obtaining a component code corresponding to the version information, and executing gradle assembly debug or gradle assembly release in the child process to construct and generate a debug or release packet. All constructed sub-processes on the construction service are stored in a construction queue by taking the build id as key and the process id as value, and the corresponding sub-process dynamic kill constructed sub-process can be found according to the build id in the construction process, so that the capability of canceling the corresponding constructed sub-process is achieved.
And step 406, sending the application package to the developer client through the mobile development platform.
In the embodiment of the application, after the application package is built, the building server can store the application package into the file server, and notify the developer client to download the application package through the mobile development platform through the websocket long connection mechanism, so that the developer client can download the application package on the file server through the mobile development platform.
According to the construction method of the application program, the application program creation instruction and the creation configuration information sent by a developer client through a mobile development platform are received; creating a template of the application program according to the application program creating instruction and the creating configuration information; receiving a task construction instruction and task configuration information sent by a developer client through a mobile development platform; establishing a construction task according to the task construction instruction and the task configuration information; executing the construction task, and generating an application package by combining a template of an application program in the execution process of the construction task; and sending the application program package to the developer client through the mobile development platform. In the scheme, a developer can select different construction task configuration information according to actual requirements, the construction tasks are created by combining the different construction task configuration information, and the application package is generated, so that the method and the device are suitable for the construction tasks of the application programs with different requirements, the adaptability is good, the pre-configured components can be expanded according to the requirements of the developer, the expansibility is strong, and the construction efficiency of the application programs is high.
Fig. 5 is a schematic structural diagram of an application program constructing apparatus according to a third embodiment of the present application.
As shown in fig. 5, the application building apparatus 500 may include: a receiving module 510, a first creating module 520, and a second creating module 530.
The receiving module 510 is configured to receive an application program creating instruction and creating configuration information of a developer client;
a first creating module 520, configured to create a template of an application program in the build server according to the application program creating instruction and the creation configuration information;
the receiving module 510 is further configured to receive a task construction instruction and task configuration information of the developer client;
a second creating module 530, configured to create a build task in the build server according to the task build instruction and the task configuration information; and
the receiving module 510 is further configured to receive an application package generated by the build server, and send the application package to the developer client, where the application package is generated according to the build task and the template of the application.
Further, in a possible implementation manner of the embodiment of the present application, the receiving module 510 is specifically configured to determine to receive an application program creation instruction of the developer client when a construction open source tool is acquired under a preset root directory of an engineering code; and receiving the creation configuration information of the developer client through a RESTful API interface between the developer client and the developer client.
Further, in a possible implementation manner of the embodiment of the present application, the creating configuration information includes: an address of a code hosting platform; correspondingly, the first creating module 520 is specifically configured to create, according to the application creating instruction, a workspace corresponding to the application in the build server; and adding the main branch code of the application program on the code hosting platform in the working space corresponding to the application program, and generating a template of the application program.
Further, in a possible implementation manner of the embodiment of the present application, the receiving module 510 is specifically configured to receive the task construction instruction and the task configuration information of the developer client through a restful API interface between the developer client and the developer client.
Further, in a possible implementation manner of the embodiment of the present application, the template of the application program is a workspace to which a main branch code of the application program is added; correspondingly, the second creating module 530 is specifically configured to create, according to the task building instruction, a task branch directory copied with the main branch code in a workspace corresponding to the application program; and calling corresponding construction services according to the task configuration information, and loading the corresponding construction services to the task branch directory to generate the construction tasks.
Further, in a possible implementation manner of the embodiment of the present application, the receiving module 510 is further configured to receive a building template creating instruction of a developer client, where the building template creating instruction includes: template configuration information, wherein the template configuration information comprises: all components required by the task and version information corresponding to each component; the first creating module 520 is further configured to create a plurality of building templates according to the template configuration information, so that the developer selects a building template from the created plurality of building templates to generate task configuration information.
Further, in a possible implementation manner of the embodiment of the present application, the number of the construction tasks is multiple, and each of the construction tasks corresponds to one sub-process.
The application program constructing device receives an application program establishing instruction and establishing configuration information of a developer client; creating a template of the application program in the construction server according to the application program creating instruction and the creating configuration information; receiving a task construction instruction and task configuration information of a developer client; creating a construction task in the construction server according to the task construction instruction and the task configuration information; and receiving an application package generated by the construction server and sending the application package to the developer client, wherein the application package is generated according to the construction task and the template of the application program. In the scheme, a developer can select different construction task configuration information according to actual requirements, the construction tasks are created by combining the different construction task configuration information, and the application package is generated, so that the method and the device are suitable for the construction tasks of the application programs with different requirements, the adaptability is good, the pre-configured components can be expanded according to the requirements of the developer, the expansibility is strong, and the construction efficiency of the application programs is high.
Fig. 6 is a schematic structural diagram of an application program constructing apparatus according to a fourth embodiment of the present application.
As shown in fig. 6, the application building apparatus 600 may include: a receiving module 610, a first creating module 620, a second creating module 630, an executing module 640, and a transmitting module 650.
The receiving module 610 is configured to receive an application program creating instruction and creating configuration information sent by a developer client through a mobile development platform;
a first creating module 620, configured to create a template of an application according to the application creating instruction and the creating configuration information;
the receiving module 610 is further configured to receive a task construction instruction and task configuration information sent by the developer client through the mobile development platform;
a second creating module 630, configured to create a construction task according to the task construction instruction and the task configuration information;
the execution module 640 is configured to execute the build task, and generate an application package in combination with the template of the application program during the execution process of the build task;
a sending module 650, configured to send the application package to the developer client through the mobile development platform.
Further, in a possible implementation manner of the embodiment of the present application, the receiving module 610 is specifically configured to receive the application program creating instruction and the creating configuration information sent by the mobile development platform through a remote procedure call interface.
Further, in a possible implementation manner of the embodiment of the present application, the creating configuration information includes: an address of a code hosting platform; correspondingly, the first creating module 620 is specifically configured to create a workspace corresponding to the application program according to the application program creating instruction; acquiring the main branch code of the application program from the code hosting platform according to the address of the code hosting platform; and adding the main branch code into the workspace to generate a template of the application program.
Further, in a possible implementation manner of the embodiment of the present application, the second creating module 630 is specifically configured to create a task branch directory in a workspace corresponding to the application program according to the task building instruction; obtaining main branch code in the workspace; copying the main branch code into the task branch directory; and when a call request of a construction service corresponding to the task configuration information is received, loading the corresponding construction service to the task branch directory to generate a construction task.
Further, in a possible implementation manner of the embodiment of the present application, the apparatus further includes: and the synchronization module is used for synchronizing the task branch directory and the working space through code cloning.
Further, in a possible implementation manner of the embodiment of the present application, the number of the construction tasks is multiple, and each of the construction tasks corresponds to one sub-process.
The application program constructing device receives an application program establishing instruction and establishing configuration information sent by a developer client through a mobile development platform; creating a template of the application program according to the application program creating instruction and the creating configuration information; receiving a task construction instruction and task configuration information sent by a developer client through a mobile development platform; establishing a construction task according to the task construction instruction and the task configuration information; executing the construction task, and generating an application package by combining a template of an application program in the execution process of the construction task; and sending the application program package to the developer client through the mobile development platform. In the scheme, a developer can select different construction task configuration information according to actual requirements, the construction tasks are created by combining the different construction task configuration information, and the application package is generated, so that the method and the device are suitable for the construction tasks of the application programs with different requirements, the adaptability is good, the pre-configured components can be expanded according to the requirements of the developer, the expansibility is strong, and the construction efficiency of the application programs is high.
In order to implement the foregoing embodiments, the present application also provides a computer device, including: the application program comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, and when the processor executes the program, the application program construction method is realized according to the embodiment of the application program.
In order to implement the foregoing embodiments, the present application also proposes a computer program product, which, when being executed by an instruction processor in the computer program product, executes the method for constructing the application program proposed by the foregoing embodiments of the present application.
FIG. 7 illustrates a block diagram of an exemplary computer device suitable for use to implement embodiments of the present application. The computer device 12 shown in fig. 7 is only an example, and should not bring any limitation to the function and the scope of use of the embodiments of the present application.
As shown in FIG. 7, computer device 12 is in the form of a general purpose computing device. The components of computer device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally perform the functions and/or methodologies of the embodiments described herein.
The processing unit 16 executes various functional applications and data processing, for example, implementing the methods mentioned in the foregoing embodiments, by executing programs stored in the system memory 28.
In the description herein, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present application, "plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing steps of a custom logic function or process, and alternate implementations are included within the scope of the preferred embodiment of the present application in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present application.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present application may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. Although embodiments of the present application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present application, and that variations, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present application.
Claims (17)
1. A method for constructing an application program, comprising:
receiving an application program creating instruction and creating configuration information of a developer client;
creating a template of the application program in a construction server according to the application program creating instruction and the creating configuration information;
receiving a task construction instruction and task configuration information of the developer client;
creating a construction task in the construction server according to the task construction instruction and the task configuration information; and
and receiving an application program package generated by the construction server and sending the application program package to the developer client, wherein the application program package is generated according to the construction task and the template of the application program.
2. The method of claim 1, wherein receiving application creation instructions and creation configuration information for a developer client comprises:
when a construction open source tool is acquired under a preset project code root directory, determining to receive an application program creating instruction of the developer client;
and receiving the creation configuration information of the developer client through a RESTful API interface between the developer client and the developer client.
3. The method of claim 1, wherein the creating configuration information comprises: an address of a code hosting platform;
the creating a template of the application program in the construction server according to the application program creating instruction and the creating configuration information comprises the following steps:
according to the application program creating instruction, creating a working space corresponding to the application program in the building server;
and adding the main branch code of the application program on the code hosting platform in the working space corresponding to the application program, and generating a template of the application program.
4. The method of claim 1, wherein the receiving task build instructions and task configuration information for the developer client comprises:
receiving the task construction instruction and the task configuration information of the developer client through a RESTful API interface between the developer client and the developer client.
5. The method of claim 1, wherein the template of the application is a workspace with added primary branch code of the application;
creating a construction task in the construction server according to the task construction instruction and the task configuration information, wherein the creating of the construction task in the construction server comprises:
according to the task building instruction, a task branch directory copied with the main branch codes is created in a working space corresponding to the application program;
and calling corresponding construction services according to the task configuration information, and loading the corresponding construction services to the task branch directory to generate the construction tasks.
6. The method of claim 5, wherein prior to creating a build task among the build servers according to the task build instructions and the task configuration information, further comprising:
receiving a build template creation instruction of a developer client, wherein the build template creation instruction comprises: template configuration information, wherein the template configuration information comprises: all components required by the task and version information corresponding to each component;
and creating a plurality of construction templates according to the template configuration information, so that the developer selects the construction template from the plurality of created construction templates to generate the task configuration information.
7. The method of claim 1, wherein the build task is plural and each build task corresponds to a sub-process.
8. A method for constructing an application program, comprising:
receiving an application program creating instruction and creating configuration information sent by a developer client through a mobile development platform;
creating a template of the application program according to the application program creating instruction and the creating configuration information;
receiving a task construction instruction and task configuration information sent by the developer client through the mobile development platform;
creating a construction task according to the task construction instruction and the task configuration information;
executing the construction task, and generating an application program package by combining the template of the application program in the execution process of the construction task;
and sending the application program package to the developer client through the mobile development platform.
9. The method of claim 8, wherein receiving application creation instructions and creation configuration information sent by a developer client through a mobile development platform comprises:
and receiving the application program creating instruction and the creating configuration information sent by the mobile development platform through a remote procedure call interface.
10. The method of claim 8, wherein the creating configuration information comprises: an address of a code hosting platform;
the creating a template of the application program according to the application program creating instruction and the creating configuration information comprises the following steps:
according to the application program creating instruction, creating a working space corresponding to the application program;
acquiring the main branch code of the application program from the code hosting platform according to the address of the code hosting platform;
and adding the main branch code into the workspace to generate a template of the application program.
11. The method of claim 10, wherein creating a build task based on the task build instructions and the task configuration information comprises:
according to the task construction instruction, a task branch directory is created in a working space corresponding to the application program;
obtaining main branch code in the workspace;
copying the main branch code into the task branch directory;
and when a call request of a construction service corresponding to the task configuration information is received, loading the corresponding construction service to the task branch directory to generate a construction task.
12. The method of claim 10, further comprising:
and synchronizing the task branch directory and the working space through code cloning.
13. The method of claim 8, wherein the build task is plural and each build task corresponds to a sub-process.
14. An apparatus for building an application program, comprising:
the receiving module is used for receiving an application program creating instruction and creating configuration information of a developer client;
the first creating module is used for creating a template of the application program in the construction server according to the application program creating instruction and the creating configuration information;
the receiving module is further used for receiving a task construction instruction and task configuration information of the developer client;
the second establishing module is used for establishing a construction task in the construction server according to the task construction instruction and the task configuration information; and
the receiving module is further configured to receive an application package generated by the build server and send the application package to the developer client, where the application package is generated according to the build task and the template of the application.
15. An apparatus for building an application program, comprising:
the receiving module is used for receiving an application program creating instruction and creating configuration information sent by a developer client through a mobile development platform;
the first establishing module is used for establishing a template of the application program according to the application program establishing instruction and the establishing configuration information;
the receiving module is further configured to receive a task construction instruction and task configuration information sent by the developer client through the mobile development platform;
the second establishing module is used for establishing and constructing tasks according to the task establishing instructions and the task configuration information;
the execution module is used for executing the construction task and generating an application package by combining the template of the application program in the execution process of the construction task;
and the sending module is used for sending the application program package to the developer client through the mobile development platform.
16. A computer device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-13.
17. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-13.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011583035.4A CN112667228A (en) | 2020-12-28 | 2020-12-28 | Application program construction method and device and computer equipment |
PCT/CN2021/124752 WO2022142601A1 (en) | 2020-12-28 | 2021-10-19 | Application program construction method and apparatus, and computer device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011583035.4A CN112667228A (en) | 2020-12-28 | 2020-12-28 | Application program construction method and device and computer equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112667228A true CN112667228A (en) | 2021-04-16 |
Family
ID=75411159
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011583035.4A Pending CN112667228A (en) | 2020-12-28 | 2020-12-28 | Application program construction method and device and computer equipment |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN112667228A (en) |
WO (1) | WO2022142601A1 (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2022142601A1 (en) * | 2020-12-28 | 2022-07-07 | 京东科技控股股份有限公司 | Application program construction method and apparatus, and computer device |
CN114880116A (en) * | 2022-04-27 | 2022-08-09 | 远光软件股份有限公司 | Multi-version operation method, electronic equipment and storage medium |
CN115460194A (en) * | 2022-08-20 | 2022-12-09 | 杭州沧浪健康管理有限公司 | Applet construction uploading method and device, computer equipment and storage medium |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116954586B (en) * | 2023-08-02 | 2024-05-07 | 上海数慧系统技术有限公司 | Space application construction method and system and electronic equipment |
CN116991374B (en) * | 2023-09-27 | 2024-01-19 | 北京凌云雀科技有限公司 | Control method, device, electronic equipment and medium for constructing continuous integration task |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108182058A (en) * | 2017-12-27 | 2018-06-19 | 北京星河星云信息技术有限公司 | A kind of software development methodology and cloud development platform based on cloud platform |
US10963230B2 (en) * | 2019-02-14 | 2021-03-30 | International Business Machines Corporation | Single page application continuous integration, build, and deployment |
CN111552508B (en) * | 2020-04-29 | 2023-03-14 | 杭州数梦工场科技有限公司 | Application program version construction method and device and electronic equipment |
CN111596928B (en) * | 2020-05-19 | 2021-08-13 | 吉林大学 | Application control method and device and electronic equipment |
CN112667228A (en) * | 2020-12-28 | 2021-04-16 | 京东数字科技控股股份有限公司 | Application program construction method and device and computer equipment |
-
2020
- 2020-12-28 CN CN202011583035.4A patent/CN112667228A/en active Pending
-
2021
- 2021-10-19 WO PCT/CN2021/124752 patent/WO2022142601A1/en active Application Filing
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2022142601A1 (en) * | 2020-12-28 | 2022-07-07 | 京东科技控股股份有限公司 | Application program construction method and apparatus, and computer device |
CN114880116A (en) * | 2022-04-27 | 2022-08-09 | 远光软件股份有限公司 | Multi-version operation method, electronic equipment and storage medium |
CN115460194A (en) * | 2022-08-20 | 2022-12-09 | 杭州沧浪健康管理有限公司 | Applet construction uploading method and device, computer equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
WO2022142601A1 (en) | 2022-07-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112667228A (en) | Application program construction method and device and computer equipment | |
CN110531962B (en) | Development processing method and device for applet and computer readable storage medium | |
US10929149B2 (en) | Method and system for updating firmware | |
CN110096424B (en) | Test processing method and device, electronic equipment and storage medium | |
CN111045781B (en) | Method, device and storage medium for creating mirror image by cloud platform | |
CN110493028A (en) | A kind of clustered deploy(ment) method, system, device and computer readable storage medium | |
CN108897575A (en) | The configuration method and configuration system of electronic equipment | |
CN109254778B (en) | Method and apparatus for deploying an information flow system | |
CN114356521A (en) | Task scheduling method and device, electronic equipment and storage medium | |
CN112000439A (en) | Method for realizing cloud native application management virtual machine | |
US20130007184A1 (en) | Message oriented middleware with integrated rules engine | |
US7735096B2 (en) | Destination application program interfaces | |
CN113448730B (en) | Service processing method, device, computer equipment and storage medium | |
CN110225082B (en) | Task processing method and device, electronic equipment and computer readable medium | |
KR101905018B1 (en) | Method, apparatus and system for displaying names of virtual machine | |
CN111355629B (en) | Client test method and device, computer equipment and storage medium | |
CN112925796A (en) | Write consistency control method, device, equipment and storage medium | |
CN112685040A (en) | Method, device, equipment and storage medium for generating interface file in android system | |
CN117008934A (en) | Method, device, equipment and medium for automatically making mirror image of information creation operating system | |
CN109508193B (en) | Application deployment and operation method, device, terminal equipment and medium | |
CN116301939A (en) | Micro-service deployment method, device, terminal and storage medium | |
CN113032004A (en) | Method, apparatus and program product for managing development jobs in a development environment | |
CN111124523A (en) | Method and apparatus for initializing applications | |
CN109669715A (en) | application program dynamic updating method, device and storage medium | |
CN114610446A (en) | Method, device and system for automatically injecting probe |
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 | ||
CB02 | Change of applicant information | ||
CB02 | Change of applicant information |
Address after: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Beijing Economic and Technological Development Zone, 100176 Applicant after: Jingdong Technology Holding Co.,Ltd. Address before: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Beijing Economic and Technological Development Zone, 100176 Applicant before: Jingdong Digital Technology Holding Co., Ltd |