WO2022142601A1 - 应用程序的构建方法、装置及计算机设备 - Google Patents

应用程序的构建方法、装置及计算机设备 Download PDF

Info

Publication number
WO2022142601A1
WO2022142601A1 PCT/CN2021/124752 CN2021124752W WO2022142601A1 WO 2022142601 A1 WO2022142601 A1 WO 2022142601A1 CN 2021124752 W CN2021124752 W CN 2021124752W WO 2022142601 A1 WO2022142601 A1 WO 2022142601A1
Authority
WO
WIPO (PCT)
Prior art keywords
task
application
construction
configuration information
creation
Prior art date
Application number
PCT/CN2021/124752
Other languages
English (en)
French (fr)
Inventor
周智
Original Assignee
京东科技控股股份有限公司
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 京东科技控股股份有限公司 filed Critical 京东科技控股股份有限公司
Publication of WO2022142601A1 publication Critical patent/WO2022142601A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/35Creation or generation of source code model driven
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Definitions

  • the present application relates to the technical field of information processing, and in particular, to a method, apparatus and computer equipment for constructing an application program.
  • the application construction method is mainly to obtain the Jenkins continuous integration tool provided by a third party; according to the plug-in of the continuous integration tool, configure the components required for program construction on the continuous integration tool; on the continuous integration tool Configure the workspace, code hosting platform address, parameters required for construction, etc.; and then execute the application construction process according to the construction tasks created by the developer and the parameters selected.
  • the present application aims to solve one of the technical problems in the related art at least to a certain extent.
  • This application proposes a method for building an application program. Developers can select different construction task configuration information according to actual needs, create a construction task in combination with different construction task configuration information, and generate an application package, so as to be suitable for different needs.
  • the application construction task of the application has good adaptability, and the pre-configured components can be extended according to the requirements of the developer, with strong scalability and high application construction efficiency.
  • the embodiment of the first aspect of the present application proposes a method for constructing an application, including:
  • the application package generated by the construction server is received and sent to the developer client, wherein the application package is generated according to the construction task and the template of the application.
  • the application construction method of the embodiment of the present application includes receiving the application creation instruction and creation configuration information of the developer client; creating an application template in the construction server according to the application creation instruction and the creation configuration information; receiving the developer client The task construction instruction and task configuration information of the client; create a construction task in the build server according to the task construction instruction and the task configuration information; and receive the application package generated by the construction server and send it to the developer client, wherein the application package is based on the Build tasks and template generation for applications.
  • developers can select different construction task configuration information according to actual needs, create construction tasks in combination with different construction task configuration information, and generate application packages, so as to be suitable for application construction tasks with different requirements. It has good performance, and the pre-configured components can be extended according to the requirements of developers, with strong scalability and high application construction efficiency.
  • the embodiment of the second aspect of the present application provides a method for constructing an application, including:
  • the method for constructing an application in the embodiment of the present application includes receiving an application creation instruction and creation configuration information sent by a developer client through a mobile development platform; creating an application template according to the application creation instruction and creation configuration information; The task construction instruction and task configuration information sent by the client client through the mobile development platform; according to the task construction instruction and task configuration information, a construction task is created; the construction task is executed, and in the execution process of the construction task, combined with the application template, generate Application package; send the application package to the developer client through the mobile development platform.
  • developers can select different construction task configuration information according to actual needs, create construction tasks in combination with different construction task configuration information, and generate application packages, so as to be suitable for application construction tasks with different requirements. It has good performance, and the pre-configured components can be extended according to the requirements of developers, with strong scalability and high application construction efficiency.
  • the embodiment of the third aspect of the present application provides an apparatus for constructing an application program, including:
  • the receiving module is used to receive the application creation instruction and creation configuration information of the developer client
  • a first creation module configured to create an application template in the build server according to the application creation instruction and the creation configuration information
  • the receiving module is further configured to receive task construction instructions and task configuration information of the developer client;
  • a second creation module configured to create a construction task in the construction server according to the task construction instruction and the task configuration information
  • the receiving module is further configured to receive the application package generated by the construction server, and send it to the developer client, wherein the application package is generated according to the construction task and the template of the application.
  • the device for constructing an application program of the embodiment of the present application receives the application program creation instruction and the creation configuration information of the developer client; creates the template of the application program in the construction server according to the application creation instruction and the creation configuration information; receives the developer client The task construction instruction and task configuration information of the client; create a construction task in the build server according to the task construction instruction and the task configuration information; and receive the application package generated by the construction server and send it to the developer client, wherein the application package is based on the Build tasks and template generation for applications.
  • developers can select different construction task configuration information according to actual needs, create construction tasks in combination with different construction task configuration information, and generate application packages, so as to be suitable for application construction tasks with different requirements. It has good performance, and the pre-configured components can be extended according to the requirements of developers, with strong scalability and high application construction efficiency.
  • the embodiment of the fourth aspect of the present application provides an apparatus for constructing an application program, including:
  • the receiving module is used to receive the application creation instruction and creation configuration information sent by the developer client through the mobile development platform;
  • a first creation module configured to create an application template according to the application creation instruction and the creation configuration information
  • the receiving module is further configured to receive the task construction instruction and task configuration information sent by the developer client through the mobile development platform;
  • a second creation module configured to create a construction task according to the task construction instruction and the task configuration information
  • an execution module configured to execute the construction task, and generate an application package in combination with the template of the application during the execution of the construction task;
  • a sending module configured to send the application package to the developer client through the mobile development platform.
  • the apparatus for constructing an application program of the embodiment of the present application receives the application program creation instruction and creation configuration information sent by the developer client through the mobile development platform; creates an application program template according to the application program creation instruction and creation configuration information; receives the development The task construction instruction and task configuration information sent by the client client through the mobile development platform; according to the task construction instruction and task configuration information, a construction task is created; the construction task is executed, and in the execution process of the construction task, combined with the application template, generate Application package; send the application package to the developer client through the mobile development platform.
  • developers can select different construction task configuration information according to actual needs, create construction tasks in combination with different construction task configuration information, and generate application packages, so as to be suitable for application construction tasks with different requirements. It has good performance, and the pre-configured components can be extended according to the requirements of developers, with strong scalability and high application construction efficiency.
  • the embodiment of the fifth aspect of the present application proposes a computer device, including: a memory, a processor, and a computer program stored in the memory and running on the processor.
  • the processor executes the program, the computer program as described in the present application.
  • the embodiment of the sixth aspect of the present application provides a computer program product.
  • an instruction processor in the computer program product is executed, the method for constructing the application program provided by the embodiment of the first aspect of the present application is executed.
  • Embodiment 1 is a schematic flowchart of a method for constructing an application program provided by Embodiment 1 of the present application;
  • Figure 2 is a schematic diagram of the interaction between the developer client, the mobile development platform and the build server;
  • Fig. 3 is the storage schematic diagram of the management data in the MySql database of the mobile development platform
  • FIG. 4 is a schematic flowchart of a method for constructing an application program provided by Embodiment 2 of the present application;
  • FIG. 5 is a schematic structural diagram of an apparatus for constructing an application program provided by Embodiment 3 of the present application.
  • FIG. 6 is a schematic structural diagram of an apparatus for constructing an application program provided by Embodiment 4 of the present application.
  • Figure 7 shows a block diagram of an exemplary computer device suitable for use in implementing embodiments of the present application.
  • the traditional application construction method needs to combine the plug-in of the Jenkins continuous integration tool provided by a third party, configure the components required for program construction on the continuous integration tool, and set the workspace, code hosting platform address, Parameters required during construction, etc., and then execute the application construction process according to the construction task created by the developer.
  • the above solutions are strongly dependent on tools provided by third parties, and have poor adaptability and scalability, resulting in poor application construction efficiency.
  • this application mainly aims at the technical problems of poor adaptability, poor scalability, and poor application construction efficiency that rely on the Jenkins continuous integration tool provided by a third party in the prior art, and proposes an application construction method.
  • the application construction method of the embodiment of the present application by receiving the application creation instruction and creation configuration information of the developer client; creating the template of the application in the construction server according to the application creation instruction and the creation configuration information; receiving the developer client The task construction instruction and task configuration information of the client; create a construction task in the build server according to the task construction instruction and the task configuration information; and receive the application package generated by the construction server and send it to the developer client, wherein the application package is based on the Build tasks and template generation for applications.
  • developers can select different construction task configuration information according to actual needs, create construction tasks in combination with different construction task configuration information, and generate application packages, so as to be suitable for application construction tasks with different requirements. It has good performance, and the pre-configured components can be extended according to the requirements of developers, with strong scalability and high application construction efficiency.
  • FIG. 1 is a schematic flowchart of a method for constructing an application program provided by Embodiment 1 of the present application.
  • the embodiments of the present application illustrate that the application construction method is configured in the application construction apparatus.
  • the application construction apparatus can be applied to any computer equipment, such as a mobile development platform, so that the mobile development The platform can perform the building function of the application.
  • the construction method of the application can include the following steps:
  • Step 101 receiving an application creation instruction and creation configuration information of the developer client.
  • the developer client may be a front-end service that interacts with the developer.
  • the mobile development platform serves the mobile development platform based on MySql database.
  • the developer client and the mobile development platform can communicate through the RESTfull API interface, that is, the developer client can send data to the mobile development platform by calling the RESTfull API interface.
  • the manner in which the mobile development platform receives the creation configuration information of the developer client may be, for example, receiving the creation configuration information of the developer client through a RESTfull API interface with the developer client.
  • the mobile development platform receives the application program creation instruction of the developer client, for example, the developer can use the developer client to refer to the custom construction open source tool under the preset project code root directory, and the mobile development If the platform obtains the building open source tool in the preset project code root directory, it is determined to receive the application creation instruction from the developer client.
  • the creation configuration information sent by the developer client may include, for example, the following parameters: the address of the code hosting platform, etc., so that the mobile development platform creates the template of the application in the build server.
  • Step 102 Create an application template in the build server according to the application creation instruction and the creation configuration information.
  • the process of executing step 102 by the mobile development platform may be, for example, creating a workspace corresponding to the application in the build server according to the application creation instruction ; Add the main branch code of the application on the code hosting platform in the workspace corresponding to the application to generate the template of the application.
  • the mobile development platform may specifically send the application creation instruction and creation configuration information to the construction server, and the construction server creates a workspace corresponding to the application when receiving the application creation instruction and creation configuration information, and Obtain the main branch code of the application from the code hosting platform according to the address of the code hosting platform, copy the main branch code to the workspace, and generate the template of the application.
  • the main branch code is saved in the main directory in the workspace.
  • Step 103 Receive the task construction instruction and task configuration information of the developer client.
  • the process of the mobile development platform performing step 103 may be, for example, receiving the task construction instruction and task configuration information of the developer client through the RESTfull API interface between the mobile development platform and the developer client.
  • the task configuration information may include: version information of each component required for building the application, so as to obtain the component code of the corresponding version from the code hosting platform.
  • various components required for building applications such as the project automation based on Apache Ant and Apache Maven concepts to build open source tools gradle, native development kits (Native Development Kit, NDK) used by different C/C++ codes, CPU architecture Wait.
  • the gradle tool provides the function of dynamically modifying the CPU architecture version.
  • Step 104 Create a build task in the build server according to the task build instruction and the task configuration information.
  • the process of executing step 104 by the mobile development platform may be, for example, according to the task construction instruction, in the corresponding Create a task branch directory with the main branch code copied in the workspace; call the corresponding build service according to the task configuration information, and load the corresponding build service into the task branch directory to generate a build task.
  • the build server can synchronize the task branch directory and workspace through code cloning or code pulling.
  • the mobile development platform may specifically send the task construction instruction to the construction server, and invoke the corresponding construction service according to the task configuration information.
  • the build server creates a task branch directory in the workspace corresponding to the application according to the task construction instructions; obtains the main branch code in the workspace, and copies the main branch code to the task branch directory; after receiving the build corresponding to the task configuration information When a service is called for, load the corresponding build service into the task branch directory to generate a build task.
  • each construction task corresponds to a sub-process. That is, if an application includes multiple branches, multiple The construction tasks corresponding to each branch are carried out in parallel, so that the parallel construction of multiple branches can be realized, and the construction processes of each branch do not interfere with each other, thereby speeding up the construction efficiency of the application. In addition, the construction processes of different applications do not interfere with each other, which can realize parallel construction of multiple applications, and further accelerate the construction efficiency of applications. Alternatively, the same build service can perform multiple build tasks.
  • the version information of each component can be extended, that is, when there is new version information of a certain component, the new book information of the component and the version information of other components can be combined , create multiple build templates for developers to set task configuration information.
  • the mobile development platform may also perform the following process: receiving a construction template creation instruction from the developer client, wherein the construction template creation instruction includes: template configuration information, wherein the template configuration information includes: all components required for the task, and each The version information corresponding to each component; according to the template configuration information, multiple build templates are created, so that developers can select a build template from the created multiple build templates to generate task configuration information.
  • Step 105 Receive the application package generated by the build server and send it to the developer client, wherein the application package is generated according to the construction task and the template of the application.
  • the construction service in the construction server executes the construction task, for example, for each component in the task configuration information, according to the task configuration information
  • the version information of the component in the code hosting platform obtain the component code with the version information from the code hosting platform, add the obtained component codes of multiple components to the task branch directory, obtain the code file of the application, compile and package the code file Wait, get the application package.
  • the task configuration information includes: version information of multiple components.
  • the build service in the build server obtains the version information of each component in the task configuration information, for example, obtains the version information of each component through the child process mechanism child_process.exec(command, ⁇ env ⁇ ), and then obtains the corresponding version
  • the component code of the information execute gradle assembleDebug or gradle assembledeRelease in the child process to build and generate debug or release packages. All build subprocesses on the build service are stored in a build queue with the build id as the key and the process id as the value.
  • the corresponding child process can be found dynamically according to the build id to kill the build child process, so as to cancel the corresponding build child process. ability.
  • the construction server may store the application package in 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.
  • the client downloads the application package on the file server through the mobile development platform.
  • a schematic diagram of interaction among the developer client, the mobile development platform, and the construction server may be, for example, as shown in FIG. 2 .
  • the template used by the developer client to create the application different build templates, and trigger build tasks.
  • the mobile development platform is used to manage applications, build tasks, build records, build task status, etc., and is responsible for the communication between the build server and the developer client.
  • the builder server is used to invoke the build service to perform build tasks, and generate application packages for return to the developer client.
  • DB refers to the MySql database, which is used to store the management data of the mobile development platform.
  • a file server is used to store application packages for download by developer clients.
  • a schematic diagram of the storage of management data in the MySql database of the mobile development platform can be, for example, as shown in Figure 3.
  • the basic information of the application construction record information, construction tasks, construction tasks and development are stored.
  • the basic information of the application is, for example, the identifier (app_id) of the application (APP), the address (git_clone_url) of the code hosting platform (git), the workspace information of the application (git_clone_local_path), and the like.
  • the task configuration information of the build task includes: the identity of the application, the identity of the used build template (template_id), the version information of the gradle tool (gradle_version), the version information of the native development kit (ndk_version), and the version information of the CPU architecture ( abiFilters), task branch directory information (apk_build_output_path), etc.
  • the application construction method of the embodiment of the present application by receiving the application creation instruction and creation configuration information of the developer client; creating the template of the application in the construction server according to the application creation instruction and the creation configuration information; receiving the developer client The task construction instruction and task configuration information of the client; create a construction task in the build server according to the task construction instruction and the task configuration information; and receive the application package generated by the construction server and send it to the developer client, wherein the application package is based on the Build tasks and template generation for applications.
  • developers can select different construction task configuration information according to actual needs, create construction tasks in combination with different construction task configuration information, and generate application packages, so as to be suitable for application construction tasks with different requirements. It has good performance, and the pre-configured components can be extended according to the requirements of developers, with strong scalability and high application construction efficiency.
  • FIG. 4 is a schematic flowchart of a method for constructing an application program provided by Embodiment 2 of the present application.
  • the embodiments of the present application illustrate that the application construction method is configured in the application construction apparatus.
  • the application construction apparatus can be applied to any computer device, such as a construction server, so that the construction server can Execute the build function of the application.
  • the construction method of the application can include the following steps:
  • Step 401 Receive the application creation instruction and creation configuration information sent by the developer client through the mobile development platform.
  • the communication between the build server and the mobile development platform can be realized through Remote Procedure Call (RPC).
  • RPC Remote Procedure Call
  • Information is sent to the build server.
  • the creation configuration information may include, for example, the following parameters: the address of the code hosting platform, etc., so that the construction server creates an application template in combination with the main branch code of the application on the code hosting platform.
  • Step 402 according to the application creation instruction and creation configuration information, create an application template.
  • the creation configuration information may include: the address of the code hosting platform; correspondingly, the process of the construction server executing step 402 may be, for example, creating a workspace corresponding to the application according to the application creation instruction; according to the code hosting platform , obtain the main branch code of the application program from the code hosting platform; add the main branch code to the workspace to generate the template of the application program.
  • Step 403 Receive the task construction instruction and task configuration information sent by the developer client through the mobile development platform.
  • the mobile development platform may send the task construction instruction and the task configuration information to the construction server through the remote procedure call RPC.
  • the task configuration information may include: version information of each component required for building the application, so that the build server obtains the component code of the corresponding version from the code hosting platform according to the version information of each component.
  • Step 404 Create a construction task according to the task construction instruction and the task configuration information.
  • the process of the construction server performing step 404 may be, for example, according to the task construction instruction, create a task branch directory in the workspace corresponding to the application; obtain the main branch code in the workspace; copy the main branch code to In the task branch directory; when receiving a call request for a build service corresponding to the task configuration information, load the corresponding build service into the task branch directory to generate a build task.
  • the build server can synchronize the task branch directory and workspace through code cloning or code pulling.
  • Step 405 Execute the construction task, and generate an application package in combination with the template of the application during the execution of the construction task.
  • each construction task corresponds to a sub-process. That is, if an application includes multiple branches, multiple The construction tasks corresponding to each branch are carried out in parallel, so that the parallel construction of multiple branches can be realized, and the construction processes of each branch do not interfere with each other, thereby speeding up the construction efficiency of the application. In addition, the construction processes of different applications do not interfere with each other, which can realize parallel construction of multiple applications, and further accelerate the construction efficiency of applications. Alternatively, the same build service can perform multiple build tasks.
  • the construction service in the construction server executes the construction task, for example, for each component in the task configuration information, according to the task configuration information
  • the version information of the component in the code hosting platform obtain the component code with the version information from the code hosting platform, add the obtained component codes of multiple components to the task branch directory, obtain the code file of the application, compile and package the code file Wait, get the application package.
  • the task configuration information includes: version information of multiple components.
  • the build service in the build server obtains the version information of each component in the task configuration information, for example, obtains the version information of each component through the child process mechanism child_process.exec(command, ⁇ env ⁇ ), and then obtains the corresponding version
  • the component code of the information execute gradle assembleDebug or gradle assembledeRelease in the child process to build and generate debug or release packages. All build subprocesses on the build service are stored in a build queue with the build id as the key and the process id as the value.
  • the corresponding child process can be found dynamically according to the build id to kill the build child process, so as to cancel the corresponding build child process. ability.
  • Step 406 sending the application package to the developer client through the mobile development platform.
  • the construction server may store the application package in 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.
  • the client downloads the application package on the file server through the mobile development platform.
  • the method for constructing an application in the embodiment of the present application includes receiving an application creation instruction and creation configuration information sent by a developer client through a mobile development platform; creating an application template according to the application creation instruction and creation configuration information; The task construction instruction and task configuration information sent by the client client through the mobile development platform; according to the task construction instruction and task configuration information, a construction task is created; the construction task is executed, and in the execution process of the construction task, combined with the application template, generate Application package; send the application package to the developer client through the mobile development platform.
  • developers can select different construction task configuration information according to actual needs, create construction tasks in combination with different construction task configuration information, and generate application packages, so as to be suitable for application construction tasks with different requirements. It has good performance, and the pre-configured components can be extended according to the requirements of developers, with strong scalability and high application construction efficiency.
  • FIG. 5 is a schematic structural diagram of an apparatus for constructing an application program provided by Embodiment 3 of the present application.
  • the apparatus 500 for constructing the application may include: a receiving module 510 , a first creating module 520 and a second creating module 530 .
  • the receiving module 510 is used for receiving the application program creation instruction and creation configuration information of the developer client;
  • a first creation module 520 configured to create an application template in the construction server according to the application creation instruction and the creation configuration information
  • the receiving module 510 is further configured to receive task construction instructions and task configuration information of the developer client;
  • a second creation module 530 configured to create a construction task in the construction server according to the task construction instruction and the task configuration information
  • the receiving module 510 is further configured to receive the application package generated by the construction server and send it to the developer client, wherein the application package is generated according to the construction task and the template of the application .
  • the receiving module 510 is specifically configured to determine that the developer client is received when an open source construction tool is obtained under a preset project code root directory.
  • the application program creation instruction of the terminal receive the creation configuration information of the developer client through the RESTfull API interface with the developer client.
  • the creation configuration information includes: the address of the code hosting platform; correspondingly, the first creation module 520 is specifically configured to create the configuration according to the application program instruction, create a workspace corresponding to the application in the build server; add the main branch code of the application on the code hosting platform in the workspace corresponding to the application to generate the application template.
  • the receiving module 510 is specifically configured to receive the task construction instruction of the developer client through a RESTfull API interface with the developer client and the task configuration information.
  • the template of the application program is a workspace to which the main branch code of the application program is added; correspondingly, the second creation module 530 specifically is used to, according to the task construction instruction, create a task branch directory in which the main branch code is copied in the workspace corresponding to the application; call the corresponding construction service according to the task configuration information, and assign all corresponding The build service is loaded into the task branch directory to generate the build task.
  • the receiving module 510 is further configured to receive a construction template creation instruction of the developer client, wherein the construction template creation instruction includes: template configuration information, Wherein, the template configuration information includes: all components required for the task, and version information corresponding to each component; the first creation module 520 is further configured to create a plurality of construction templates according to the template configuration information, so as to The developer selects a build template from multiple created build templates to generate task configuration information.
  • each construction task corresponds to a sub-process.
  • the device for constructing an application program of the embodiment of the present application receives the application program creation instruction and the creation configuration information of the developer client; creates the template of the application program in the construction server according to the application creation instruction and the creation configuration information; receives the developer client The task construction instruction and task configuration information of the client; create a construction task in the build server according to the task construction instruction and the task configuration information; and receive the application package generated by the construction server and send it to the developer client, wherein the application package is based on the Build tasks and template generation for applications.
  • developers can select different construction task configuration information according to actual needs, create construction tasks in combination with different construction task configuration information, and generate application packages, so that they can be applied to application construction tasks with different requirements. It has good performance, and the pre-configured components can be extended according to the requirements of developers, with strong scalability and high application construction efficiency.
  • FIG. 6 is a schematic structural diagram of an apparatus for constructing an application program provided by Embodiment 4 of the present application.
  • the apparatus 600 for constructing the application may include: a receiving module 610 , a first creating module 620 , a second creating module 630 , an executing module 640 and a sending module 650 .
  • the receiving module 610 is used to receive the application creation instruction and creation configuration information sent by the developer client through the mobile development platform;
  • a first creation module 620 configured to create an application template according to the application creation instruction and the creation configuration information
  • the receiving module 610 is further configured to receive task construction instructions and task configuration information sent by the developer client through the mobile development platform;
  • a second creation module 630 configured to create a construction task according to the task construction instruction and the task configuration information
  • an execution module 640 configured to execute the construction task, and generate an application package in combination with the template of the application during the execution of the construction task;
  • the sending module 650 is configured to send the application package to the developer client through the mobile development platform.
  • the receiving module 610 is specifically configured to receive the application program creation instruction and the creation configuration sent by the mobile development platform through a remote procedure call interface information.
  • the creation configuration information includes: the address of the code hosting platform; correspondingly, the first creation module 620 is specifically configured to create the configuration according to the application program instruction to create a workspace corresponding to the application; obtain the main branch code of the application from the code hosting platform according to the address of the code hosting platform; add the main branch code to the work space, generate a template for the application.
  • the second creation module 630 is specifically configured to, according to the task construction instruction, create a task branch directory in the workspace corresponding to the application; Acquiring the main branch code in the workspace; copying the main branch code to the task branch directory; when receiving the invocation request of the construction service corresponding to the task configuration information, the corresponding construction The service is loaded into the task branch directory to generate a build task.
  • the apparatus further includes: a synchronization module, configured to synchronize the task branch directory and the workspace through code cloning.
  • each construction task corresponds to a sub-process.
  • the apparatus for constructing an application program of the embodiment of the present application receives the application program creation instruction and creation configuration information sent by the developer client through the mobile development platform; creates an application program template according to the application program creation instruction and creation configuration information; receives the development The task construction instruction and task configuration information sent by the client client through the mobile development platform; according to the task construction instruction and task configuration information, create a construction task; execute the construction task, and combine the application template to generate Application package; send the application package to the developer client through the mobile development platform.
  • developers can select different construction task configuration information according to actual needs, create construction tasks in combination with different construction task configuration information, and generate application packages, so as to be suitable for application construction tasks with different requirements. It has good performance, and the pre-configured components can be extended according to the requirements of developers, with strong scalability and high application construction efficiency.
  • the present application also proposes a computer device, including: a memory, a processor, and a computer program stored in the memory and running on the processor.
  • a computer program stored in the memory and running on the processor.
  • the present application further provides a computer program product, when the instruction processor in the computer program product executes, executes the application program construction method proposed by the foregoing embodiments of the present application.
  • Figure 7 shows a block diagram of an exemplary computer device suitable for use in implementing embodiments of the present application.
  • the computer device 12 shown in FIG. 7 is only an example, and should not impose any limitations on the functions and scope of use of the embodiments of the present application.
  • computer device 12 takes the form of a general-purpose computing device.
  • Components of computer device 12 may include, but are not limited to, one or more processors or processing units 16 , system memory 28 , and a bus 18 connecting various system components including system memory 28 and processing unit 16 .
  • Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of a variety of bus structures.
  • these architectures include, but are not limited to, Industry Standard Architecture (hereinafter referred to as: ISA) bus, Micro Channel Architecture (hereinafter referred to as: MAC) bus, enhanced ISA bus, video electronics Standards Association (Video Electronics Standards Association; hereinafter referred to as: VESA) local bus and Peripheral Component Interconnection (Peripheral Component Interconnection; hereinafter referred to as: PCI) bus.
  • ISA Industry Standard Architecture
  • MAC Micro Channel Architecture
  • VESA Video Electronics Standards Association
  • PCI Peripheral Component Interconnection
  • Computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by computer device 12, including both volatile and nonvolatile media, removable and non-removable media.
  • the memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (Random Access Memory; hereinafter: RAM) 30 and/or cache memory 32 .
  • Computer device 12 may further include other removable/non-removable, volatile/non-volatile computer system storage media.
  • storage system 34 may be used to read and write to non-removable, non-volatile magnetic media (not shown in FIG. 7, commonly referred to as a "hard drive").
  • disk drives for reading and writing to removable non-volatile magnetic disks eg, "floppy disks" and removable non-volatile optical disks (eg, compact disk read only memory) may be provided Disc Read Only Memory; hereinafter referred to as: CD-ROM), Digital Video Disc Read Only Memory (hereinafter referred to as: DVD-ROM) or other optical media) read and write optical drives.
  • CD-ROM Disc Read Only Memory
  • DVD-ROM Digital Video Disc Read Only Memory
  • each drive may be connected to bus 18 through one or more data media interfaces.
  • Memory 28 may include at least one program product having a set (eg, at least one) of program modules configured to perform the functions of various embodiments of the present application.
  • a program/utility 40 having a set (at least one) of program modules 42, which 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 or some combination of these examples may include an implementation of a network environment.
  • Program modules 42 generally perform the functions and/or methods of the embodiments described herein.
  • Computer device 12 may also communicate with one or more external devices 14 (eg, keyboard, pointing device, display 24, etc.), may also communicate with one or more devices that enable a user to interact with computer device 12, and/or communicate with Any device (eg, network card, modem, etc.) that enables the computer device 12 to communicate with one or more other computing devices. Such communication may take place through input/output (I/O) interface 22 .
  • the computer device 12 can also communicate with one or more networks (such as a local area network (Local Area Network; hereinafter referred to as: LAN), a wide area network (Wide Area Network; hereinafter referred to as: WAN) and/or a public network, such as the Internet, through the network adapter 20 ) communication.
  • networks such as a local area network (Local Area Network; hereinafter referred to as: LAN), a wide area network (Wide Area Network; hereinafter referred to as: WAN) and/or a public network, such as the Internet, through the network
  • network adapter 20 communicates with other modules of computer device 12 via bus 18 .
  • bus 18 It should be understood that, although not shown, other hardware and/or software modules may be used in conjunction with computer device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives and data backup storage systems.
  • the processing unit 16 executes various functional applications and data processing by running the programs stored in the system memory 28 , for example, implements the methods mentioned in the foregoing embodiments.
  • first and second are only used for descriptive purposes, and should not be construed as indicating or implying relative importance or implying the number of indicated technical features. Thus, a feature delimited with “first”, “second” may expressly or implicitly include at least one of that feature.
  • plurality means at least two, such as two, three, etc., unless expressly and specifically defined otherwise.
  • a "computer-readable medium” can be any device that can contain, store, communicate, propagate, or transport the program for use by or in connection with an instruction execution system, apparatus, or apparatus.
  • computer readable media include the following: electrical connections with one or more wiring (electronic devices), portable computer disk cartridges (magnetic devices), random access memory (RAM), Read Only Memory (ROM), Erasable Editable Read Only Memory (EPROM or Flash Memory), Fiber Optic Devices, and Portable Compact Disc Read Only Memory (CDROM).
  • the computer readable medium may even be paper or other suitable medium on which the program may be printed, as the paper or other medium may be optically scanned, for example, followed by editing, interpretation, or other suitable medium as necessary process to obtain the program electronically and then store it in computer memory.
  • each functional unit in each embodiment of the present application may be integrated into one processing module, or each unit may exist physically alone, or two or more units may be integrated into one module.
  • the above-mentioned integrated modules can be implemented in the form of hardware, and can also be implemented in the form of software function modules. If the integrated modules are implemented in the form of software functional modules and sold or used as independent products, they may also be stored in a computer-readable storage medium.
  • the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, and the like.

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

