Component processing method and related device

Through the self-developed qcc command line tool, the cumbersome problems of component creation and management in component-based projects are solved, and development efficiency and accuracy are improved.

CN119493562AActive Publication Date: 2025-02-21BEIJING SOHU NEW MOMENTUM INFORMATION TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510076575.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-17
Publication Date
2025-02-21
Estimated Expiration
2045-01-17

AI Technical Summary

Technical Problem

In component-based engineering, the creation and management process of components is cumbersome, resulting in low development efficiency and prone to efficiency bottlenecks and manual errors.

Method used

Provides a component processing method, which automatically creates and manages components through self-developed qcc command line tools, realizes automatic creation and management of components through self-developed qcc command line tools.

Benefits of technology

Improves the efficiency of component creation and management, reduces the complexity and error risks of manual operations, and ensures the accuracy and consistency of component configuration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119493562A_ABST
    Figure CN119493562A_ABST
Patent Text Reader

Abstract

The invention provides a component processing method and a related device, and relates to the field of component creation and management. In the application, a component processing instruction can be responded, an initial component is created, basic library dependency of the initial component is configured, the basic library dependency is integrated into the initial component to obtain a target component, and a code and a configuration file of the target component are pushed to a newly-built component private library. Configuring a component version number of the target component, pushing the component version number to the component private library, creating a component index library on a local server, verifying an environment index of the component index library, if the verification is passed, adjusting the configuration file, and if the verification is not passed, adjusting the configuration file. And establishing an association relationship between the component index library and the component private library, and pushing the adjusted configuration file to the component index library. According to the invention, the automatic creation and management of the component can be realized, and compared with a manual mode, the efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of component creation and management, and more specifically, to a component processing method and related devices. Background Art

[0002] With the development of iOS application development, large-scale projects mostly adopt component-based architecture, which realizes code isolation, reuse and facilitates team collaboration by splitting functional modules into independent components. In component-based engineering practice, the creation and management of components have become a key link affecting development efficiency. The process is cumbersome and prone to efficiency bottlenecks. Therefore, how to realize the automatic creation and management of components to improve processing efficiency is a technical problem that technicians in this field need to solve urgently. Summary of the invention

[0003] In view of this, the present application provides a component processing method and related devices to solve the urgent need to realize automatic creation and management of components to improve processing efficiency.

[0004] In order to solve the above technical problems, this application adopts the following technical solutions:

[0005] A component processing method, comprising:

[0006] Respond to component processing instructions and create initial components;

[0007] Configuring the basic library dependency of the initial component, integrating the basic library dependency into the initial component, and obtaining the target component;

[0008] Push the code and configuration file of the target component to the newly created component private library; the configuration file includes the basic configuration information of the target component;

[0009] Configure the component version number of the target component, and push the component version number to the component private library;

[0010] Create a component index library on the local server;

[0011] Verifying the environmental indicators of the component index library;

[0012] If the verification is passed, the configuration file is adjusted to establish an association relationship between the component index library and the component private library;

[0013] The adjusted configuration file is pushed to the component index library.

[0014] Optionally, configure the basic library dependency of the initial component, including:

[0015] Set dependent component information and add basic component library dependencies.

[0016] Optionally, pushing the code and configuration file of the target component to the newly created component private library includes:

[0017] Using the warehouse name in the component processing instruction and the pre-configured private library address, create a component private library with the same name as the warehouse name on the remote server;

[0018] Pushing the code of the target component to the component private library;

[0019] Performing basic information configuration on the target component to obtain a configuration file including the basic configuration information;

[0020] Push the configuration file to the component private library.

[0021] Optionally, configuring the component version number of the target component includes:

[0022] The version number parameter in the component processing instruction is used to automatically perform a labeling operation to obtain the component version number.

[0023] Optionally, create a component index repository on the local server, including:

[0024] Create a component index repository on the local server using the preconfigured index repository name and index repository address.

[0025] Optionally, verifying the environmental indicators of the component index library includes:

[0026] Calling a remote verification index instruction to verify the environmental indicators of the component index library; the environmental indicators include at least one of the following:

[0027] File format, dependency declaration, and version information accuracy.

[0028] Optionally, pushing the adjusted configuration file to the component index library includes:

