Software development kit packaging method and product
By receiving the target host identity and required software development toolkit in the packaging instruction, determining the matching configuration information and packaging it, the problem of cumbersome and error-prone software development toolkit packaging in the existing technology is solved, and efficient and accurate packaging process.
Patent Information
- Application Number
- CN202411587324.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-07
- Publication Date
- 2025-02-18
AI Technical Summary
The packaging process of software development toolkits in the prior art is too cumbersome and error-prone, especially when it is necessary to package different components of the same software development toolkit or components of different software development toolkits into different application products, manually packaged. The efficiency and accuracy are not high.
A method for packaging software development toolkits is proposed. By receiving the target host identity and required software development toolkit in the packaging instruction, matching configuration information is determined, and components of the software development toolkit are packaged based on this information to generate The application product of the target host.
It improves the packaging efficiency and accuracy of the software development toolkit, reduces the error rate of manual operation, can meet multiple packaging needs at the same time, and outputs matching target software development toolkit products and application products.
Smart Images

Figure CN119473379A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of software development technology, and in particular to a packaging method and product of a software development toolkit. Background Art
[0002] In order to meet people's usage needs, the functions of application programs are becoming more and more diverse. After the application function is developed, the components of the Software Development Kit (SDK) matching the function need to be packaged into the application product so that testers can match the program functions for testing.
[0003] Currently, most of the required software development kit components are packaged manually. The entire packaging process is too cumbersome and prone to errors, especially when different components of the same software development kit or components of different software development kits need to be packaged into different application products. The packaging efficiency and accuracy of manually packaging software development kits are not high.
[0004] How to improve the packaging efficiency and accuracy of software development kits has become an urgent problem to be solved. Summary of the invention
[0005] The main purpose of the embodiments of the present application is to propose a packaging method and product of a software development kit, aiming to improve the packaging efficiency and accuracy of the software development kit.
[0006] To achieve the above-mentioned purpose, the first aspect of an embodiment of the present application proposes a method for packaging a software development kit, comprising: receiving a packaging instruction for a software development kit of a target host, wherein the packaging instruction includes an identity identifier of the target host and a target software development kit required by the target host; determining configuration information of the target software development kit that matches the identity identifier as first configuration information; packaging a first component of the target software development kit according to the first configuration information to obtain a target software development kit product of the target host; packaging the target software development kit product with a target file to obtain an application product of the target host; the target file is a file required to generate the application product of the target host in addition to the target software development kit product.
[0007] In one embodiment, the step of packaging the first component of the target software development kit according to the first configuration information to obtain a target software development kit product includes: modifying the configuration information of the software development kit packaging platform that matches the target host and the target software development kit to the first configuration information; packaging the first component of the target software development kit through the modified software development kit packaging platform to obtain a target software development kit product of the target host.
[0008] In one embodiment, before packaging the target software development kit product with the target file to obtain the application product of the target host, the software development kit packaging method further includes: storing the target software development kit product and the target file in the same location.
[0009] In one embodiment, the target file is stored in a first area in a Maven local repository that matches the identity identifier; the step of storing the target software development kit product and the target file in the same location includes: sending the target software development kit product to a first target location in a Maven remote repository that matches the identity identifier and the target software development kit through a first gradle plug-in; sending the target software development kit product from the first target location to a second target location in the first area that matches the target software development kit through a second gradle plug-in.
[0010] In one embodiment, the target file is stored in a second area in the local storage area that matches the identity identifier; the step of storing the target software development kit product and the target file in the same location includes: copying the target software development kit product to a third target location in the second area that matches the target software development kit through a third gradle plug-in.
[0011] In one embodiment, the step of copying the target software development kit product to a third target location in the second area that matches the target software development kit through a third gradle plug-in includes: when the identity identifier of the target host is a preset identity identifier, copying the target software development kit product to the third target location through the third gradle plug-in.
[0012] To achieve the above-mentioned purpose, the second aspect of an embodiment of the present application proposes a packaging system for a software development kit, the system comprising: an instruction receiving module, a configuration information module, a first product module and a second product module; the instruction receiving module is used to receive a packaging instruction for a software development kit of a target host, wherein the packaging instruction includes an identity identifier of the target host and a target software development kit required by the target host; the configuration information module is used to determine the configuration information of the target software development kit matching the identity identifier as the first configuration information; the first product module is used to package a first component of the target software development kit according to the first configuration information to obtain a target software development kit product of the target host; the second product module is used to package the target software development kit product with a target file to obtain an application product of the target host; the target file is a file required to generate the application product of the target host in addition to the target software development kit product.
[0013] To achieve the above-mentioned purpose, the third aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method described in the first aspect is implemented.
[0014] To achieve the above-mentioned purpose, the fourth aspect of an embodiment of the present application proposes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.
[0015] To achieve the above objectives, the fifth aspect of an embodiment of the present application proposes a computer program product, which is stored in a storage medium and implements the method described in the first aspect when the computer program product is executed by at least one processor.
[0016] The software development kit packaging method and product proposed in the present application can improve the packaging efficiency and accuracy of the software development kit by determining the configuration information of the target software development kit that matches the identity of the target host based on the identity of the target host carried by the packaging instruction, the target software development kit required by the target host, and other information, and packaging the first component of the target software development kit in turn into the target software development kit product and application product of the target host based on the configuration information. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 It is a flowchart of a method for packaging a software development kit provided in an embodiment of the present application;
[0018] Figure 2It is a specific flow chart of the packaging method of the software development kit provided in the embodiment of the present application;
[0019] Figure 3 is another specific flow chart of the method for packaging a software development kit provided in an embodiment of the present application;
[0020] Figure 4 is another specific flow chart of the method for packaging a software development kit provided in an embodiment of the present application;
[0021] Figure 5 It is a structural diagram of a packaging system of a software development kit provided in an embodiment of the present application;
[0022] Figure 6 is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;
[0023] Figure 7 It is another hardware structure diagram of the electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0024] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0025] It should be noted that, although the functional modules are divided in the system schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the system or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0026] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0027] Based on this, the embodiments of the present application provide a method and product for packaging a software development kit, aiming to improve the packaging efficiency and accuracy of the software development kit.
[0028] The packaging method and product of the software development kit provided in the embodiments of the present application are specifically described through the following embodiments. First, the packaging method of the software development kit in the embodiments of the present application is described.
[0029] The packaging method of the software development kit provided in the embodiment of the present application can be applied to the terminal, can also be applied to the server side, and can also be software running in the terminal or the server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or a server cluster or distributed system composed of multiple physical servers, and can also be configured as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the packaging method of the software development kit, etc., but is not limited to the above forms.
[0030] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0031] The nouns involved in this application can be explained as follows:
[0032] A gradle plugin is a mechanism for extending and customizing the functionality of the gradle build system. Plugins provide flexibility to gradle, allowing developers to add custom behaviors and features based on specific needs. By writing a gradle plugin, you can customize and extend the gradle build system to suit the needs of a specific project. You can customize tasks, configure extensions, manipulate project properties, apply other plugins, etc. in the plugin. Plugins make the build process controllable and customizable, thereby improving development efficiency.
[0033] The Maven warehouse is a file system used to store and manage dependencies, plug-ins, and project components required in Maven projects. The Maven warehouse centrally manages JavaAPI resources (components), and any Maven project can obtain the required dependencies from the warehouse, thereby saving disk resources and facilitating dependency version management. The Maven warehouse is based on a simple file system. Each component has a unique coordinate, and its unique storage path in the warehouse can be defined based on this coordinate. This makes it easy for Maven projects to use and manage these components. Maven warehouses are divided into local warehouses and remote warehouses. The local warehouse is located on the local computer, while the remote warehouse is located in the external network, including the central warehouse, etc. Private servers are a special type of remote warehouse, usually set up in a local area network, which is used to proxy external warehouses and allow internal projects to be uploaded and downloaded, thereby speeding up project construction and improving security.
[0034] Figure 1 is an optional flowchart of the method for packaging a software development kit provided in an embodiment of the present application, Figure 1 The method for packaging the software development kit in the embodiment may include but is not limited to steps S101 to S104.
[0035] Step S101: receiving a packaging instruction for a software development kit of a target host, wherein the packaging instruction includes an identity of the target host and a target software development kit required by the target host;
[0036] Step S102: determining the configuration information of the target software development kit matching the identity identifier as the first configuration information;
[0037] Step S103: Packaging the first component of the target software development kit according to the first configuration information to obtain a target software development kit product of the target host;
[0038] Step S104: Packing the target software development kit product and the target file to obtain the application product of the target host; the target file is a file required to generate the application product of the target host in addition to the target software development kit product.
[0039] Steps S101 to S104 shown in the embodiment of the present application can improve the packaging efficiency and accuracy of the software development kit by determining the configuration information of the target software development kit that matches the identity of the target host based on the identity of the target host carried by the packaging instruction, the target software development kit required by the target host, and other information, and packaging the first component of the target software development kit into the target software development kit product and the application product of the target host in sequence based on the configuration information.
[0040] The target host may be one host or multiple hosts, and the target software development kit may be one software development kit or multiple software development kits, wherein the host refers to an application program that needs to install or update the software development kit.
[0041] In actual implementation, a matching packaging button may be displayed on the user interface for each host and each software development kit required by the host, and the user may click the packaging button matching the target host and the target software development kit to send the packaging instruction of the target host's software development kit in step S101. Alternatively, a host selection item, a selection item of at least one software development kit related to the host, and a packaging button may be displayed on the user interface for each host, and the user may select the target host and the target software development kit related to the target host and click the packaging button to send the packaging instruction of the target host's software development kit in step S101.
[0042] In one embodiment, before the above step S102: determining the configuration information of the target software development kit matching the identity identifier as the first configuration information, the software development kit packaging method provided in the embodiment of the present application further includes:
[0043] For each host, the host's identity identifier can be matched with at least one component in the software development kit required by the host, thereby establishing a matching relationship between the host's identity identifier and the configuration information of each software development kit;
[0044] For each piece of configuration information of a software development kit, the configuration information of the software development kit that matches the identity of the host includes information of components in the software development kit that match the identity of the host.
[0045] For example, there are two hosts, whose identities are host A and host B respectively. Software Development Kit SDK1 includes four components: component a, component b, component c, and component d. Software Development Kit SDK2 includes two components: component e and component f. Component a and component c in SDK1 match host A, component b and component d in SDK1 match host B, component e in SDK2 matches host A, and component f in SDK2 matches host A. Then the following matching relationship can be established:
[0046] The configuration information of SDK1 matching host A is: aFlag=1, bFlag=0, cFlag=1, dFlag=0;
[0047] The configuration information of SDK1 matching host B is aFlag=0, bFlag=1, cFlag=0, dFlag=1;
[0048] The configuration information of SDK2 matching host A is: eFlag = 1, fFlag = 0;
[0049] The configuration information of SDK2 matching host B is: eFlag=0, fFlag=1.
[0050] The Flag value of the component is 1, which indicates that the component matches the identity of the target host, and the Flag value of the component is 0, which indicates that the component does not match the identity of the target host.
[0051] In one embodiment, the above step S102: determining the configuration information of the target software development kit matching the identity identifier as the first configuration information includes:
[0052] The matching relationship between the identities of different hosts and the configuration information of the target software development kit is queried using the identity of the target host, the configuration information of the target software development kit matching the identity of the target host is determined, and the configuration information is determined as the first configuration information.
[0053] Exemplarily, when a packaging instruction is received in which the identity of the target host is host A and the target software development kit required by host A is SDK1, the matching relationship between the identity of different hosts and the configuration information of the target software development kit can be queried based on host A, and the configuration information of SDK1 matching host A is obtained as aFlag=1, bFlag=0, cFlag=1, dFlag=0, and this configuration information is determined as the first configuration information.
[0054] The embodiment of the present application matches the identity of each host with the components of at least one software development kit required by the host, establishes in advance a matching relationship between the identity of different hosts and the configuration information of each software development kit, and further queries the matching relationship between the identity of different hosts and the configuration information of the target software development kit based on the identity of the target host. The configuration information of the target software development kit that matches the identity of the target host can be quickly and accurately determined, thereby further improving the packaging efficiency and accuracy of the software development kit.
[0055] In one embodiment, the above step S103: packaging the first component of the target software development kit according to the first configuration information to obtain the target software development kit product includes:
[0056] Modify the configuration information of the software development kit packaging platform that matches the target host and the target software development kit to the first configuration information;
[0057] The first component of the target software development toolkit is packaged by the modified software development toolkit packaging platform to obtain a target software development toolkit product of the target host.
[0058] The embodiment of the present application directly modifies the configuration information of the software development kit packaging platform that matches the target host and the target software development kit, so that the software development kit packaging platform can obtain the correct configuration information, and can ensure that the software development kit packaging platform packages the first component of the target software development kit according to the correct configuration information to obtain the target software development kit product of the target host, which can further improve the packaging accuracy of the software development kit on the basis of ensuring the packaging efficiency of the software development kit.
[0059] In another embodiment, the above step S103: packaging the first component of the target software development kit according to the first configuration information to obtain the target software development kit product includes:
[0060] Sending the first component of the target software development kit to the software development kit packaging platform according to the first configuration information;
[0061] The first component of the target software development toolkit is packaged through a software development toolkit packaging platform to obtain a target software development toolkit product of a target host.
[0062] Based on the first configuration information, the embodiment of the present application sends the first component of the target software development kit to the software development kit packaging platform, so that the software development kit packaging platform can quickly and accurately obtain the first component in the target software development kit that matches the target host, which can further improve the packaging efficiency and accuracy of the software development kit.
[0063] In one embodiment, before packaging the target software development kit product and the target file in the above step S104 to obtain the application product of the target host, the software development kit packaging method provided in the embodiment of the present application further includes:
[0064] Store the target SDK artifacts in the same location as the target files.
[0065] The embodiment of the present application stores the target software development kit product and the target file in the same location, which makes it easy to package the first component of the target software development kit into the application product of the target host through the target software development kit product, and can further improve the packaging accuracy and packaging stability of the software development kit on the basis of ensuring the packaging efficiency of the software development kit.
[0066] Optionally, the target file is stored in the first area matching the identity in the Maven local repository.
[0067] In one embodiment, storing the target software development kit product and the target file in the same location includes:
[0068] Sending the target software development kit product to a first target location matching the identity and the target software development kit in the Maven remote repository through the first gradle plug-in;
[0069] The target software development kit product is sent from the first target location to a second target location matching the target software development kit in the first region through the second gradle plug-in.
[0070] Optionally, for each host, a storage area matching the host's identity is divided in the Maven remote repository and the local repository, and for each software development kit related to the host, a sub-area matching the software development kit is further divided in the storage area of the Maven remote repository and the local repository.
[0071] like Figure 2 As shown, when the received packaging instruction includes a target host, the identity of the target host is host A, and the software development kit required by host A is SDK1, first, the configuration information of SDK1 matching host A can be determined as the first configuration information, and then the configuration information of the software development kit packaging platform matching host A and SDK1 can be modified to the first configuration information, and the first component of SDK1 can be packaged through the modified software development kit packaging platform to obtain the SDK1 product of host A, and then the SDK1 product of host A can be sent to the Maven remote warehouse matching host A through the first gradle plug-in. The sub-area in the storage area that matches SDK1, that is, the first target location in the Maven remote warehouse that matches host A and SDK1, and then the second gradle plug-in can be used to send the SDK1 product of host A from the first target location in the Maven remote warehouse to the sub-area in the Maven local warehouse that matches host A and SDK1. The sub-area is located in the first area in the Maven local warehouse that matches host A, that is, the second target location in the first area that matches SDK1. Finally, the SDK1 product of host A stored in the first area in the Maven local warehouse can be packaged with the target file to obtain the application product of host A.
[0072] The embodiment of the present application makes full use of the storage characteristics of the Maven warehouse by storing the target file in a first area matching the identity in the Maven local warehouse, sending the target software development kit product to a first target location matching the identity and the target software development kit in the Maven remote warehouse through a first gradle plug-in, and sending the target software development kit product from the first target location to a second target location matching the target software development kit in the first area through a second gradle plug-in. There is no need to create a new folder to store the target software development kit product, which can save packaging resources and improve the packaging efficiency and accuracy of the software development kit.
[0073] Optionally, the target file is stored in a second area in the local storage area that matches the identity identifier.
[0074] In another embodiment, storing the target software development kit product and the target file in the same location includes:
[0075] The target software development kit product is copied to a third target location in the second region that matches the target software development kit through a third gradle plug-in.
[0076] Optionally, for each host, a storage directory matching the host's identity is divided in the local storage area, and for each software development kit related to the host, a subdirectory matching the software development kit is further divided under the storage directory in the local storage area.
[0077] like Figure 3 As shown, when the received packaging instruction includes a target host, the identity of the target host is host B, and the target software development kit required by host B is SDK2, first, the configuration information of SDK2 that matches host B can be determined as the first configuration information, and secondly, the configuration information of the software development kit packaging platform that matches host B and SDK2 can be modified to the first configuration information, and the first component of SDK2 can be packaged through the modified software development kit packaging platform to obtain the SDK2 product of host B, and then the SDK2 product of host B can be copied to a subdirectory in the local storage area that matches host B and SDK2 through a third gradle plug-in. The subdirectory is located in a storage directory in the local storage area that matches host B, that is, a third target location in the second area that matches SDK2, and finally, the SDK2 product of host B stored in the second area of the local storage area can be packaged with the target file to obtain the application product of host B.
[0078] The embodiment of the present application stores the target file in a second area in the local storage area that matches the identity identifier, and copies the target software development kit product to a third target location in the second area that matches the target software development kit through a third gradle plug-in. This can facilitate packaging the first component of the target software development kit into the application product of the target host through the target software development kit product, and can further improve the packaging accuracy and packaging stability of the software development kit on the basis of ensuring the packaging efficiency of the software development kit.
[0079] In one embodiment, the method of copying the target software development kit product to a third target location matching the target software development kit in the second region by using the third gradle plug-in includes:
[0080] When the identity of the target host is a preset identity, the target software development kit product is copied to the third target location through the third gradle plug-in.
[0081] Optionally, the first gradle plug-in, the second gradle plug-in and the third gradle plug-in are gradle plug-ins with different functions. The first gradle plug-in can be used to send the target software development kit product to a first target location in the Maven remote repository that matches the identity and the target software development kit; the second gradle plug-in can be used to send the target software development kit product from the first target location to a second target location in the first area that matches the target software development kit; the third gradle plug-in can be used to copy the target software development kit product to a third target location in the second area that matches the target software development kit.
[0082] like Figure 4As shown, when the received packaging instruction includes two target hosts, the identity identifiers of the target hosts are divided into host A and host B, and the target software development kits required by host A and host B are both SDK1, it can be determined whether host A and host B are preset identity identifiers. If host A is not the preset identity identifier, for host A, first, the configuration information of SDK1 matching host A can be determined as the first target configuration information, and secondly, the configuration information of the software development kit packaging platform matching host A and SDK1 can be modified to the first target configuration information, and the first target component of SDK1 can be packaged through the modified software development kit packaging platform to obtain host A's configuration information. SDK1 product, and then the SDK1 product of host A can be sent to the first target location in the Maven remote warehouse that matches host A and SDK1 through the first gradle plug-in, and then the SDK1 product of host A can be sent from the first target location in the Maven remote warehouse to the second target location in the Maven local warehouse that matches host A and SDK1 through the second gradle plug-in. The second target location is located in the first area in the Maven local warehouse that matches host A. Finally, the SDK1 product of host A stored in the first area in the Maven local warehouse can be packaged with the first target file to obtain the application product of host A.
[0083] If host B is a preset identity identifier, for host B, first, the configuration information of SDK1 that matches host B can be determined as the second target configuration information, and secondly, the configuration information of the software development toolkit packaging platform that matches host B and SDK1 can be modified to the second target configuration information, and the second target component of SDK1 can be packaged through the modified software development toolkit packaging platform to obtain the SDK1 product of host B, and then the SDK1 product of host B can be copied to the third target location in the local storage area that matches host B and SDK1 through the third gradle plug-in, and the third target location is located in the second area in the local storage area that matches host B, and finally, the SDK1 product of host B stored in the second area in the local storage area can be packaged with the second target file to obtain the application product of host B.
[0084] In the embodiment of the present application, when the identity identifier of the target host is a preset identity identifier, the target software development kit product is copied to a third target location through a third gradle plug-in. When the identity identifier of the target host is not the preset identity identifier, the target software development kit product is sent to a first target location in the Maven remote repository that matches the identity identifier and the target software development kit by using the first gradle plug-in, and the target software development kit product is sent from the first target location to a second target location in the first area that matches the target software development kit by using the second gradle plug-in. Based on whether the identity identifier of the target host is the preset identity identifier, different storage methods can be used to store the target software development kit product required by the target host in different locations, which can further improve the packaging efficiency and accuracy of the software development kit.
[0085] In another embodiment, storing the target software development kit product and the target file in the same location includes:
[0086] Store the target file in the storage area where the target SDK artifacts are located.
[0087] Optionally, after obtaining the target software development kit product, a new folder may be created locally to store the target software development kit product, and the target file may be copied to the folder where the target software development kit product is located for storage.
[0088] Optionally, after obtaining the target software development kit product, the target software development kit product can be sent to a Maven remote repository for storage, and the target file can also be sent to a storage area in the Maven remote repository where the target software development kit product is located for storage.
[0089] In actual implementation, factors such as the size of the target software development toolkit product and the target file, storage convenience, etc. can be comprehensively considered, and the target file can be flexibly chosen to be stored in the storage area where the target software development toolkit product is located, or the target file can be stored in the storage area where the target software development toolkit product is located, so as to store the target software development toolkit product and the target file in the same location.
[0090] It is worth mentioning that the above-mentioned storing the target software development kit product and the target file in the same location is only an optional condition for executing the above-mentioned step S104 of packaging the target software development kit product and the target file. In actual implementation, after obtaining the target software development kit product, the target file can also be directly extracted from the storage area of the target file, and then the extracted target file is directly packaged with the target software development kit product to obtain the application product.
[0091] The embodiment of the present application determines the configuration information of the target software development kit that matches the identity of the target host based on the information such as the identity of the target host carried by the packaging instruction and the target software development kit required by the target host, and packages the first component of the target software development kit into the target software development kit product of the target host based on the configuration information, and further uses different storage methods to store the target software development kit product of the target host in different locations based on whether the identity of the target host is a preset identity, which can improve the packaging efficiency, accuracy and flexibility of the software development kit.
[0092] In one application scenario, there are two target hosts in the received packaging instruction, and their identities are host A and host B, among which host B is a preset identity. The target software development kit required by host A is SDK1, and the target software development kit required by host B is SDK2. For host A, first, the matching relationship between the configuration information of the above-mentioned different hosts and SDK1 can be queried through host A, and the configuration information of SDK1 matching host A can be obtained as aFlag=1, bFlag=0, cFlag=1, dFlag=0. Then, the configuration information of the software development kit packaging platform matching host A and SDK1 can be modified to aFlag=1, bFlag=0, cFlag=1, dFlag=0, and the components a and c of SDK1 can be packaged through the modified software development kit packaging platform to obtain the SDK1 product of host A, which can then be obtained through the first The gradle plug-in sends the SDK1 product of host A to the first target location in the Maven remote warehouse that matches host A and SDK1, and then sends the SDK1 product of host A from the first target location that matches host A and SDK1 to the second target location in the Maven local warehouse that matches host A and SDK1 through the second gradle plug-in. The second target location is located in the first area of the Maven local warehouse that matches host A. Finally, the SDK1 product of host A and the first target file stored in the first area of the Maven local warehouse can be packaged to obtain the application product of host A.
[0093] For host B, first, the matching relationship between the configuration information of the above different hosts and SDK1 can be queried through host B, and the configuration information of SDK1 matching host B can be obtained as aFlag=0, bFlag=1, cFlag=0, dFlag=1. Then, the configuration information of the software development kit packaging platform matching host B and SDK1 can be modified to aFlag=0, bFlag=1, cFlag=0, dFlag=1, and the component b and component d of SDK1 can be packaged through the modified software development kit packaging platform to obtain the SDK1 product of host B. Then, the SDK1 product of host B can be copied to the third target location matching host B and SDK1 in the local storage area through the third gradle plug-in, and the third target location is located in the second area of the local storage area matching host B. Finally, the SDK1 product of host B stored in the second area of the local storage area can be packaged with the second target file to obtain the application product of host B.
[0094] In another application scenario, there is one target host in the received packaging instruction, whose identity is host A, and the target software development kits required by host A are SDK1 and SDK2. First, the matching relationship between the configuration information of the above different hosts and SDK1 can be queried through host A, and the configuration information of SDK1 matching host A is obtained as aFlag=1, bFlag=0, cFlag=1, dFlag=0, and the matching relationship between the configuration information of the above different hosts and SDK2 can be queried through host A, and the configuration information of SDK2 matching host A is obtained as eFlag=1, fFlag=0. Then, the configuration information of the software development kit packaging platform that matches host A and SDK1 can be modified to aFlag=1, bFlag=0, cFlag=1, dFlag=0, and the configuration information of the software development kit packaging platform that matches host A and SDK2 can be modified to eFlag=1, fFlag=0. Then, component a and component c of SDK1 can be packaged through the modified software development toolkit packaging platform to obtain the SDK1 product of host A, and component e of SDK2 can be packaged through the modified software development toolkit packaging platform to obtain the SDK2 product of host A. Then, the first gradle plug-in can be used to send the SDK1 product of host A to the first target location in the Maven remote warehouse that matches host A and SDK1, and the SDK2 product of host A can be sent to the first target location in the Maven remote warehouse that matches host A and SDK2. Then, the second gradle plug-in can be used to send the SDK1 product of host A from the first target location that matches host A and SDK1 to the second target location in the Maven local warehouse that matches host A and SDK1, and the SDK2 product of host A can be sent from the first target location that matches host A and SDK2 to the second target location in the Maven local warehouse that matches host A and SDK2. The second target location that matches host A and SDK1 and the second target location that matches host A and SDK2 are both located in the first area of the Maven local warehouse that matches host A. Finally, the SDK1 product, SDK2 product and target file of host A stored in the first area of the Maven local warehouse can be packaged to obtain the application product of host A.
[0095] In another application scenario, there are two target hosts in the received packaging instruction, and their identities are host A and host B, among which host B is a preset identity, and the target software development kits required by host A and host B are both SDK1. For host A, first, the matching relationship between the configuration information of the above-mentioned different hosts and SDK1 can be queried through host A, and the configuration information of SDK1 matching host A is obtained as aFlag=1, bFlag=0, cFlag=1, dFlag=0. Then, the configuration information of the software development kit packaging platform that matches host A and SDK1 can be modified to aFlag=1, bFlag=0, cFlag=1, dFlag=0. Then, the components a and c of SDK1 can be packaged through the modified software development kit packaging platform to obtain the SDK1 product of host A. Then, the SDK1 product of host A can be sent to the first target location in the Maven remote warehouse that matches host A and SDK1 through the first gradle plug-in, and then the SDK1 product of host A can be sent from the first target location that matches host A and SDK1 to the second target location in the Maven local warehouse that matches host A and SDK1 through the second gradle plug-in. The second target location that matches host A and SDK1 is located in the first area of the Maven local warehouse that matches host A. Finally, the first and target files of the SDK1 product of host A stored in the first area of the Maven local warehouse can be packaged to obtain the application product of host A.
[0096] For host B, first, the matching relationship between the configuration information of the above-mentioned different hosts and SDK1 can be queried through host B, and the configuration information of SDK1 matching host B can be obtained as aFlag=0, bFlag=1, cFlag=0, dFlag=1. Then, the configuration information of the software development kit packaging platform matching host B and SDK1 can be modified to aFlag=0, bFlag=1, cFlag=0, dFlag=1. Then, component b and component d of SDK1 can be packaged through the modified software development kit packaging platform to obtain the SDK1 product of host B. Then, the SDK1 product of host B can be copied to the third target location matching host B and SDK1 in the local storage area through the third gradle plug-in, and the third target location is located in the second area matching host B in the local storage area. Finally, the SDK1 product of host B stored in the second area of the local storage area can be packaged with the second target file to obtain the application product of host B.
[0097] The software development kit packaging method provided in the embodiment of the present application determines the configuration information of the target software development kit that matches the identity of the target host based on the identity of the target host carried by the packaging instruction, the target software development kit required by the target host, and other information, and packages the first component of the target software development kit into the target software development kit product and application product of the target host in sequence based on the configuration information. It can simultaneously meet multiple packaging requirements, output matching target software development kit products and application products, and improve the packaging efficiency and accuracy of the software development kit.
[0098] See also Figure 5 The embodiment of the present application also provides a software development kit packaging system 500, which can implement the above-mentioned software development kit packaging method. The system includes: an instruction receiving module 501, a configuration information module 502, a first product module 503 and a second product module 504.
[0099] The instruction receiving module 501 may be used to receive a packaging instruction for a software development kit of a target host, wherein the packaging instruction includes an identity identifier of the target host and a target software development kit required by the target host;
[0100] The configuration information module 502 may be used to determine the configuration information of the target software development kit that matches the identity identifier as the first configuration information;
[0101] The first product module 503 may be used to package the first component of the target software development kit according to the first configuration information to obtain the target software development kit product of the target host;
[0102] The second product module 504 can be used to package the target software development kit product and the target file to obtain the target host application product; the target file is a file required to generate the target host application product in addition to the target software development kit product.
[0103] In one implementation, the first product module 503 includes a configuration modification module and a packaging execution module.
[0104] The configuration modification module may be used to modify the configuration information of the software development kit packaging platform that matches the target host and the target software development kit into the first configuration information;
[0105] The packaging execution module can be used to package the first component of the target software development kit through the modified software development kit packaging platform to obtain the target software development kit product of the target host.
[0106] In one embodiment, the software development kit packaging system provided in the embodiment of the present application further includes a co-location storage module. The co-location storage module can be used to store the target software development kit product and the target file in the same location.
[0107] Optionally, the target file is stored in the first area matching the identity in the Maven local repository.
[0108] In one embodiment, the co-location storage module includes a first sending module and a second sending module.
[0109] The first sending module may be used to send the target software development kit product to a first target location matching the identity identifier and the target software development kit in the Maven remote repository through a first gradle plug-in;
[0110] The second sending module can be used to send the target software development kit product from the first target location to a second target location matching the target software development kit in the first region through a second gradle plug-in.
[0111] Optionally, the target file is stored in a second area in the local storage area that matches the identity identifier.
[0112] In one embodiment, the co-location storage module further includes a copy module, which can be used to copy the target software development kit product to a third target location in the second region that matches the target software development kit through a third gradle plug-in.
[0113] In one embodiment, the copy module may also be used to copy the target software development kit product to a third target location through a third gradle plug-in when the identity of the target host is a preset identity.
[0114] The specific implementation of the packaging system of the software development kit is basically the same as the specific implementation of the packaging method of the software development kit mentioned above, and will not be repeated here.
[0115] like Figure 6 As shown, the embodiment of the present application further provides an electronic device 600, including a processor 601 and a memory 602, the memory 602 stores a program or instruction that can be run on the processor 601, and the program or instruction is executed by the processor 601 to implement the various steps of the packaging method embodiment of the above-mentioned software development kit, and can achieve the same technical effect, to avoid repetition, it is not repeated here. It should be noted that the electronic device in the embodiment of the present application includes the above-mentioned mobile electronic device and non-mobile electronic device.
[0116] See also Figure 7 , Figure 7The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:
[0117] The processor 701 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0118] The memory 702 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 702 can store an operating system and other applications. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 702, and the processor 701 calls and executes the packaging method of the software development kit of the embodiment of this application;
[0119] Input / output interface 703, used to implement information input and output;
[0120] Communication interface 704, used to realize communication interaction between the device and other devices, which can be realized through wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.);
[0121] A bus 705 that transmits information between the various components of the device (e.g., the processor 701, the memory 702, the input / output interface 703, and the communication interface 704);
[0122] The processor 701 , the memory 702 , the input / output interface 703 and the communication interface 704 are connected to each other in communication within the device via a bus 705 .
[0123] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the packaging method of the above-mentioned software development tool kit.
[0124] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0125] The software development kit packaging method and product provided in the embodiments of the present application determine the configuration information of the target software development kit that matches the identity of the target host based on the information such as the identity of the target host carried by the packaging instruction and the target software development kit required by the target host, and packages the first component of the target software development kit into the target software development kit product based on the configuration information, and further stores the product of the target software development kit required by the target host in different locations using different storage methods based on whether the identity of the target host is a preset identity. This can improve the packaging efficiency and accuracy of the software development kit and can simultaneously meet multiple packaging requirements to obtain matching application products.
[0126] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0127] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0128] The system embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.
[0129] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0130] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0131] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0132] In the several embodiments provided in the present application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of systems or units, which can be electrical, mechanical or other forms.
[0133] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0134] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0135] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.
[0136] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. A method for packaging a software development kit, characterized in that: include: Receiving a packaging instruction for a software development kit of a target host, wherein the packaging instruction includes an identity identifier of the target host and a target software development kit required by the target host; Determine the configuration information of the target software development kit that matches the identity identifier as first configuration information; According to the first configuration information, the first component of the target software development toolkit is packaged to obtain a target software development toolkit product of the target host; The target software development kit product and the target file are packaged to obtain the application product of the target host; the target file is a file required to generate the application product of the target host in addition to the target software development kit product.
2. The method for packaging a software development kit according to claim 1, wherein: The step of packaging the first component of the target software development kit according to the first configuration information to obtain the target software development kit product of the target host includes: Modify the configuration information of the software development kit packaging platform that matches the target host and the target software development kit to the first configuration information; The first component of the target software development toolkit is packaged by the modified software development toolkit packaging platform to obtain a target software development toolkit product of the target host.
3. The method for packaging a software development kit according to claim 1, wherein: Before packaging the target software development kit product and the target file to obtain the application product of the target host, the software development kit packaging method further includes: The target software development kit product is stored in the same location as the target file.
4. The method for packaging a software development kit according to claim 3, wherein: The target file is stored in the first area matching the identity in the Maven local repository; The step of storing the target software development kit product and the target file in the same location comprises: Sending the target software development kit product to a first target location matching the identity identifier and the target software development kit in a Maven remote repository through a first gradle plug-in; The target software development kit product is sent from the first target location to a second target location in the first region that matches the target software development kit through a second gradle plug-in.
5. The method for packaging a software development kit according to claim 3, wherein: The target file is stored in a second area in the local storage area that matches the identity identifier; The step of storing the target software development kit product and the target file in the same location comprises: The target software development kit product is copied to a third target location matching the target software development kit in the second area through a third gradle plug-in.
6. The method for packaging a software development kit according to claim 5, wherein: The step of copying the target software development kit product to a third target location matching the target software development kit in the second area through a third gradle plug-in comprises: In a case where the identity of the target host is a preset identity, the target software development kit product is copied to the third target location through the third gradle plug-in.
7. A packaging system for a software development toolkit, characterized in that: It includes an instruction receiving module, a configuration information module, a first product module and a second product module; The instruction receiving module is used to receive a packaging instruction for a software development kit of a target host, wherein the packaging instruction includes an identity identifier of the target host and a target software development kit required by the target host; The configuration information module is used to determine the configuration information of the target software development kit matching the identity identifier as the first configuration information; The first product module is used to package the first component of the target software development toolkit according to the first configuration information to obtain the target software development toolkit product of the target host; The second product module is used to package the target software development kit product and the target file to obtain the application product of the target host; the target file is a file required to generate the application product of the target host in addition to the target software development kit product.
8. An electronic device, characterized in that: The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the packaging method of the software development kit according to any one of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for packaging a software development kit according to any one of claims 1 to 6 is implemented.
10. A computer program product, characterized in that The computer program product is stored in a storage medium, and when the computer program product is executed by at least one processor, the method for packaging a software development kit according to any one of claims 1 to 6 is implemented.