一种应用程序的构建方法、装置及计算机设备,其中方法包括:接收开发者客户端的应用程序创建指令和创建配置信息(S101);根据应用程序创建指令和创建配置信息在构建服务器之中创建应用程序的模板(S102);接收开发者客户端的任务构建指令和任务配置信息(S103);根据任务构建指令和任务配置信息在构建服务器之中创建构建任务(S104);以及接收构建服务器生成的应用程序包,并发送至开发者客户端, 其中,应用程序包根据构建任务以及应用程序的模板生成(S105)。

Description

应用程序的构建方法、装置及计算机设备
相关申请的交叉引用
本申请要求基于申请号为202011583035.4、申请日为2020年12月28日、发明名称为“应用程序的构建方法、装置及计算机设备”的中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。
技术领域
本申请涉及信息处理技术领域,尤其涉及一种应用程序的构建方法、装置及计算机设备。
背景技术
相关技术中,应用程序的构建方法主要为,获取第三方提供的Jenkins持续集成工具;根据该持续集成工具的插件,在该持续集成工具上配置程序构建所需要的组件;在该持续集成工具上配置好工作空间、代码托管平台地址、构建时需要的参数等;然后根据开发者创建的构建任务以及选择的参数,来执行应用程序的构建过程。
上述方案中,强依赖于第三方提供的工具,第三方提供的工具中可配置的组件是有限的,难以适用于不同需求的应用程序构建任务,适应性差,且可配置的组件不可调整,扩展性差,导致应用程序的构建效率差。
发明内容
本申请旨在至少在一定程度上解决相关技术中的技术问题之一。
本申请提出一种应用程序的构建方法,开发者可以根据实际需求来选择不同的构建任务配置信息,结合不同的构建任务配置信息来创建构建任务,并生成应用程序包,从而能够适用于不同需求的应用程序构建任务,适应性好,且预先配置的组件是可以根据开发者的要求进行扩展的,扩展性强,应用程序的构建效率高。
本申请第一方面实施例提出了一种应用程序的构建方法,包括:
接收开发者客户端的应用程序创建指令和创建配置信息;
根据所述应用程序创建指令和所述创建配置信息在构建服务器之中创建应用程序的模板;
接收所述开发者客户端的任务构建指令和任务配置信息;
根据所述任务构建指令和所述任务配置信息在所述构建服务器之中创建构建任务;以及
接收所述构建服务器生成的应用程序包,并发送至所述开发者客户端,其中,所述应用程序包根据所述构建任务以及所述应用程序的模板生成。
本申请实施例的应用程序的构建方法,通过接收开发者客户端的应用程序创建指令和创建配置信息;根据应用程序创建指令和创建配置信息在构建服务器之中创建应用程序的模板;接收开发者客户端的任务构建指令和任务配置信息;根据任务构建指令和任务配置信息在构建服务器之中创建构建任务;以及接收构建服务器生成的应用程序包,并发送至开发者客户端,其中,应用程序包根据构建任务以及应用程序的模板生成。上述方案中,开发者可以根据实际需求来选择不同的构建任务配置信息,结合不同的构建任务配置信息来创建构建任务,并生成应用程序包,从而能够适用于不同需求的应用程序构建任务,适应性好,且预先配置的组件是可以根据开发者的要求进行扩展的,扩展性强,应用程序的构建效率高。
本申请第二方面实施例提出了一种应用程序的构建方法,包括:
接收开发者客户端通过移动开发平台发送的应用程序创建指令和创建配置信息;
根据所述应用程序创建指令和所述创建配置信息,创建应用程序的模板;
接收所述开发者客户端通过所述移动开发平台发送的任务构建指令和任务配置信息;
根据所述任务构建指令和所述任务配置信息,创建构建任务;
执行所述构建任务,并在所述构建任务的执行过程中,结合所述应用程序的模板,生成应用程序包;
将所述应用程序包通过所述移动开发平台发送至所述开发者客户端。
本申请实施例的应用程序的构建方法,通过接收开发者客户端通过移动开发平台发送的应用程序创建指令和创建配置信息;根据应用程序创建指令和创建配置信息,创建应用程序的模板;接收开发者客户端通过移动开发平台发送的任务构建指令和任务配置信息;根据任务构建指令和任务配置信息,创建构建任务;执行构建任务,并在构建任务的执行过程中,结合应用程序的模板,生成应用程序包;将应用程序包通过移动开发平台发送至开发者客户端。上述方案中,开发者可以根据实际需求来选择不同的构建任务配置信息,结合不同的构建任务配置信息来创建构建任务,并生成应用程序包,从而能够适用于不同需求的应用程序构建任务,适应性好,且预先配置的组件是可以根据开发者的要求进行扩展的,扩展性强,应用程序的构建效率高。
本申请第三方面实施例提出了一种应用程序的构建装置,包括:
接收模块,用于接收开发者客户端的应用程序创建指令和创建配置信息;
第一创建模块,用于根据所述应用程序创建指令和所述创建配置信息在构建服务器之中创建应用程序的模板;
所述接收模块,还用于接收所述开发者客户端的任务构建指令和任务配置信息;
第二创建模块,用于根据所述任务构建指令和所述任务配置信息在所述构建服务器之中创建构建任务;以及
所述接收模块,还用于接收所述构建服务器生成的应用程序包,并发送至所述开发者客户端,其中,所述应用程序包根据所述构建任务以及所述应用程序的模板生成。
本申请实施例的应用程序的构建装置,通过接收开发者客户端的应用程序创建指令和创建配置信息;根据应用程序创建指令和创建配置信息在构建服务器之中创建应用程序的模板;接收开发者客户端的任务构建指令和任务配置信息;根据任务构建指令和任务配置信息在构建服务器之中创建构建任务;以及接收构建服务器生成的应用程序包,并发送至开发者客户端,其中,应用程序包根据构建任务以及应用程序的模板生成。上述方案中,开发者可以根据实际需求来选择不同的构建任务配置信息,结合不同的构建任务配置信息来创建构建任务,并生成应用程序包,从而能够适用于不同需求的应用程序构建任务,适应性好,且预先配置的组件是可以根据开发者的要求进行扩展的,扩展性强,应用程序的构建效率高。
本申请第四方面实施例提出了一种应用程序的构建装置,包括:
接收模块,用于接收开发者客户端通过移动开发平台发送的应用程序创建指令和创建配置信息;
第一创建模块,用于根据所述应用程序创建指令和所述创建配置信息,创建应用程序的模板;
所述接收模块,还用于接收所述开发者客户端通过所述移动开发平台发送的任务构建指令和任务配置信息;
第二创建模块,用于根据所述任务构建指令和所述任务配置信息,创建构建任务;
执行模块,用于执行所述构建任务,并在所述构建任务的执行过程中,结合所述应用程序的模板,生成应用程序包;
发送模块,用于将所述应用程序包通过所述移动开发平台发送至所述开发者客户端。
本申请实施例的应用程序的构建装置,通过接收开发者客户端通过移动开发平台发送的应用程序创建指令和创建配置信息;根据应用程序创建指令和创建配置信息,创建应用 程序的模板;接收开发者客户端通过移动开发平台发送的任务构建指令和任务配置信息;根据任务构建指令和任务配置信息,创建构建任务;执行构建任务,并在构建任务的执行过程中,结合应用程序的模板,生成应用程序包;将应用程序包通过移动开发平台发送至开发者客户端。上述方案中,开发者可以根据实际需求来选择不同的构建任务配置信息,结合不同的构建任务配置信息来创建构建任务,并生成应用程序包,从而能够适用于不同需求的应用程序构建任务,适应性好,且预先配置的组件是可以根据开发者的要求进行扩展的,扩展性强,应用程序的构建效率高。
本申请第五方面实施例提出了一种计算机设备,包括:存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时,实现如本申请第一方面实施例提出的应用程序的构建方法。
本申请第六方面实施例提出了一种计算机程序产品,当所述计算机程序产品中的指令处理器执行时,执行本申请第一方面实施例提出的应用程序的构建方法。
本申请附加的方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本申请的实践了解到。
附图说明
本申请上述的和/或附加的方面和优点从下面结合附图对实施例的描述中将变得明显和容易理解,其中:
图1为本申请实施例一所提供的应用程序的构建方法的流程示意图;
图2为开发者客户端、移动开发平台以及构建服务器之间的交互示意图;
图3为移动开发平台的MySql数据库中管理数据的存储示意图;
图4为本申请实施例二所提供的应用程序的构建方法的流程示意图;
图5为本申请实施例三所提供的应用程序的构建装置的结构示意图;
图6为本申请实施例四所提供的应用程序的构建装置的结构示意图;
图7示出了适于用来实现本申请实施方式的示例性计算机设备的框图。
具体实施方式
下面详细描述本申请的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,旨在用于解释本申请,而不能理解为对本申请的限制。
传统的应用程序的构建方法,需要结合第三方提供的Jenkins持续集成工具的插件,在持续集成工具上配置程序构建所需要的组件、并在该持续集成工具上设置工作空间、代码托管平台地址、构建时需要的参数等,然后根据开发者创建的构建任务,来执行应用程序 的构建过程。上述方案强依赖于第三方提供的工具,适应性差,扩展性差,导致应用程序的构建效率差。
因此,本申请主要针对现有技术中依赖于第三方提供的Jenkins持续集成工具,适应性差,扩展性差,应用程序的构建效率差的技术问题,提出一种应用程序的构建方法。
本申请实施例的应用程序的构建方法,通过接收开发者客户端的应用程序创建指令和创建配置信息;根据应用程序创建指令和创建配置信息在构建服务器之中创建应用程序的模板;接收开发者客户端的任务构建指令和任务配置信息;根据任务构建指令和任务配置信息在构建服务器之中创建构建任务;以及接收构建服务器生成的应用程序包,并发送至开发者客户端,其中,应用程序包根据构建任务以及应用程序的模板生成。上述方案中,开发者可以根据实际需求来选择不同的构建任务配置信息,结合不同的构建任务配置信息来创建构建任务,并生成应用程序包,从而能够适用于不同需求的应用程序构建任务,适应性好,且预先配置的组件是可以根据开发者的要求进行扩展的,扩展性强,应用程序的构建效率高。
下面参考附图描述本申请实施例的应用程序的构建方法、装置及计算机设备。
图1为本申请实施例一所提供的应用程序的构建方法的流程示意图。
本申请实施例以该应用程序的构建方法被配置于应用程序的构建装置中来举例说明,该应用程序的构建装置可以应用于任一计算机设备中,例如移动开发平台中,以使该移动开发平台可以执行应用程序的构建功能。
如图1所示,该应用程序的构建方法可以包括以下步骤:
步骤101,接收开发者客户端的应用程序创建指令和创建配置信息。
本申请实施例中,开发者客户端可以为与开发者交互的前端服务。移动开发平台为基于MySql数据库的移动开发平台服务。其中,开发者客户端与移动开发平台之间可以通过RESTfull API接口通信,也就是说,开发者客户端可以通过调用该RESTfull API接口,来向移动开发平台发送数据。对应的,移动开发平台接收开发者客户端的创建配置信息的方式例如可以为,通过与开发者客户端之间的RESTfull API接口接收开发者客户端的创建配置信息。
本申请实施例中,移动开发平台接收开发者客户端的应用程序创建指令的方式例如可以为,开发者通过开发者客户端在预设的工程代码根目录下引用自定义的构建开源工具,移动开发平台在预设的工程代码根目录下获取到构建开源工具,则确定接收到开发者客户端的应用程序创建指令。
本申请实施例中,开发者客户端发送的创建配置信息中例如可以包括以下参数:代码托管平台的地址等,以便移动开发平台在构建服务器之中创建应用程序的模板。
步骤102,根据应用程序创建指令和创建配置信息在构建服务器之中创建应用程序的模板。
本申请实施例中,在创建配置信息包括代码托管平台的地址的情况下,移动开发平台执行步骤102的过程例如可以为,根据应用程序创建指令,在构建服务器之中创建应用程序对应的工作空间;在应用程序对应的工作空间中添加代码托管平台上应用程序的主分支代码,生成应用程序的模板。
在本申请实施例中,移动开发平台具体可以将应用程序创建指令和创建配置信息发送给构建服务器,构建服务器在接收到应用程序创建指令和创建配置信息时,创建应用程序对应的工作空间,并根据代码托管平台的地址从代码托管平台获取应用程序的主分支代码,将主分支代码拷贝至工作空间中,生成应用程序的模板。其中,主分支代码保存在工作空间中的主目录下。
步骤103,接收开发者客户端的任务构建指令和任务配置信息。
本申请实施例中,移动开发平台执行步骤103的过程例如可以为,通过与开发者客户端之间的RESTfull API接口接收开发者客户端的任务构建指令和任务配置信息。
本申请实施例中,任务配置信息中可以包括:构建应用程序所需要的各个组件的版本信息,以便从代码托管平台获取对应版本的组件代码。其中,构建应用程序所需要的各个组件,例如基于Apache Ant和Apache Maven概念的项目自动化构建开源工具gradle、不同的C/C++代码用到的原生开发工具包(Native Development Kit,NDK)、CPU架构等。其中,gradle工具中提供了动态修改CPU架构版本的功能。
步骤104,根据任务构建指令和任务配置信息在构建服务器之中创建构建任务。
本申请实施例中,在应用程序的模板为,添加有应用程序的主分支代码的工作空间的情况下,移动开发平台执行步骤104的过程例如可以为,根据任务构建指令,在应用程序对应的工作空间中创建拷贝有主分支代码的任务分支目录;根据任务配置信息调用相应的构建服务,并将相应的构建服务加载至任务分支目录,生成构建任务。其中,构建服务器可以通过代码克隆或者代码拉取,对任务分支目录和工作空间进行同步。
本申请实施例中,移动开发平台具体可以将任务构建指令发送给构建服务器,并根据任务配置信息调用相应的构建服务。构建服务器根据任务构建指令,在应用程序对应的工作空间中创建任务分支目录;获取工作空间中的主分支代码,将主分支代码拷贝至任务分支目录中;在接收到与任务配置信息相应的构建服务的调用请求时,将相应的构建服务加载至任务分支目录,生成构建任务。
本申请实施例中,需要说明的是,同一个应用程序的构建任务可以为多个,且每个构建任务对应一个子进程,也就是说,若一个应用程序包括多个分支,则可以实现多个分支 对应的构建任务的并行进行,从而可以实现多个分支的并行构建,且各个分支的构建过程之间互不干扰,加快应用程序的构建效率。另外,不同应用程序的构建过程之间也互不干扰,可以实现对多个应用程序的并行构建,进一步加快应用程序的构建效率。另外,同一个构建服务也可以执行多个构建任务。
进一步地,本申请实施例中,可以对各个组件的版本信息进行扩展,也就是说,在存在某个组件的新的版本信息时,可以结合该组件的新的本本信息以及其他组件的版本信息,创建多个构建模板,以便开发者设置任务配置信息。对应的,移动开发平台还可以执行以下过程:接收开发者客户端的构建模板创建指令,其中,构建模板创建指令包括:模板配置信息,其中,模板配置信息包括:任务所需的所有组件,以及每个组件对应的版本信息;根据模板配置信息,创建多个构建模板,以便开发者从创建的多个构建模板中选择构建模板来生成任务配置信息。
步骤105,接收构建服务器生成的应用程序包,并发送至开发者客户端,其中,应用程序包根据构建任务以及应用程序的模板生成。
本申请实施例中,构建任务创建好之后,在到达构建任务的执行时间时,构建服务器中的构建服务执行构建任务的过程例如可以为,针对任务配置信息中的每个组件,根据任务配置信息中该组件的版本信息,从代码托管平台获取具有该版本信息的组件代码,将获取到的多个组件的组件代码添加至任务分支目录中,得到应用程序的代码文件,对代码文件进行编译打包等,得到应用程序包。
其中,任务配置信息中包括:多个组件的版本信息。构建服务器中的构建服务获取任务配置信息中的每个组件的版本信息的方式例如可以为,通过子进程机制child_process.exec(command,{env})获取每个组件的版本信息,进而获取对应版本信息的组件代码,在子进程中执行gradle assembleDebug或gradle assembledeRelease进行构建生成debug或release包。构建服务上所有的构建子进程以build id为key,process id为value存储一个构建队列中,构建过程中可以根据build id找到对应的子进程动态kill构建子进程,从而达到取消相应构建子进程的能力。
本申请实施例中,应用程序包构建完成后,构建服务器可以将应用程序包存储到文件服务器中,并通过websocket长连接机制经过移动开发平台通知开发者客户端下载应用程序包,以便开发者客户端通过移动开发平台下载文件服务器上的应用程序包。在本申请实施例中,开发者客户端、移动开发平台以及构建服务器之间的交互示意图例如可以如图2所示。在图2中,开发者客户端用于创建应用程序的模板,不同的构建模板以及触发构建任务。移动开发平台用于管理应用程序、构建任务、构建记录、构建任务状态等,且负责构建服务器与开发者客户端之间的通信。构建者服务器用于调用构建服务来执行构建任务, 并生成应用程序包返回给开发者客户端。其中,DB指的是MySql数据库,用于存储移动开发平台的管理数据等。文件服务器用于存储应用程序包,以便开发者客户端下载。
本申请实施例中,移动开发平台的MySql数据库中管理数据的存储示意图例如可以如图3所示,在图3中,存储有应用程序的基本信息,构建记录信息、构建任务、构建任务与开发者的开发任务的对应关系等。其中,应用程序的基本信息例如,应用程序(APP)的标识(app_id)、代码托管平台(git)的地址(git_clone_url)、应用程序的工作空间信息(git_clone_local_path)等。构建任务的任务配置信息包括:应用程序的标识、所采用的构建模板的标识(template_id)、gradle工具的版本信息(gradle_version)、原生开发工具包的版本信息(ndk_version)、CPU架构的版本信息(abiFilters)、任务分支目录信息(apk_build_output_path)等。
本申请实施例的应用程序的构建方法,通过接收开发者客户端的应用程序创建指令和创建配置信息;根据应用程序创建指令和创建配置信息在构建服务器之中创建应用程序的模板;接收开发者客户端的任务构建指令和任务配置信息;根据任务构建指令和任务配置信息在构建服务器之中创建构建任务;以及接收构建服务器生成的应用程序包,并发送至开发者客户端,其中,应用程序包根据构建任务以及应用程序的模板生成。上述方案中,开发者可以根据实际需求来选择不同的构建任务配置信息,结合不同的构建任务配置信息来创建构建任务,并生成应用程序包,从而能够适用于不同需求的应用程序构建任务,适应性好,且预先配置的组件是可以根据开发者的要求进行扩展的,扩展性强,应用程序的构建效率高。
图4为本申请实施例二所提供的应用程序的构建方法的流程示意图。
本申请实施例以该应用程序的构建方法被配置于应用程序的构建装置中来举例说明,该应用程序的构建装置可以应用于任一计算机设备中,例如构建服务器中,以使该构建服务器可以执行应用程序的构建功能。
如图4所示,该应用程序的构建方法可以包括以下步骤:
步骤401,接收开发者客户端通过移动开发平台发送的应用程序创建指令和创建配置信息。
本申请实施例中,构建服务器与移动开发平台之间可以通过远程过程调用(Remote Procedure Call,RPC)实现通信,也就是说,移动开发平台可以通过远程过程调用RPC将应用程序创建指令和创建配置信息发送给构建服务器。
本申请实施例中,创建配置信息中例如可以包括以下参数:代码托管平台的地址等,以便构建服务器结合代码托管平台上应用程序的主分支代码创建应用程序的模板。
步骤402,根据应用程序创建指令和创建配置信息,创建应用程序的模板。
本申请实施例中,创建配置信息可以包括:代码托管平台的地址;对应的,构建服务器执行步骤402的过程例如可以为,根据应用程序创建指令,创建应用程序对应的工作空间;根据代码托管平台的地址,从代码托管平台上上获取所述应用程序的主分支代码;将主分支代码添加到工作空间中,生成应用程序的模板。
步骤403,接收开发者客户端通过移动开发平台发送的任务构建指令和任务配置信息。
本申请实施例中,移动开发平台可以通过远程过程调用RPC将任务构建指令和任务配置信息发送给构建服务器。其中,任务配置信息中可以包括:构建应用程序所需要的各个组件的版本信息,以便构建服务器根据各个组件的版本信息,从代码托管平台获取对应版本的组件代码。
步骤404,根据任务构建指令和任务配置信息,创建构建任务。
本申请实施例中,构建服务器执行步骤404的过程例如可以为,根据任务构建指令,在应用程序对应的工作空间中创建任务分支目录;获取工作空间中的主分支代码;将主分支代码拷贝至任务分支目录中;在接收到与任务配置信息相应的构建服务的调用请求时,将相应的构建服务加载至任务分支目录,生成构建任务。其中,构建服务器可以通过代码克隆或者代码拉取,对任务分支目录和工作空间进行同步。
步骤405,执行构建任务,并在构建任务的执行过程中,结合应用程序的模板,生成应用程序包。
本申请实施例中,需要说明的是,同一个应用程序的构建任务可以为多个,且每个构建任务对应一个子进程,也就是说,若一个应用程序包括多个分支,则可以实现多个分支对应的构建任务的并行进行,从而可以实现多个分支的并行构建,且各个分支的构建过程之间互不干扰,加快应用程序的构建效率。另外,不同应用程序的构建过程之间也互不干扰,可以实现对多个应用程序的并行构建,进一步加快应用程序的构建效率。另外,同一个构建服务也可以执行多个构建任务。
本申请实施例中,构建任务创建好之后,在到达构建任务的执行时间时,构建服务器中的构建服务执行构建任务的过程例如可以为,针对任务配置信息中的每个组件,根据任务配置信息中该组件的版本信息,从代码托管平台获取具有该版本信息的组件代码,将获取到的多个组件的组件代码添加至任务分支目录中,得到应用程序的代码文件,对代码文件进行编译打包等,得到应用程序包。
其中,任务配置信息中包括:多个组件的版本信息。构建服务器中的构建服务获取任务配置信息中的每个组件的版本信息的方式例如可以为,通过子进程机制child_process.exec(command,{env})获取每个组件的版本信息,进而获取对应版本信息的组 件代码,在子进程中执行gradle assembleDebug或gradle assembledeRelease进行构建生成debug或release包。构建服务上所有的构建子进程以build id为key,process id为value存储一个构建队列中,构建过程中可以根据build id找到对应的子进程动态kill构建子进程,从而达到取消相应构建子进程的能力。
步骤406,将应用程序包通过移动开发平台发送至开发者客户端。
本申请实施例中,应用程序包构建完成后,构建服务器可以将应用程序包存储到文件服务器中,并通过websocket长连接机制经过移动开发平台通知开发者客户端下载应用程序包,以便开发者客户端通过移动开发平台下载文件服务器上的应用程序包。
本申请实施例的应用程序的构建方法,通过接收开发者客户端通过移动开发平台发送的应用程序创建指令和创建配置信息;根据应用程序创建指令和创建配置信息,创建应用程序的模板;接收开发者客户端通过移动开发平台发送的任务构建指令和任务配置信息;根据任务构建指令和任务配置信息,创建构建任务;执行构建任务,并在构建任务的执行过程中,结合应用程序的模板,生成应用程序包;将应用程序包通过移动开发平台发送至开发者客户端。上述方案中,开发者可以根据实际需求来选择不同的构建任务配置信息,结合不同的构建任务配置信息来创建构建任务,并生成应用程序包,从而能够适用于不同需求的应用程序构建任务,适应性好,且预先配置的组件是可以根据开发者的要求进行扩展的,扩展性强,应用程序的构建效率高。
图5为本申请实施例三所提供的应用程序的构建装置的结构示意图。
如图5所示,该应用程序的构建装置500可以包括:接收模块510、第一创建模块520和第二创建模块530。
其中,接收模块510,用于接收开发者客户端的应用程序创建指令和创建配置信息;
第一创建模块520,用于根据所述应用程序创建指令和所述创建配置信息在构建服务器之中创建应用程序的模板;
所述接收模块510,还用于接收所述开发者客户端的任务构建指令和任务配置信息;
第二创建模块530,用于根据所述任务构建指令和所述任务配置信息在所述构建服务器之中创建构建任务;以及
所述接收模块510,还用于接收所述构建服务器生成的应用程序包,并发送至所述开发者客户端,其中,所述应用程序包根据所述构建任务以及所述应用程序的模板生成。
进一步地,在本申请实施例的一种可能的实现方式中,所述接收模块510具体用于,在预设的工程代码根目录下获取到构建开源工具时,确定接收到所述开发者客户端的应用程序创建指令;通过与所述开发者客户端之间的RESTfull API接口接收开发者客户端的创 建配置信息。
进一步地,在本申请实施例的一种可能的实现方式中,所述创建配置信息包括:代码托管平台的地址;对应的,所述第一创建模块520具体用于,根据所述应用程序创建指令,在所述构建服务器之中创建所述应用程序对应的工作空间;在所述应用程序对应的工作空间中添加所述代码托管平台上所述应用程序的主分支代码,生成所述应用程序的模板。
进一步地,在本申请实施例的一种可能的实现方式中,所述接收模块510具体用于,通过与所述开发者客户端之间的RESTfull API接口接收开发者客户端的所述任务构建指令和所述任务配置信息。
进一步地,在本申请实施例的一种可能的实现方式中,所述应用程序的模板为,添加有所述应用程序的主分支代码的工作空间;对应的,所述第二创建模块530具体用于,根据所述任务构建指令,在所述应用程序对应的工作空间中创建拷贝有所述主分支代码的任务分支目录;根据所述任务配置信息调用相应的构建服务,并将相应的所述构建服务加载至所述任务分支目录,生成所述构建任务。
进一步地,在本申请实施例的一种可能的实现方式中,所述接收模块510,还用于接收开发者客户端的构建模板创建指令,其中,所述构建模板创建指令包括:模板配置信息,其中,所述模板配置信息包括:任务所需的所有组件,以及每个组件对应的版本信息;所述第一创建模块520,还用于根据所述模板配置信息,创建多个构建模板,以便开发者从创建的多个构建模板中选择构建模板来生成任务配置信息。
进一步地,在本申请实施例的一种可能的实现方式中,所述构建任务为多个,且每个所述构建任务对应一个子进程。
本申请实施例的应用程序的构建装置,通过接收开发者客户端的应用程序创建指令和创建配置信息;根据应用程序创建指令和创建配置信息在构建服务器之中创建应用程序的模板;接收开发者客户端的任务构建指令和任务配置信息;根据任务构建指令和任务配置信息在构建服务器之中创建构建任务;以及接收构建服务器生成的应用程序包,并发送至开发者客户端,其中,应用程序包根据构建任务以及应用程序的模板生成。上述方案中,开发者可以根据实际需求来选择不同的构建任务配置信息,结合不同的构建任务配置信息来创建构建任务,并生成应用程序包,从而能够适用于不同需求的应用程序构建任务,适应性好,且预先配置的组件是可以根据开发者的要求进行扩展的,扩展性强,应用程序的构建效率高。
图6为本申请实施例四所提供的应用程序的构建装置的结构示意图。
如图6所示,该应用程序的构建装置600可以包括:接收模块610、第一创建模块620、 第二创建模块630、执行模块640和发送模块650。
其中,接收模块610,用于接收开发者客户端通过移动开发平台发送的应用程序创建指令和创建配置信息;
第一创建模块620,用于根据所述应用程序创建指令和所述创建配置信息,创建应用程序的模板;
所述接收模块610,还用于接收所述开发者客户端通过所述移动开发平台发送的任务构建指令和任务配置信息;
第二创建模块630,用于根据所述任务构建指令和所述任务配置信息,创建构建任务;
执行模块640,用于执行所述构建任务,并在所述构建任务的执行过程中,结合所述应用程序的模板,生成应用程序包;
发送模块650,用于将所述应用程序包通过所述移动开发平台发送至所述开发者客户端。
进一步地,在本申请实施例的一种可能的实现方式中,所述接收模块610具体用于,接收所述移动开发平台通过远程过程调用接口发送的所述应用程序创建指令和所述创建配置信息。
进一步地,在本申请实施例的一种可能的实现方式中,所述创建配置信息包括:代码托管平台的地址;对应的,所述第一创建模块620具体用于,根据所述应用程序创建指令,创建所述应用程序对应的工作空间;根据所述代码托管平台的地址,从所述代码托管平台上上获取所述应用程序的主分支代码;将所述主分支代码添加到所述工作空间中,生成应用程序的模板。
进一步地,在本申请实施例的一种可能的实现方式中,所述第二创建模块630具体用于,根据所述任务构建指令,在所述应用程序对应的工作空间中创建任务分支目录;获取所述工作空间中的主分支代码;将所述主分支代码拷贝至所述任务分支目录中;在接收到与所述任务配置信息相应的构建服务的调用请求时,将相应的所述构建服务加载至所述任务分支目录,生成构建任务。
进一步地,在本申请实施例的一种可能的实现方式中,所述的装置还包括:同步模块,用于通过代码克隆对所述任务分支目录和所述工作空间进行同步。
进一步地,在本申请实施例的一种可能的实现方式中,所述构建任务为多个,且每个所述构建任务对应一个子进程。
本申请实施例的应用程序的构建装置,通过接收开发者客户端通过移动开发平台发送的应用程序创建指令和创建配置信息;根据应用程序创建指令和创建配置信息,创建应用程序的模板;接收开发者客户端通过移动开发平台发送的任务构建指令和任务配置信息; 根据任务构建指令和任务配置信息,创建构建任务;执行构建任务,并在构建任务的执行过程中,结合应用程序的模板,生成应用程序包;将应用程序包通过移动开发平台发送至开发者客户端。上述方案中,开发者可以根据实际需求来选择不同的构建任务配置信息,结合不同的构建任务配置信息来创建构建任务,并生成应用程序包,从而能够适用于不同需求的应用程序构建任务,适应性好,且预先配置的组件是可以根据开发者的要求进行扩展的,扩展性强,应用程序的构建效率高。
为了实现上述实施例,本申请还提出一种计算机设备,包括:存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,处理器执行程序时,实现如本申请前述实施例提出的应用程序的构建方法。
为了实现上述实施例,本申请还提出一种计算机程序产品,当计算机程序产品中的指令处理器执行时,执行如本申请前述实施例提出的应用程序的构建方法。
图7示出了适于用来实现本申请实施方式的示例性计算机设备的框图。图7显示的计算机设备12仅仅是一个示例,不应对本申请实施例的功能和使用范围带来任何限制。
如图7所示,计算机设备12以通用计算设备的形式表现。计算机设备12的组件可以包括但不限于:一个或者多个处理器或者处理单元16,系统存储器28,连接不同系统组件(包括系统存储器28和处理单元16)的总线18。
总线18表示几类总线结构中的一种或多种,包括存储器总线或者存储器控制器,外围总线,图形加速端口,处理器或者使用多种总线结构中的任意总线结构的局域总线。举例来说,这些体系结构包括但不限于工业标准体系结构(Industry Standard Architecture;以下简称:ISA)总线,微通道体系结构(Micro Channel Architecture;以下简称:MAC)总线,增强型ISA总线、视频电子标准协会(Video Electronics Standards Association;以下简称:VESA)局域总线以及外围组件互连(Peripheral Component Interconnection;以下简称:PCI)总线。
计算机设备12典型地包括多种计算机系统可读介质。这些介质可以是任何能够被计算机设备12访问的可用介质,包括易失性和非易失性介质,可移动的和不可移动的介质。
存储器28可以包括易失性存储器形式的计算机系统可读介质,例如随机存取存储器(Random Access Memory;以下简称:RAM)30和/或高速缓存存储器32。计算机设备12可以进一步包括其它可移动/不可移动的、易失性/非易失性计算机系统存储介质。仅作为举例,存储系统34可以用于读写不可移动的、非易失性磁介质(图7未显示,通常称为“硬盘驱动器”)。尽管图7中未示出,可以提供用于对可移动非易失性磁盘(例如“软盘”)读写的磁盘驱动器,以及对可移动非易失性光盘(例如:光盘只读存储器(Compact Disc Read Only Memory;以下简称:CD-ROM)、数字多功能只读光盘(Digital Video Disc Read Only  Memory;以下简称:DVD-ROM)或者其它光介质)读写的光盘驱动器。在这些情况下,每个驱动器可以通过一个或者多个数据介质接口与总线18相连。存储器28可以包括至少一个程序产品,该程序产品具有一组(例如至少一个)程序模块,这些程序模块被配置以执行本申请各实施例的功能。
具有一组(至少一个)程序模块42的程序/实用工具40,可以存储在例如存储器28中,这样的程序模块42包括但不限于操作系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。程序模块42通常执行本申请所描述的实施例中的功能和/或方法。
计算机设备12也可以与一个或多个外部设备14(例如键盘、指向设备、显示器24等)通信,还可与一个或者多个使得用户能与该计算机设备12交互的设备通信,和/或与使得该计算机设备12能与一个或多个其它计算设备进行通信的任何设备(例如网卡,调制解调器等等)通信。这种通信可以通过输入/输出(I/O)接口22进行。并且,计算机设备12还可以通过网络适配器20与一个或者多个网络(例如局域网(Local Area Network;以下简称:LAN),广域网(Wide Area Network;以下简称:WAN)和/或公共网络,例如因特网)通信。如图所示,网络适配器20通过总线18与计算机设备12的其它模块通信。应当明白,尽管图中未示出,可以结合计算机设备12使用其它硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理单元、外部磁盘驱动阵列、RAID系统、磁带驱动器以及数据备份存储系统等。
处理单元16通过运行存储在系统存储器28中的程序,从而执行各种功能应用以及数据处理,例如实现前述实施例中提及的方法。
在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本申请的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不必须针对的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任一个或多个实施例或示例中以合适的方式结合。此外,在不相互矛盾的情况下,本领域的技术人员可以将本说明书中描述的不同实施例或示例以及不同实施例或示例的特征进行结合和组合。
此外,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。在本申请的描述中,“多个”的含义是至少两个,例如两个,三个等,除非另有明确具体的限定。
流程图中或在此以其他方式描述的任何过程或方法描述可以被理解为,表示包括一个 或更多个用于实现定制逻辑功能或过程的步骤的可执行指令的代码的模块、片段或部分,并且本申请的优选实施方式的范围包括另外的实现,其中可以不按所示出或讨论的顺序,包括根据所涉及的功能按基本同时的方式或按相反的顺序,来执行功能,这应被本申请的实施例所属技术领域的技术人员所理解。
在流程图中表示或在此以其他方式描述的逻辑和/或步骤,例如,可以被认为是用于实现逻辑功能的可执行指令的定序列表,可以具体实现在任何计算机可读介质中,以供指令执行系统、装置或设备(如基于计算机的系统、包括处理器的系统或其他可以从指令执行系统、装置或设备取指令并执行指令的系统)使用,或结合这些指令执行系统、装置或设备而使用。就本说明书而言,"计算机可读介质"可以是任何可以包含、存储、通信、传播或传输程序以供指令执行系统、装置或设备或结合这些指令执行系统、装置或设备而使用的装置。计算机可读介质的更具体的示例(非穷尽性列表)包括以下:具有一个或多个布线的电连接部(电子装置),便携式计算机盘盒(磁装置),随机存取存储器(RAM),只读存储器(ROM),可擦除可编辑只读存储器(EPROM或闪速存储器),光纤装置,以及便携式光盘只读存储器(CDROM)。另外,计算机可读介质甚至可以是可在其上打印所述程序的纸或其他合适的介质,因为可以例如通过对纸或其他介质进行光学扫描,接着进行编辑、解译或必要时以其他合适方式进行处理来以电子方式获得所述程序,然后将其存储在计算机存储器中。
应当理解,本申请的各部分可以用硬件、软件、固件或它们的组合来实现。在上述实施方式中,多个步骤或方法可以用存储在存储器中且由合适的指令执行系统执行的软件或固件来实现。如,如果用硬件来实现和在另一实施方式中一样,可用本领域公知的下列技术中的任一项或他们的组合来实现:具有用于对数据信号实现逻辑功能的逻辑门电路的离散逻辑电路,具有合适的组合逻辑门电路的专用集成电路,可编程门阵列(Program-mable Gate Array,PGA),现场可编程门阵列(Field-Programmable Gate Array,FPGA)等。
本技术领域的普通技术人员可以理解实现上述实施例方法携带的全部或部分步骤是可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,该程序在执行时,包括方法实施例的步骤之一或其组合。
此外,在本申请各个实施例中的各功能单元可以集成在一个处理模块中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。
上述提到的存储介质可以是只读存储器,磁盘或光盘等。尽管上面已经示出和描述了 本申请的实施例,可以理解的是,上述实施例是示例性的,不能理解为对本申请的限制,本领域的普通技术人员在本申请的范围内可以对上述实施例进行变化、修改、替换和变型。