[0029] A first push instruction is called to push the adjusted configuration file to the component index library.

[0030] After pushing the adjusted configuration file to the component index library, it also includes:

[0031] A second push instruction is called to push the adjusted configuration file to the component private library.

[0032] A component processing device, comprising:

[0033] The component creation module is used to respond to component processing instructions and create initial components;

[0034] A configuration module, used to configure the basic library dependency of the initial component, integrate the basic library dependency into the initial component, and obtain a target component;

[0035] A first push module, used to push the code and configuration file of the target component to the newly created component private library; the configuration file includes basic configuration information of the target component;

[0036] A second push module is used to configure the component version number of the target component and push the component version number to the component private library;

[0037] An index library creation module is used to create a component index library on a local server;

[0038] A verification module, used to verify the environmental indicators of the component index library;

[0039] An adjustment module, used for adjusting the configuration file if the verification is passed, so as to establish an association relationship between the component index library and the component private library;

[0040] The third push module is used to push the adjusted configuration file to the component index library.

[0041] An electronic device comprises at least one processor and a memory connected to the processor, wherein:

[0042] The memory is used to store computer programs;

[0043] The processor is used to execute the computer program so that the electronic device can implement the above-mentioned component processing method.

[0044] A computer storage medium carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement the above-mentioned component processing method.

[0045] The present application provides a component processing method and related devices, in which a component processing instruction can be responded to, an initial component can be created, the basic library dependency of the initial component can be configured, the basic library dependency can be integrated into the initial component to obtain a target component, the code and configuration file of the target component can be pushed to the newly created component private library, the component version number of the target component can be configured, the component version number can be pushed to the component private library, a component index library can be created on a local server, the environmental indicators of the component index library can be verified, and if the verification passes, the configuration file can be adjusted to establish an association relationship between the component index library and the component private library, and the adjusted configuration file can be pushed to the component index library. That is, through the present invention, automatic creation and management of components can be achieved, which can improve efficiency compared to manual methods. In addition, the present invention can avoid the error-prone problems caused by manual methods and improve the accuracy of component creation and management. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0047] Figure 1 A flowchart of a component processing method provided by an embodiment of the present invention;

[0048] Figure 2 A flowchart of a method for processing a private library provided by an embodiment of the present invention;

[0049] Figure 3 A schematic diagram of the structure of a component processing device provided by an embodiment of the present invention;

[0050] Figure 4 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0051] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0052] In order for those skilled in the art to understand the present invention more clearly, the professional terms in the present invention are now explained.

[0053] iOS component engineering: A development architecture that splits iOS engineering code into multiple reusable components to facilitate parallel development, reduce coupling, and facilitate expansion and maintenance.

[0054] CocoaPods: iOS dependency management tool, which can automatically download configuration libraries with dependency declaration file Podfile declaration. The present invention uses it to create component projects and manage dependencies, such as "pod lib create" and configure podspec dependencies. "pod lib create" is a component creation command.

[0055] podspec file: CocoaPods configuration file that describes the component, including name, version, author, code source, dependencies, description, adapted version and other information, and the automatic configuration dependencies and related information of the present invention.

[0056] Private library: A code repository used within the development team to store components or private code. The present invention uses the self-developed "qcc" tool to automatically create and push component engineering code to it, associate podspec files with private libraries, and facilitate internal management reuse.

[0057] Index library: a repository for storing and managing component podspec files, similar to a directory. The present invention creates a remote index library and pushes verified podspec files, which facilitates the sharing and reuse of components in different projects, improving discoverability and ease of use.

[0058] Code version control tool git repository: a code repository based on the git version control system. The private library and index library in the present invention use it to implement code storage, version management and collaborative development, remote private library creation, code push backup sharing, etc.

[0059] With the development of iOS application development, large projects mostly adopt component-based architecture, which realizes code isolation, reuse and facilitates team collaboration by splitting functional modules into independent components. In component-based engineering practice, the creation and management of components have become the key links affecting development efficiency, and the process is cumbersome and prone to efficiency bottlenecks.

[0060] Currently, you can use the built-in command of CocoaPods manually, which is to generate component projects through the "pod libcreate" command. The subsequent podspec and git and repo processing need to be done manually by developers, which has the following problems:

[0061] 1. Component creation configuration is complex and prone to errors: When the existing CocoaPods command is used to create iOS componentized project components, after using the "pod lib create" command that comes with CocoaPods to generate the component project, its dependency configuration needs to be manually filled in the s.dependency field of the component dependency configuration item in the podspec file. This requires developers to have a clear understanding of many components and dependencies. It is easy to have dependency errors and inaccurate version number filling during operation. In addition, other common configuration items such as podspec description and author also mostly rely on manual completion, which increases the probability of errors. In addition, due to the numerous manual configuration tasks mentioned above, developers need to spend a lot of time and energy to complete various settings, which increases the time-consuming component creation phase and reduces efficiency.

[0062] 2. High component management costs and error-prone problems: After creating a component in the traditional way, git and CocoaPods management is manually performed. For example, in git management, it is necessary to manage and associate two repositories, the private library and the index library, and to handle git-related commands and component version tag-related operations. The process is repetitive and cumbersome; in CocoaPods management, it is necessary to configure multiple key fields in the podspec file, and to publish to the index library, local verification, push and other steps must be performed in sequence. Each link is closely related, and the entire process will be blocked if an error occurs in one component. Manual operation will be prone to errors and the process will be scattered and time-consuming. In addition, once an error occurs in the component management link, it takes extra time and effort to troubleshoot and correct the error, which hinders the development progress of the iOS componentization project.

[0063] The existing component creation and management methods affect the efficiency of the iOS componentized engineering development process due to the above problems. Therefore, an efficient and convenient way is urgently needed to optimize it to ensure that the iOS componentized engineering can be carried out more smoothly and efficiently, thereby improving the overall development efficiency.

[0064] To this end, the present application provides a component processing method and related devices, which use the self-developed qcc command line tool to connect related tasks in series, reduce management costs, and shorten time consumption to solve the above problems. Specifically:

[0065] 1. Solve the problem of cumbersome component creation and configuration.

[0066] The present invention supports automatic configuration dependency and improvement. After receiving the "qcc create" command, the qcc command line tool first calls "pod lib create" to create a component project, then automatically configures the s.dependency field of the podspec file to add basic library dependencies, executes the component dependency integration command "pod install" to integrate dependencies, and automatically improves other contents of podspec, thereby simplifying the creation and configuration process and improving efficiency.

[0067] 2. Solve the problem of high component management costs.

[0068] Automated multi-step management: After the component project is created, the qcc tool automatically creates a remote private library and pushes the code, sets the s.source field of the podspec to associate with the private library address, automatically tags and updates the s.version field, creates an index library, and completes operations such as adding, verifying, and pushing podspec files, reducing manual errors and reducing management costs and time.

[0069] 3. Solve the problem of development process efficiency being affected.

[0070] Process integration and efficient promotion: The qcc tool integrates all aspects of component creation and management. Developers enter the "qcccreate" command and related parameters, and the tool completes the operations in sequence without switching back and forth to coordinate, reducing time waste and error troubleshooting costs and improving development efficiency.

[0071] The present invention utilizes the self-developed "qcc" command line tool, especially the automated execution process with "qcc create" as the main command, to realize the creation and management of components. The specific effects are as follows:

[0072] 1. Intelligent configuration mechanism for component creation. In the component creation phase, the podspec file is intelligently configured according to preset values. It also covers base library dependencies and automatically executes the pod install command to complete dependency integration;

[0073] 2. The automated management process of private libraries realizes the fully automated operation of private library management from creation to association and management, avoiding common parameter errors and process connection problems in manual operations;

[0074] 3. Index library automation operation link: A complete index library automation operation link has been built to ensure the smooth release and reuse of components in the index library, and improve the efficiency and accuracy of component management in the index library.

[0075] Based on the above content, an embodiment of the present invention provides a component processing method, and the execution subject may be an electronic device such as a processor or a controller. Figure 1, a component processing method may include:

[0076] S11. Respond to component processing instructions and create initial components.