Claims (17)

  1. 一种应用程序的构建方法,其特征在于,包括:
    接收开发者客户端的应用程序创建指令和创建配置信息;
    根据所述应用程序创建指令和所述创建配置信息在构建服务器之中创建应用程序的模板;
    接收所述开发者客户端的任务构建指令和任务配置信息;
    根据所述任务构建指令和所述任务配置信息在所述构建服务器之中创建构建任务;以及
    接收所述构建服务器生成的应用程序包,并发送至所述开发者客户端,其中,所述应用程序包根据所述构建任务以及所述应用程序的模板生成。
  2. 如权利要求1所述的方法,其特征在于,所述接收开发者客户端的应用程序创建指令和创建配置信息,包括:
    在预设的工程代码根目录下获取到构建开源工具时,确定接收到所述开发者客户端的应用程序创建指令;
    通过与所述开发者客户端之间的RESTfull API接口接收开发者客户端的创建配置信息。
  3. 如权利要求1所述的方法,其特征在于,所述创建配置信息包括:代码托管平台的地址;
    所述根据所述应用程序创建指令和所述创建配置信息在构建服务器之中创建应用程序的模板,包括:
    根据所述应用程序创建指令,在所述构建服务器之中创建所述应用程序对应的工作空间;
    在所述应用程序对应的工作空间中添加所述代码托管平台上所述应用程序的主分支代码,生成所述应用程序的模板。
  4. 如权利要求1所述的方法,其特征在于,所述接收所述开发者客户端的任务构建指令和任务配置信息,包括:
    通过与所述开发者客户端之间的RESTfull API接口接收开发者客户端的所述任务构建指令和所述任务配置信息。
  5. 如权利要求1所述的方法,其特征在于,所述应用程序的模板为,添加有所述应用程序的主分支代码的工作空间;
    所述根据所述任务构建指令和所述任务配置信息在所述构建服务器之中创建构建任务,包括:
    根据所述任务构建指令,在所述应用程序对应的工作空间中创建拷贝有所述主分支代码的任务分支目录;
    根据所述任务配置信息调用相应的构建服务,并将相应的所述构建服务加载至所述任务分支目录,生成所述构建任务。
  6. 如权利要求5所述的方法,其特征在于,所述根据所述任务构建指令和所述任务配置信息在所述构建服务器之中创建构建任务的方法,还包括:
    接收开发者客户端的构建模板创建指令,其中,所述构建模板创建指令包括:模板配置信息,其中,所述模板配置信息包括:任务所需的所有组件,以及每个组件对应的版本信息;
    根据所述模板配置信息,创建多个构建模板,以便开发者从创建的多个构建模板中选择构建模板来生成任务配置信息。
  7. 如权利要求1所述的方法,其特征在于,所述构建任务为多个,且每个所述构建任务对应一个子进程。
  8. 一种应用程序的构建方法,其特征在于,包括:
    接收开发者客户端通过移动开发平台发送的应用程序创建指令和创建配置信息;
    根据所述应用程序创建指令和所述创建配置信息,创建应用程序的模板;
    接收所述开发者客户端通过所述移动开发平台发送的任务构建指令和任务配置信息;
    根据所述任务构建指令和所述任务配置信息,创建构建任务;
    执行所述构建任务,并在所述构建任务的执行过程中,结合所述应用程序的模板,生成应用程序包;
    将所述应用程序包通过所述移动开发平台发送至所述开发者客户端。
  9. 如权利要求8所述的方法,其特征在于,所述接收开发者客户端通过移动开发平台发送的应用程序创建指令和创建配置信息,包括:
    接收所述移动开发平台通过远程过程调用接口发送的所述应用程序创建指令和所述创建配置信息。
  10. 如权利要求8所述的方法,其特征在于,所述创建配置信息包括:代码托管平台的地址;
    所述根据所述应用程序创建指令和所述创建配置信息,创建应用程序的模板,包括:
    根据所述应用程序创建指令,创建所述应用程序对应的工作空间;
    根据所述代码托管平台的地址,从所述代码托管平台上上获取所述应用程序的主分支代码;
    将所述主分支代码添加到所述工作空间中,生成应用程序的模板。
  11. 如权利要求10所述的方法,其特征在于,所述根据所述任务构建指令和所述任务配置信息,创建构建任务,包括:
    根据所述任务构建指令,在所述应用程序对应的工作空间中创建任务分支目录;
    获取所述工作空间中的主分支代码;
    将所述主分支代码拷贝至所述任务分支目录中;
    在接收到与所述任务配置信息相应的构建服务的调用请求时,将相应的所述构建服务加载至所述任务分支目录,生成构建任务。
  12. 如权利要求10所述的方法,其特征在于,还包括:
    通过代码克隆对所述任务分支目录和所述工作空间进行同步。
  13. 如权利要求8所述的方法,其特征在于,所述构建任务为多个,且每个所述构建任务对应一个子进程。
  14. 一种应用程序的构建装置,其特征在于,包括:
    接收模块,用于接收开发者客户端的应用程序创建指令和创建配置信息;
    第一创建模块,用于根据所述应用程序创建指令和所述创建配置信息在构建服务器之中创建应用程序的模板;
    所述接收模块,还用于接收所述开发者客户端的任务构建指令和任务配置信息;
    第二创建模块,用于根据所述任务构建指令和所述任务配置信息在所述构建服务器之中创建构建任务;以及
    所述接收模块,还用于接收所述构建服务器生成的应用程序包,并发送至所述开发者客户端,其中,所述应用程序包根据所述构建任务以及所述应用程序的模板生成。
  15. 一种应用程序的构建装置,其特征在于,包括:
    接收模块,用于接收开发者客户端通过移动开发平台发送的应用程序创建指令和创建配置信息;
    第一创建模块,用于根据所述应用程序创建指令和所述创建配置信息,创建应用程序的模板;
    所述接收模块,还用于接收所述开发者客户端通过所述移动开发平台发送的任务构建指令和任务配置信息;
    第二创建模块,用于根据所述任务构建指令和所述任务配置信息,创建构建任务;
    执行模块,用于执行所述构建任务,并在所述构建任务的执行过程中,结合所述应用程序的模板,生成应用程序包;
    发送模块,用于将所述应用程序包通过所述移动开发平台发送至所述开发者客户端。
  16. 一种计算机设备,其特征在于,包括:
    至少一个处理器;以及
    与所述至少一个处理器通信连接的存储器;其中,
    所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行权利要求1-13中任一项所述的方法。
  17. 一种存储有计算机指令的非瞬时计算机可读存储介质,其特征在于,所述计算机指令用于使所述计算机执行权利要求1-13中任一项所述的方法。