[0077] In this embodiment, it is necessary to pre-configure the qcc command line tool for component creation and management. The "qcc" command line tool of the present invention is intended to take the "qcc create" command as the core. By inputting "qcc create" and parameters, multiple steps can be completed. In the iOS component engineering, many steps and configuration work involved in the process of creating component engineering are connected in series, and a set of process-oriented and convenient component creation system is constructed, which greatly shortens the development cycle and improves engineering efficiency. Through automated operation and related parameter configuration, efficient integration of processes is achieved, operation complexity and error probability are reduced, and the efficiency of the entire component development process is finally improved. In addition, since no human participation is required, errors caused by manual negligence, unskilled operation, etc., such as configuration dependency and mistakes in library operation, are reduced through automated operation. Standardized version management, automatic tagging and updating of version information according to rules, ensure component configuration consistency, and facilitate stable reuse. In addition, the embodiment of the present invention can provide a one-stop operation portal, without switching between multiple tools, files and systems, reducing learning costs and facilitating team use. In addition, it can be convenient for functional expansion based on the existing framework to cope with future demand changes. Standardized automated processes simplify maintenance, facilitate location and solution of problems, and reduce cost difficulty.

[0078] In one implementation, the qcc command line tool includes multiple commands, such as the "qcc create" command, the "qccrepo index repository name index repository url (uniform resource locator, uniform resource locator)" command, the "qccgit private repository address" command, the "qcc global username username" command, etc., and each command can be called later in the component creation and management process.

[0079] The "qcc create" command is a core command. In one implementation, the "qcc create" command can be:

[0080] "qcc create repository name tag (optional) components (optional, multiple basic components are separated by English commas) --lint (optional, whether to automatically verify the correctness of podspec)".

[0081] For example, if you want to create a component with a repository name of "MyComponent", set the initial version to "0.1.0", depend on "AFNetworking" and "SVUploadManager" components and require automatic verification, the "qcc create" command is:

[0082] "qcc create MyComponent 0.1.0 AFNetworking,SDWebImage --lint" command.

[0083] In an actual scenario, if a "qcc create" command is received, it is considered that a component processing instruction is received. At this time, the component processing instruction can be responded to to create an initial component.

[0084] The process of creating the initial component may be:

[0085] After executing the "qcc create" command, first call the "pod lib create" command that comes with CocoaPods to create the basic framework of the component project and obtain the component. In this embodiment, in order to facilitate the distinction between components in different processing flows, the component created in this step is called the initial component.

[0086] S12. Configure the basic library dependency of the initial component, integrate the basic library dependency into the initial component, and obtain the target component.

[0087] In this embodiment, the basic library dependency of the initial component is configured to ensure that the component has complete dependency support in function implementation. The basic library dependency is subsequently integrated into the initial component to obtain the target component so that each dependent library can be correctly combined with the newly created initial component to ensure that the functions of each dependent library can be successfully called when the component is subsequently run.

[0088] In an implementation of the invention, the basic library dependency for configuring the initial component may be:

[0089] Set dependent component information and add basic component library dependencies.

[0090] To elaborate, the s.dependency field in the podspec file of the initial component is automatically configured. During the configuration process, not only the dependent component information such as "AFNetworking" and "SVUploadManager" specified by the "components" parameter will be set, but also the base component library dependencies required by the project will be added to ensure that the component has complete dependency support in function implementation. After the configuration is completed, execute the "pod install" command to realize the automatic integration of dependencies, integrate the base library dependencies into the initial component, and obtain the target component.

[0091] S13: Push the code and configuration file of the target component to the newly created component private library.

[0092] The configuration file includes basic configuration information of the target component.

[0093] Specifically, in order to make the content of the podspec file complete and meet the specification requirements, it is necessary to configure the target component to obtain a configuration file, which specifically refers to the podspec file, that is, the embodiment of the present invention needs to configure the podspec file. Component-related configuration is completed automatically without the need for developers to manually intervene in a large amount, which greatly simplifies the creation process and improves accuracy.

[0094] After obtaining the code and configuration file of the target component, it is necessary to push the code and configuration file of the target component to the newly created component private library, so that the component private library stores the code and configuration file of the target component, which is convenient for subsequent component calls.

[0095] S14. Configure the component version number of the target component, and push the component version number to the component private library.

[0096] In this embodiment, in order to manage component versions clearly and in a standardized manner and to avoid problems such as forgetting to add tags during manual operations, in this embodiment of the present invention, the component version number of the target component is automatically configured.

[0097] In a specific configuration process, in one implementation, the version number parameter in the component processing instruction can be used to automatically perform a labeling operation to obtain the component version number.

[0098] The component processing instruction is the aforementioned "qcc create" command, and the version number parameter is the aforementioned tag parameter. As in the aforementioned embodiment, the value of the tag parameter at this time is 0.1.0.

[0099] Specifically, the tagging operation is automatically performed according to the "tag" parameter passed in the "qcc create" command, for example, a "git tag 0.1.0" tag is generated, which is the component version number in the embodiment of the present invention, and the "git pushtag" command is executed to push the tag to the remote component private library, so as to manage the component version clearly and standardizedly, avoiding problems such as forgetting to tag during manual operation.

[0100] It should be noted that since the "tag" parameter in the "qcc create" command is optional, there may be a situation where the value of the "tag" parameter in the "qcccreate" command is empty. In this case, it is considered that the "tag" parameter is not passed in, and the value of the "tag" parameter is determined according to the default rule, which is generally 0.1.0 by default.

[0101] S15. Create a component index library on the local server.

[0102] In this embodiment, the component index library is created on the local server so that subsequent users can use the index library to call the components in the above-mentioned component private library to implement component calling.

[0103] In one implementation, a component index library may be created on a local server using a preconfigured index library name and index library address.

[0104] The index library name and index library address need to be pre-configured before the "qcc create" command is executed. The index library name and index library address can be called index library information. When configuring index library information, you can use the "qccrepo index library name index library url" command, such as "qcc repo PrivateRepos ", inform the qcc tool of the corresponding index library information to facilitate subsequent interaction with the index library. Operations such as pushing component podspec files rely on this configuration.

[0105] After pre-configuring the index library name and index library address, you can execute the "pod repo add index library name index library url" command, where "index library name" and "index library url" are the index library name and index library address filled in when configuring the index library information. This command creates an index library with the same name as the component in the local index library server, thereby associating the corresponding index library with the local server, facilitating subsequent index search and other related operations, and making preparations for publishing components to the index library.

[0106] S16: Check whether the environmental indicators of the component index library are passed; if the verification is passed, execute step S17.

[0107] In this embodiment, the environmental indicators of the component index library are verified to ensure that the file complies with the specifications and requirements set by the CocoaPods index library, thereby avoiding a series of problems caused by errors or non-standardization of the podspec file, such as component reference failure, compatibility errors, etc.

[0108] In one implementation, a remote verification index instruction may be called to verify the environmental indicators of the component index library; the environmental indicators include at least one of the following:

[0109] File format, dependency declaration, and version information accuracy.

[0110] Specifically, the remote verification index instruction may be a "pod spec lint --private" command for remote verification. Before submitting the podspec file of the component to the index library, execute the "pod spec lint --private" command, which will conduct a comprehensive and detailed check on various indicators of the podspec file in the index library environment, including but not limited to the file format, dependency declaration, version information accuracy, etc.

[0111] If the verification is passed, the subsequent steps can be continued. If the verification is not passed, an abnormal prompt message can be output to enable the maintenance personnel to perform manual operations.

[0112] S17: Adjust the configuration file to establish an association relationship between the component index library and the component private library.

[0113] Specifically, when adjusting the configuration file, the association between the component private library and the component index library is realized by configuring the podspec file. During the specific configuration, the s.source field in the podspec file is set to the git address of the created component private library. Through this configuration, the association between the component index library and the component private library is established, ensuring that the component index library can successfully obtain the code resources of the corresponding tag from the private library during subsequent use.

[0114] S18. Push the adjusted configuration file to the component index library.

[0115] In this embodiment, pushing the adjusted configuration file to the component index library refers to storing the configuration file in the component index library.

[0116] In one implementation, a first push instruction is called to push the adjusted configuration file to the component index library.

[0117] The first push instruction can be the "pod repo push index library name xx.podspec" command. When the "pod spec lint --private" command is verified, the "pod repo push index library name xx.podspec" command is executed immediately. The "index library name" here is filled in when configuring the index library information. This command pushes the component's podspec file to the git storage of the index library, making it easier for other projects to discover and reference the component in the iOS componentized project, realizing the effective sharing and circulation of component resources in the entire project system, and improving the overall efficiency and coordination of project development.