PCT/CN2021/124752 2020-12-28 2021-10-19 应用程序的构建方法、装置及计算机设备 WO2022142601A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011583035.4A CN112667228A (zh) 2020-12-28 2020-12-28 应用程序的构建方法、装置及计算机设备
CN202011583035.4 2020-12-28

Publications (1)

Publication Number Publication Date
WO2022142601A1 true WO2022142601A1 (zh) 2022-07-07

Family

ID=75411159

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/124752 WO2022142601A1 (zh) 2020-12-28 2021-10-19 应用程序的构建方法、装置及计算机设备

Country Status (2)

Country Link
CN (1) CN112667228A (zh)
WO (1) WO2022142601A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116954586A (zh) * 2023-08-02 2023-10-27 上海数慧系统技术有限公司 一种空间应用构建方法、系统及电子设备
CN116991374A (zh) * 2023-09-27 2023-11-03 北京凌云雀科技有限公司 构建持续集成任务的控制方法、装置、电子设备及介质

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112667228A (zh) * 2020-12-28 2021-04-16 京东数字科技控股股份有限公司 应用程序的构建方法、装置及计算机设备
CN114880116A (zh) * 2022-04-27 2022-08-09 远光软件股份有限公司 一种多版本运行方法、电子设备和存储介质
CN115460194A (zh) * 2022-08-20 2022-12-09 杭州沧浪健康管理有限公司 小程序构建上传方法、装置及计算机设备、存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108182058A (zh) * 2017-12-27 2018-06-19 北京星河星云信息技术有限公司 一种基于云平台的软件开发方法和云开发平台
CN111552508A (zh) * 2020-04-29 2020-08-18 杭州数梦工场科技有限公司 应用程序版本构建方法、装置、电子设备
US20200264848A1 (en) * 2019-02-14 2020-08-20 International Business Machines Corporation Single page application continuous integration, build, and deployment
CN111596928A (zh) * 2020-05-19 2020-08-28 吉林大学 一种应用控制方法、装置及电子设备
CN112667228A (zh) * 2020-12-28 2021-04-16 京东数字科技控股股份有限公司 应用程序的构建方法、装置及计算机设备

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140317596A1 (en) * 2012-06-29 2014-10-23 George BOURIS Device-independent application development based on business processes
CN110531962B (zh) * 2019-08-06 2023-11-17 上海连尚网络科技有限公司 小程序的开发处理方法、设备及计算机可读存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108182058A (zh) * 2017-12-27 2018-06-19 北京星河星云信息技术有限公司 一种基于云平台的软件开发方法和云开发平台
US20200264848A1 (en) * 2019-02-14 2020-08-20 International Business Machines Corporation Single page application continuous integration, build, and deployment
CN111552508A (zh) * 2020-04-29 2020-08-18 杭州数梦工场科技有限公司 应用程序版本构建方法、装置、电子设备
CN111596928A (zh) * 2020-05-19 2020-08-28 吉林大学 一种应用控制方法、装置及电子设备
CN112667228A (zh) * 2020-12-28 2021-04-16 京东数字科技控股股份有限公司 应用程序的构建方法、装置及计算机设备

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116954586A (zh) * 2023-08-02 2023-10-27 上海数慧系统技术有限公司 一种空间应用构建方法、系统及电子设备
CN116954586B (zh) * 2023-08-02 2024-05-07 上海数慧系统技术有限公司 一种空间应用构建方法、系统及电子设备
CN116991374A (zh) * 2023-09-27 2023-11-03 北京凌云雀科技有限公司 构建持续集成任务的控制方法、装置、电子设备及介质
CN116991374B (zh) * 2023-09-27 2024-01-19 北京凌云雀科技有限公司 构建持续集成任务的控制方法、装置、电子设备及介质