[0118] Through the above steps, the qcc command line tool has orderly integrated and automated the key links in the component creation and management process. Developers only need to enter the "qcc create" command as required and reasonably configure relevant parameters to drive the entire process smoothly, reduce the complexity of manual operations and the risk of errors, and improve the overall efficiency of component-related operations in iOS component-based projects.

[0119] In another implementation, after the adjusted configuration file is pushed to the component index library, a second push instruction may be called to push the adjusted configuration file to the component private library to update the configuration file in the component private library and achieve the uniformity of the configuration files in the component private library and the component index library. The second push instruction may be based on actual configuration, such as a git push command.

[0120] In this embodiment, in order to address the problems in the prior art that dependency configurations need to be filled in manually when creating components, which is prone to errors, and other configuration items are tedious and time-consuming to manually complete, the present invention aims to create a convenient command line tool to achieve automated configuration of dependencies and various conventional configurations in the component creation process, reduce manual operations, reduce the probability of errors, and enable developers to quickly and accurately create component projects, thereby significantly improving the overall efficiency of the component creation process.

[0121] In addition, considering the prior art in component management, the git management operation is cumbersome and prone to errors, and the CocoaPods management involves a complex process and problems in each link when private libraries and index libraries are involved, the present invention is committed to creating an integrated management mechanism. Through the command line tool of the present invention, multiple scattered and error-prone links such as the automation of the use of private libraries in git management, the configuration of private library addresses in CocoaPods management, and publishing to the index library are integrated to achieve automated operation, reduce manual intervention, avoid various errors caused by human errors, make the component management process more concise and smooth, reduce error correction costs, and ensure that components can be efficiently managed and reused in the entire iOS componentization project.

[0122] In another implementation of the present invention, referring to Figure 2 , pushing the target component's code and configuration file to the newly created component private library, which may include:

[0123] S21. Using the warehouse name in the component processing instruction and the pre-configured private library address, create a component private library with the same name as the warehouse name on the remote server.

[0124] Specifically, when creating a component private library, you need to use the "warehouse name" parameter and the "private library address". The "warehouse name" parameter can be the "warehouse name" parameter passed into the "qcc create" command when creating the component.

[0125] The private library address needs to be pre-configured. Specifically, before using the "qcc create" command, some basic configurations need to be performed, such as configuring the index library information, configuring the private library information, configuring the user information, configuring the system version information, etc.

[0126] Configuring private library information means: executing the "qcc git private library address" command, for example, "qcc git / privateRepo". is the server address, and privateRepo is the private library grouping path; let the qcc tool specify the remote private library address. The subsequent creation of component repositories will be completed under the grouping of this address, and the component code will be pushed to this repository to ensure the correct execution of related processes.

[0127] In addition, configuring user information means: using the "qcc global username username", such as the "qcc globalusername John" command, to set the developer's username for using the tool, which is used for git operations, component-related configurations, and remote repository interaction authentication. Using the "qcc global email email address", such as the "qcc global emailjohn@example.com" command, is used to set the developer's email address, which serves as an identification and contact in git operations, component-related configurations, and other scenarios.

[0128] Configuring system version information means: using the "qcc global plat system version", for example, the "qcc globalplat iOS16.0" command, to let the qcc tool know the iOS system version adapted by the project, which is beneficial for accurately configuring the adaptation version range in the podspec file when creating components, ensuring the normal operation and reuse of components.

[0129] After the "Private Library Address" is configured, based on the "Warehouse Name" parameter passed in when creating the component and the "Private Library Address" in the configuration phase, the qcc tool / privateRepo" creates a git repository with the same name as "repository name" and uses it as a private repository for the component.

[0130] S22. Push the code of the target component to the component private library.

[0131] In this embodiment, the code of the target component generated previously is automatically pushed to the newly created component private library through the git push command.

[0132] In this embodiment, the creation of a component private library and code push can be automatically implemented, and the entire process does not require developers to manually operate git creation and code push related commands, saving manpower.

[0133] S23. Perform basic information configuration on the target component to obtain a configuration file including the basic configuration information.