Also Published As

Publication number Publication date
CN112667228A (zh) 2021-04-16

Similar Documents

Publication Publication Date Title
WO2022142601A1 (zh) 应用程序的构建方法、装置及计算机设备
US9223568B2 (en) Designing and cross-configuring software
JP4800413B2 (ja) 情報処理システム
CN105045663B (zh) 快速部署虚拟机的方法与系统
CN1755620A (zh) 工作流进度表创作工具
US20060259386A1 (en) Building digital assets for use with software applications
US10585785B2 (en) Preservation of modifications after overlay removal from a container
US7506345B2 (en) Method and apparatus for adapting and hosting legacy user interface controls
US10817284B2 (en) Melding of mediation flow service component architecture (SCA) components
US10452371B2 (en) Automating enablement state inputs to workflows in z/OSMF
JP2006107483A (ja) デマンドイベントのためのオブジェクトクローン作成
CN109729121A (zh) 一种云存储系统及用于云存储系统中实现自定义数据处理的方法
WO2024152655A1 (zh) 基于云原生的工作流编排方法、装置、设备及介质
JP2005108082A (ja) デバイスドライバのインターフェース方法
US10592227B2 (en) Versioned intelligent offline execution of software configuration automation
US8028274B2 (en) Integrating loosely coupled tools using contracts and references
US10755212B2 (en) Dynamic process execution architecture with disassociated resource control
CN111414232B (zh) 虚拟机模板数据处理方法及装置
CN113641641A (zh) 文件存储服务的切换方法、切换系统、设备及存储介质
US20070006121A1 (en) Development activity recipe
JP5251197B2 (ja) メッセージ処理方法、メッセージ処理装置、及びプログラム
CN110520842B (zh) 针对传统应用兼容性的地址空间拆分系统及方法
US20130031416A1 (en) Method for Entity Oriented Testing of Data Handling Systems
US20120084327A1 (en) Building Information Technology Services From a Library of Elements
CN115866056A (zh) 服务调用方法和装置、电子设备、计算机可读存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21913346

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21913346

Country of ref document: EP

Kind code of ref document: A1