[0134] In this embodiment, the basic information fields of the podspec file are automatically configured, such as filling in component description information according to the default format, filling in author information based on pre-configured user name information, and accurately setting the adapted iOS version range with reference to the system version configuration, etc., so that the content of the podspec file is complete and meets the specification requirements, and component-related configuration does not require a lot of manual intervention by developers, which greatly simplifies the creation process and improves accuracy.

[0135] S24. Push the configuration file to the component private library.

[0136] Specifically, after the basic information is configured, the configuration file, that is, the above-mentioned podspec file, is pushed to the private library corresponding to the component through the gitpush command.

[0137] In this embodiment, the component private library automated management process is utilized to achieve fully automated operations from creation to association and management of private libraries, thus avoiding common parameter errors and process connection problems in manual operations.

[0138] Based on the above-mentioned embodiment of the component processing method, another embodiment of the present invention provides a component processing device, referring to Figure 3 , which may include:

[0139] The component creation module 11 is used to respond to the component processing instruction and create an initial component;

[0140] A configuration module 12, configured to configure the basic library dependency of the initial component, integrate the basic library dependency into the initial component, and obtain a target component;

[0141] The first push module 13 is used to push the code and configuration file of the target component to the newly created component private library; the configuration file includes the basic configuration information of the target component;

[0142] A second push module 14 is used to configure the component version number of the target component and push the component version number to the component private library;

[0143] An index library creation module 15 is used to create a component index library on a local server;

[0144] A verification module 16, used to verify the environmental indicators of the component index library;

[0145] An adjustment module 17, configured to adjust the configuration file if the verification is passed, so as to establish an association relationship between the component index library and the component private library;

[0146] The third pushing module 18 is used to push the adjusted configuration file to the component index library.

[0147] In one implementation, when the configuration module 12 is used to configure the basic library dependency of the initial component, it is specifically used to:

[0148] Set dependent component information and add basic component library dependencies.

[0149] In one implementation, the first push module 13 includes:

[0150] Creating a submodule, for creating a component private library with the same name as the warehouse name on a remote server by using the warehouse name in the component processing instruction and a pre-configured private library address;

[0151] A first push submodule, used to push the code of the target component to the component private library;

[0152] A configuration submodule, used to perform basic information configuration on the target component to obtain a configuration file including basic configuration information;

[0153] The second push submodule is used to push the configuration file to the component private library.

[0154] In one implementation, when the second push module 14 is used to configure the component version number of the target component, it is specifically used to:

[0155] The version number parameter in the component processing instruction is used to automatically perform a labeling operation to obtain the component version number.

[0156] In one implementation, the index library creation module 15 is specifically used for:

[0157] Create a component index repository on the local server using the preconfigured index repository name and index repository address.

[0158] In one implementation, the verification module 16 is specifically used for:

[0159] Calling a remote verification index instruction to verify the environmental indicators of the component index library; the environmental indicators include at least one of the following:

[0160] File format, dependency declaration, and version information accuracy.

[0161] In one implementation, the third push module 18 is specifically used for:

[0162] A first push instruction is called to push the adjusted configuration file to the component index library.

[0163] The component processing device also includes:

[0164] The fourth push module is used to call the second push instruction to push the adjusted configuration file to the component private library.

[0165] In this embodiment, a component processing instruction can be responded to, an initial component can be created, the basic library dependency of the initial component can be configured, the basic library dependency can be integrated into the initial component to obtain a target component, the code and configuration file of the target component can be pushed to the newly created component private library, the component version number of the target component can be configured, the component version number can be pushed to the component private library, a component index library can be created on a local server, the environmental indicators of the component index library can be verified, and if the verification passes, the configuration file can be adjusted to establish an association relationship between the component index library and the component private library, and the adjusted configuration file can be pushed to the component index library. That is, through the present invention, automatic creation and management of components can be realized, which can improve efficiency compared to manual methods.

[0166] It should be noted that, for the working process of each module and sub-module in this embodiment, please refer to the corresponding description in the above embodiment, which will not be repeated here.

[0167] An embodiment of the present application also provides an electronic device, including at least one processor and a memory connected to the processor, wherein:

[0168] The memory is used to store computer programs;

[0169] The processor is used to execute the computer program so that the electronic device can implement the above-mentioned component processing method.

[0170] refer to Figure 4 As shown, it shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiment of the present application. The electronic device in the embodiment of the present application may include but is not limited to fixed terminals such as mobile phones, laptops, PDAs (personal digital assistants), PADs (tablet computers), desktop computers, etc. Figure 4 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0171] like Figure 4 As shown, the electronic device may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 to a random access memory (RAM) 603. When the electronic device is powered on, various programs and data required for the operation of the electronic device are also stored in the RAM 603. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0172] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a memory card, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although Figure 4 An electronic device having various devices is shown, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0173] An embodiment of the present application also provides a computer program product including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements any component processing method provided in the embodiment of the present application.

[0174] A computer-readable storage medium is also provided in an embodiment of the present application. The storage medium carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any component processing method provided in the embodiment of the present application.

[0175] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A component processing method, characterized in that: include: Respond to component processing instructions and create initial components; Configuring the basic library dependency of the initial component, integrating the basic library dependency into the initial component, and obtaining the target component; Push the code and configuration file of the target component to the newly created component private library; the configuration file includes the basic configuration information of the target component; Configure the component version number of the target component, and push the component version number to the component private library; Create a component index library on the local server; Verifying the environmental indicators of the component index library; If the verification is passed, the configuration file is adjusted to establish an association relationship between the component index library and the component private library; The adjusted configuration file is pushed to the component index library.

2. The component processing method according to claim 1, characterized in that: Configure the basic library dependencies of the initial components, including: Set dependent component information and add basic component library dependencies.

3. The component processing method according to claim 1, characterized in that: Push the target component's code and configuration files to the newly created component private library, including: Using the warehouse name in the component processing instruction and the pre-configured private library address, create a component private library with the same name as the warehouse name on the remote server; Pushing the code of the target component to the component private library; Performing basic information configuration on the target component to obtain a configuration file including the basic configuration information; Push the configuration file to the component private library.

4. The component processing method according to claim 1, characterized in that: Configuring the component version number of the target component includes: The version number parameter in the component processing instruction is used to automatically perform a labeling operation to obtain the component version number.

5. The component processing method according to claim 1, characterized in that: Create a component index library on the local server, including: Create a component index repository on the local server using the preconfigured index repository name and index repository address.

6. The component processing method according to claim 1, characterized in that: Verifying the environmental indicators of the component index library includes: Calling a remote verification index instruction to verify the environmental indicators of the component index library; the environmental indicators include at least one of the following: File format, dependency declaration, and version information accuracy.

7. The component processing method according to claim 1, characterized in that: Push the adjusted configuration file to the component index library, including: Invoking a first push instruction to push the adjusted configuration file to the component index library; After pushing the adjusted configuration file to the component index library, it also includes: A second push instruction is called to push the adjusted configuration file to the component private library.

8. A component processing device, characterized in that: include: The component creation module is used to respond to component processing instructions and create initial components; A configuration module, used to configure the basic library dependency of the initial component, integrate the basic library dependency into the initial component, and obtain a target component; A first push module, used to push the code and configuration file of the target component to the newly created component private library; the configuration file includes basic configuration information of the target component; A second push module is used to configure the component version number of the target component and push the component version number to the component private library; An index library creation module is used to create a component index library on a local server; A verification module, used to verify the environmental indicators of the component index library; An adjustment module, used for adjusting the configuration file if the verification is passed, so as to establish an association relationship between the component index library and the component private library; The third push module is used to push the adjusted configuration file to the component index library.

9. An electronic device, characterized in that: The method comprises at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program so that the electronic device can implement the component processing method according to any one of claims 1 to 7.

10. A computer storage medium, characterized in that: The storage medium carries one or more computer programs, and when the one or more computer programs are executed by an electronic device, the electronic device can implement the component processing method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Component library verification method, system and equipment and storage medium

    CN116303056A

  • System component processing method and device, equipment and storage medium

    CN116489228A

  • Component library construction method and device, electronic equipment and storage medium

    CN117112060A

  • Progressive component sharing management method and device

    CN118132167A

  • Automatic component configuration method and system for Flutter module

    CN118484187A