CN112965720B - Component compiling method, device, equipment and computer readable storage medium - Google Patents

Component compiling method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN112965720B
CN112965720B CN202110189155.4A CN202110189155A CN112965720B CN 112965720 B CN112965720 B CN 112965720B CN 202110189155 A CN202110189155 A CN 202110189155A CN 112965720 B CN112965720 B CN 112965720B
Authority
CN
China
Prior art keywords
component
compiling
components
source code
aar
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110189155.4A
Other languages
Chinese (zh)
Other versions
CN112965720A (en
Inventor
谢伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Weimeng Enterprise Development Co ltd
Original Assignee
Shanghai Weimeng Enterprise Development Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Weimeng Enterprise Development Co ltd filed Critical Shanghai Weimeng Enterprise Development Co ltd
Priority to CN202110189155.4A priority Critical patent/CN112965720B/en
Publication of CN112965720A publication Critical patent/CN112965720A/en
Application granted granted Critical
Publication of CN112965720B publication Critical patent/CN112965720B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/42Syntactic analysis
    • G06F8/427Parsing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a component compiling method, which comprises the following steps: analyzing the received compiling task to obtain each first component to be compiled by the source code; acquiring a preset inter-component dependency relationship, and determining each second component depending on each first component according to the inter-component dependency relationship; searching source code paths corresponding to the first components and the second components respectively from a source code path catalog; acquiring target source codes corresponding to the first components and the second components respectively according to the source code paths; and compiling the first components and the second components based on the target source codes. By applying the component compiling method provided by the invention, the flexibility of configuration is greatly improved, the source code loading and compiling time is shortened, and the service iteration development efficiency is improved. The invention also discloses a component compiling device, equipment and a storage medium, which have corresponding technical effects.

Description

Component compiling method, device, equipment and computer readable storage medium
Technical Field
The present invention relates to the field of software development technologies, and in particular, to a method, an apparatus, a device, and a computer readable storage medium for compiling components.
Background
In a multi-component (module) project, such as an Android multi-component project, when a business development, or a business debug is required, some components need to be recompiled.
The existing component compiling scheme is multi-component full-source code loading compiling, namely, all the source codes of all the currently existing components are loaded, and the loaded full-source codes are compiled. The configuration is inflexible, the source code loading and compiling time is too long, and the service iteration development efficiency is low.
In summary, how to effectively solve the problems of inflexible configuration, overlong source code loading and compiling time, low service iteration development efficiency and the like of the existing component compiling scheme is a problem which needs to be solved by the technicians in the field at present.
Disclosure of Invention
The invention aims to provide a component compiling method, which greatly improves the flexibility of configuration, shortens the loading and compiling time of source codes and improves the iterative development efficiency of business; another object of the present invention is to provide a component compiling apparatus, device and computer-readable storage medium.
In order to solve the technical problems, the invention provides the following technical scheme:
a component compiling method, comprising:
Analyzing the received compiling task to obtain each first component to be compiled by the source code;
acquiring a preset inter-component dependency relationship, and determining each second component depending on each first component according to the inter-component dependency relationship;
searching source code paths corresponding to the first components and the second components respectively from a source code path catalog;
Acquiring target source codes respectively corresponding to the first components and the second components according to the source code paths;
And compiling each first component and each second component based on each target source code.
In one embodiment of the present invention, after compiling each of the first component and each of the second component based on each of the target source codes, the compiling method further includes:
Acquiring each third component of non-source code compilation corresponding to the compiling task;
searching a first aar packet corresponding to each third component from a aar code base;
according to the dependency relationship between each first component and each second component, the modified source codes of each first component and each second component are respectively packaged to obtain each second aar package;
a aar compilation operation is performed based on each of the first aar packages and each of the second aar packages.
In one embodiment of the present invention, after the modified source codes of the first components and the second components are respectively packaged to obtain the second aar packages, the method further includes:
Searching a third aar package corresponding to each first component and each second component from the aar code base;
each of the third aar packets is replaced with each of the second aar packets.
In one embodiment of the present invention, searching the first aar package corresponding to each of the third components from the aar code base includes:
Acquiring a target compiling version corresponding to the compiling task;
Searching a first aar package of the target compiled version corresponding to each third component from the aar code base;
packaging the modified source codes of the first component and the second component respectively, including:
respectively packaging the modified source codes of the first components and the second components according to the target compiled version;
Searching a third aar package corresponding to each first component and each second component from aar code base, including:
And searching a third aar package of the target compiled version corresponding to each first component and each second component from the aar code base.
In a specific embodiment of the present invention, parsing a received compiling task to obtain first components to be compiled by source code includes:
acquiring each first component of which the source code switch variable state corresponding to the compiling task is in an open state;
After determining each second component depending on each first component according to the inter-component dependency relationship, the method further comprises:
And converting the state of the source code switch variable corresponding to each second component from the closed state to the open state.
In one embodiment of the present invention, after compiling each of the first component and each of the second component based on each of the target source codes, the compiling method further includes:
and converting the source code switch variable state of each first component and each second component from the open state to the closed state.
In one embodiment of the present invention, before the source code switch variable state corresponding to each of the second components is converted from the off state to the on state, the method further includes:
Acquiring the identity information of a compiling requester corresponding to the compiling task;
Performing authority verification on the identity information;
And when the authority verification is passed, executing the step of converting the source code switch variable state corresponding to each second component from the closed state to the open state.
A component compiling apparatus, comprising:
the source code compiling assembly obtaining module is used for analyzing the received compiling task to obtain each first assembly to be compiled by the source code;
The component determining module is used for acquiring a preset inter-component dependency relationship and determining each second component depending on each first component according to the inter-component dependency relationship;
the path searching module is used for searching the source code paths corresponding to the first components and the second components respectively from the source code path catalog;
The source code acquisition module is used for acquiring target source codes respectively corresponding to the first components and the second components according to the source code paths;
and the component compiling module is used for compiling the first components and the second components based on the target source codes.
A component compiling device, comprising:
a memory for storing a computer program;
A processor for implementing the steps of the component compilation method as described above when executing said computer program.
A computer readable storage medium having stored thereon a computer program which when executed by a processor implements the steps of a component compilation method as described above.
According to the component compiling method provided by the invention, the received compiling task is analyzed to obtain each first component to be compiled by the source code; acquiring a preset inter-component dependency relationship, and determining each second component depending on each first component according to the inter-component dependency relationship; searching source code paths corresponding to the first components and the second components respectively from a source code path catalog; acquiring target source codes corresponding to the first components and the second components respectively according to the source code paths; and compiling the first components and the second components based on the target source codes. And automatically screening each first component needing to be subjected to source code compiling, and selecting each second component on which each first component depends respectively, so that only the target source codes of each first component and each second component need to be loaded, and component compiling is performed according to each target source code. Compared with the existing full source code loading compiling scheme, the method and the device greatly improve the flexibility of configuration, shorten the source code loading and compiling time and improve the business iteration development efficiency.
Correspondingly, the invention also provides a component compiling device, equipment and a computer readable storage medium corresponding to the component compiling method, which have the technical effects and are not repeated herein.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of an embodiment of a method for compiling components in accordance with the present invention;
FIG. 2 is a flowchart of another implementation of the component compiling method according to the embodiment of the invention;
FIG. 3 is a block diagram of a component compiling apparatus according to an embodiment of the invention;
FIG. 4 is a block diagram of a component compiling apparatus according to an embodiment of the invention.
Detailed Description
In order to better understand the aspects of the present invention, the present invention will be described in further detail with reference to the accompanying drawings and detailed description. It will be apparent that the described embodiments are only some, but not all, embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Embodiment one:
referring to fig. 1, fig. 1 is a flowchart showing an implementation of a component compiling method according to an embodiment of the invention, the method may include the following steps:
s101: and analyzing the received compiling task to obtain each first component to be compiled by the source code.
When a compiling task is received, the compiling task comprises all first components to be compiled by the source code, and the received compiling task is analyzed to obtain all the first components to be compiled by the source code.
The compiling task can be a business development task, a business debugging task and the like.
S102: acquiring a preset inter-component dependency relationship, and determining each second component depending on each first component according to the inter-component dependency relationship.
And after analyzing and obtaining each first component to be compiled by the source code, acquiring the preset inter-component dependency relationship, and determining each second component depending on each first component according to the inter-component dependency relationship. The source code of the second component which each first component depends on is required to be used when the source code is compiled for each first component.
S103: and searching the source code paths corresponding to the first components and the second components respectively from the source code path catalogue.
A source code path catalog is preset, and the source code paths of all the components are stored in the source code path catalog. After determining each first component to be compiled by the source code and each second component on which each first component depends respectively, searching source code paths corresponding to each first component and each second component respectively from a source code path catalog.
S104: and acquiring target source codes corresponding to the first components and the second components respectively according to the source code paths.
After the source code paths corresponding to the first components and the second components are found, the target source codes corresponding to the first components and the second components are obtained according to the source code paths. After the target source codes corresponding to the first components and the second components are obtained, the target source codes corresponding to the first components and the second components are displayed, so that subsequent component compiling work is conducted according to the displayed source code information.
S105: and compiling the first components and the second components based on the target source codes.
After the target source codes corresponding to the first components and the second components are obtained, compiling the first components and the second components based on the target source codes. According to different requirements of each business iteration, different component source codes are set and loaded, so that the source codes corresponding to components which do not need to be developed at present are not loaded into the current engineering, the load of a component compiling tool and a compiling task are reduced, and the compiling speed of projects is accelerated.
According to the component compiling method provided by the invention, the received compiling task is analyzed to obtain each first component to be compiled by the source code; acquiring a preset inter-component dependency relationship, and determining each second component depending on each first component according to the inter-component dependency relationship; searching source code paths corresponding to the first components and the second components respectively from a source code path catalog; acquiring target source codes corresponding to the first components and the second components respectively according to the source code paths; and compiling the first components and the second components based on the target source codes. And automatically screening each first component needing to be subjected to source code compiling, and selecting each second component on which each first component depends respectively, so that only the target source codes of each first component and each second component need to be loaded, and component compiling is performed according to each target source code. Compared with the existing full source code loading compiling scheme, the method and the device greatly improve the flexibility of configuration, shorten the source code loading and compiling time and improve the business iteration development efficiency.
It should be noted that, based on the first embodiment, the embodiment of the present invention further provides a corresponding improvement scheme. The following embodiments relate to the same steps as those in the first embodiment or the steps corresponding to the first embodiment, and the corresponding beneficial effects can also be referred to each other, so that the following modified embodiments will not be repeated.
Embodiment two:
referring to fig. 2, fig. 2 is a flowchart illustrating another implementation of a component compiling method according to an embodiment of the invention, the method may include the following steps:
s201: and acquiring each first component of which the source code switch variable state is in an open state and corresponding to the compiling task.
The source code switch variable of each component is predefined, such as the source code switch variable is defined in the setting configuration file under the root directory of each component. The source code switch variable state of whether source code compiling is needed in the current compiling task of all components can be added in advance in a build. Gradle file under the project. That is, when the source code switch variable state of a certain component is in an on state, it is indicated that the component needs to perform source code compiling, and when the source code switch variable state of the certain component is in an off state, it is indicated that the component does not need to perform source code compiling. And acquiring each first component of which the source code switch variable state is in an open state and corresponding to the compiling task, thereby acquiring each first component needing source code compiling.
S202: acquiring a preset inter-component dependency relationship, and determining each second component depending on each first component according to the inter-component dependency relationship.
S203: and acquiring the identity information of the compiling requester corresponding to the compiling task.
After each second component depending on each first component is determined, the identification information of the compiling requester corresponding to the compiling task is obtained.
S204: and carrying out authority verification on the identity information.
An operator capable of converting the source code switch variable states of the components is authorized in advance. After the identification information of the compiling requesting party corresponding to the compiling task is obtained, carrying out authority verification on the identification information, and verifying whether the current compiling requesting party has authority for carrying out source code switch variable state conversion on each second component.
S205: and when the authority verification is passed, converting the source code switch variable state corresponding to each second component from the closed state to the open state.
After the identity information of the compiling requesting party passes verification, the current compiling requesting party is indicated to have the authority of carrying out source code switch variable state conversion on each second component, and the source code switch variable state corresponding to each second component is converted from a closed state to an open state, so that preconditions are provided for the follow-up acquisition of source codes corresponding to each second component.
S206: and searching the source code paths corresponding to the first components and the second components respectively from the source code path catalogue.
S207: and acquiring target source codes corresponding to the first components and the second components respectively according to the source code paths.
S208: and compiling the first components and the second components based on the target source codes.
S209: and acquiring each third component of non-source code compilation corresponding to the compiling task.
The compiling task involves, in addition to the first and second components that need to be source coded, a third component that does not need to be source coded. And acquiring each third component of non-source code compilation corresponding to the compiling task.
S210: and searching the first aar packets corresponding to each third component from the aar code base.
A aar code base (such as a maven warehouse) is preset, aar packages corresponding to each component are stored in the aar code base, and corresponding relations between each component and each aar package are also stored in the aar code base. aar is a binary archive file corresponding to each component. After each third component of non-source code compilation corresponding to the compiling task is obtained, searching a first aar package corresponding to each third component from a aar code library.
In one embodiment of the present invention, the step S210 may include the steps of:
step one: acquiring a target compiling version corresponding to a compiling task;
Step two: and searching the first aar package of the target compiled version corresponding to each third component from the aar code base.
For convenience of description, the above two steps may be combined for explanation.
Each compilation task may have its own compilation properties, such as a compilation version. The aar code library stores aar packets of each version corresponding to each component. And obtaining a target compiling version corresponding to the compiling task, and searching a first aar package of the target compiling version corresponding to each third component from the aar code base.
S211: and respectively packaging the modified source codes of the first components and the second components according to the dependency relationship between the first components and the second components to obtain second aar packages.
After the first aar packages corresponding to the third components are found, the modified source codes of the first components and the second components are packaged according to the dependency relationship between the first components and the second components, so that the second aar packages are obtained.
In a specific embodiment of the present invention, the modified source codes of each first component and each second component are respectively packaged, and the method may include the following steps:
and respectively packaging the modified source codes of each first component and each second component according to the target compiled version.
After the target compiling version corresponding to the compiling task is obtained, the modified source codes of the first components and the second components are respectively packaged according to the target compiling version. Thereby ensuring consistency of each aar package version.
S212: a aar compilation operation is performed based on each first aar package and each second aar package.
After each second aar packet is obtained, aar compiling operation is performed based on each first aar packet and each second aar packet, so that full aar compiling is realized, and the compiling speed is greatly improved.
S213: and converting the source code switch variable states of the first components and the second components from an open state to a closed state.
After the modified source codes of the first components and the second components are respectively packed according to the target compiled version, the source code switch variable states of the first components and the second components are converted from an open state to a closed state. Therefore, the source codes of all the components are prevented from being illegally acquired, and the safety of the source codes of all the components is ensured.
S214: and searching a third aar package corresponding to each first component and each second component from the aar code base.
And after the modified source codes of the first components and the second components are respectively packed according to the target compiled version to obtain second aar packages, third aar packages corresponding to the first components and the second components are respectively searched from a aar code base.
In one embodiment of the present invention, step S214 may include the steps of:
and searching a third aar package of the target compiled version corresponding to each first component and each second component from the aar code base.
After the target compiled version corresponding to the compiling task is obtained, a third aar package of the target compiled version corresponding to each first component and each second component is searched from the aar code base.
S215: each third aar packet is replaced with each second aar packet.
After the modified source codes of the first components and the second components are respectively packed according to the target compiled versions to obtain second aar packages, third aar packages of the target compiled versions corresponding to the first components and the second components are searched from a aar code base, and the third aar packages are replaced by the second aar packages, so that third aar packages of the target compiled versions corresponding to the first components and the second components in the aar code base are updated. In addition, based on the current source code compiling process, the aar package of other versions (such as the latest version) corresponding to each first component and each second component in the aar code base can be updated.
Embodiment III:
Corresponding to the above method embodiment, the present invention further provides a component compiling apparatus, and the component compiling apparatus described below and the component compiling method described above may be referred to correspondingly to each other.
Referring to fig. 3, fig. 3 is a block diagram illustrating a component compiling apparatus according to an embodiment of the invention, the apparatus may include:
The source code compiling component obtaining module 31 is configured to parse the received compiling task to obtain each first component to be compiled by the source code;
The component determining module 32 is configured to obtain a preset inter-component dependency relationship, and determine each second component that depends on each first component according to the inter-component dependency relationship;
the path searching module 33 is configured to search source code paths corresponding to each first component and each second component from the source code path directory respectively;
the source code obtaining module 34 is configured to obtain target source codes corresponding to each first component and each second component according to each source code path;
the component compiling module 35 is configured to perform a compiling operation on each first component and each second component based on each target source code.
The component compiling device provided by the invention analyzes the received compiling task to obtain each first component to be compiled by the source code; acquiring a preset inter-component dependency relationship, and determining each second component depending on each first component according to the inter-component dependency relationship; searching source code paths corresponding to the first components and the second components respectively from a source code path catalog; acquiring target source codes corresponding to the first components and the second components respectively according to the source code paths; and compiling the first components and the second components based on the target source codes. And automatically screening each first component needing to be subjected to source code compiling, and selecting each second component on which each first component depends respectively, so that only the target source codes of each first component and each second component need to be loaded, and component compiling is performed according to each target source code. Compared with the existing full source code loading compiling scheme, the method and the device greatly improve the flexibility of configuration, shorten the source code loading and compiling time and improve the business iteration development efficiency.
In one embodiment of the present invention, the apparatus may further include:
The non-source code compiling component obtaining module is used for obtaining each third component of non-source code compiling corresponding to the compiling task after compiling the first components and the second components based on each target source code;
the first code packet searching module is used for searching first aar packets corresponding to each third component from aar code libraries;
The source code packaging module is used for respectively packaging the modified source codes of the first components and the second components according to the dependency relationship between the first components and the second components to obtain second aar packages;
And the code package compiling module is used for carrying out aar compiling operation based on each first aar package and each second aar package.
In one embodiment of the present invention, the apparatus may further include:
the second code packet searching module is used for searching a third aar packet corresponding to each first component and each second component from the aar code library after respectively packing the modified source codes of each first component and each second component to obtain each second aar packet;
and the code packet replacing module is used for replacing each third aar packet with each second aar packet.
In one embodiment of the present invention, the first code packet search module includes:
The compiling version obtaining sub-module is used for obtaining a target compiling version corresponding to the compiling task;
the code packet searching sub-module is used for searching a first aar packet of the target compiled version corresponding to each third component from the aar code library;
The source code packaging module is specifically a module for respectively packaging the modified source codes of each first component and each second component according to the target compiling edition;
the second code packet searching module is specifically a module for searching a third aar packet of the target compiled version corresponding to each first component and each second component from the aar code base.
In one embodiment of the present invention, the source code compiling component obtaining module 31 is specifically a module for obtaining each first component whose source code switch variable state corresponding to a compiling task is in an open state;
The apparatus further comprises:
The first switch variable conversion module is used for converting the source code switch variable state corresponding to each second component from the closed state to the open state after each second component depending on each first component is determined according to the dependency relationship among the components.
In one embodiment of the present invention, the apparatus may further include:
the second switch variable conversion module is used for converting the source code switch variable states of the first components and the second components from an open state to a closed state after compiling the first components and the second components based on the target source codes.
In one embodiment of the present invention, the apparatus may further include:
The identity acquisition module is used for acquiring identity information of a compiling requester corresponding to a compiling task before the source code switch variable state corresponding to each second component is converted from a closed state to an open state;
The permission verification module is used for performing permission verification on the identity information;
the first switch variable conversion module is specifically a module for converting the source code switch variable state corresponding to each second component from a closed state to an open state when the right verification is passed.
Embodiment four:
Corresponding to the above method embodiment, referring to fig. 4, fig. 4 is a schematic diagram of a component compiling apparatus according to the present invention, where the apparatus may include:
A memory 41 for storing a computer program;
The processor 42 is configured to execute the computer program stored in the memory 41, and implement the following steps:
Analyzing the received compiling task to obtain each first component to be compiled by the source code; acquiring a preset inter-component dependency relationship, and determining each second component depending on each first component according to the inter-component dependency relationship; searching source code paths corresponding to the first components and the second components respectively from a source code path catalog; acquiring target source codes corresponding to the first components and the second components respectively according to the source code paths; and compiling the first components and the second components based on the target source codes.
For the description of the apparatus provided by the present invention, please refer to the above method embodiment, and the description of the present invention is omitted herein.
Corresponding to the above method embodiments, the present invention also provides a computer readable storage medium having a computer program stored thereon, which when executed by a processor, performs the steps of:
Analyzing the received compiling task to obtain each first component to be compiled by the source code; acquiring a preset inter-component dependency relationship, and determining each second component depending on each first component according to the inter-component dependency relationship; searching source code paths corresponding to the first components and the second components respectively from a source code path catalog; acquiring target source codes corresponding to the first components and the second components respectively according to the source code paths; and compiling the first components and the second components based on the target source codes.
The computer readable storage medium may include: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
For the description of the computer-readable storage medium provided by the present invention, refer to the above method embodiments, and the disclosure is not repeated here.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, so that the same or similar parts between the embodiments are referred to each other. The apparatus, device and computer readable storage medium of the embodiments are described more simply because they correspond to the methods of the embodiments, and the description thereof will be given with reference to the method section.
The principles and embodiments of the present invention have been described herein with reference to specific examples, but the description of the examples above is only for aiding in understanding the technical solution of the present invention and its core ideas. It should be noted that it will be apparent to those skilled in the art that various modifications and adaptations of the invention can be made without departing from the principles of the invention and these modifications and adaptations are intended to be within the scope of the invention as defined in the following claims.

Claims (8)

1. A method of compiling a component, comprising:
Acquiring each first component of which the source code switch variable state is in an open state and corresponding to a compiling task;
acquiring a preset inter-component dependency relationship, and determining each second component depending on each first component according to the inter-component dependency relationship;
Converting the state of the source code switch variable corresponding to each second component from a closed state to an open state;
searching source code paths corresponding to the first components and the second components respectively from a source code path catalog;
Acquiring target source codes respectively corresponding to the first components and the second components according to the source code paths;
Compiling each first component and each second component based on each target source code;
and converting the source code switch variable states of the first components and the second components from the open states to the closed states.
2. The component compiling method according to claim 1, further comprising, after compiling each of the first components and each of the second components based on each of the target source codes:
Acquiring each third component of non-source code compilation corresponding to the compiling task;
searching a first aar packet corresponding to each third component from a aar code base;
according to the dependency relationship between each first component and each second component, the modified source codes of each first component and each second component are respectively packaged to obtain each second aar package;
a aar compilation operation is performed based on each of the first aar packages and each of the second aar packages.
3. The component compiling method of claim 2, wherein after packaging the modified source code of each of the first component and each of the second component, respectively, obtaining each second aar package, further comprises:
Searching a third aar package corresponding to each first component and each second component from the aar code base;
each of the third aar packets is replaced with each of the second aar packets.
4. A method of compiling components according to claim 3, wherein searching for a first aar package corresponding to each of the third components from a aar code base, comprises:
Acquiring a target compiling version corresponding to the compiling task;
Searching a first aar package of the target compiled version corresponding to each third component from the aar code base;
packaging the modified source codes of the first component and the second component respectively, including:
respectively packaging the modified source codes of the first components and the second components according to the target compiled version;
Searching a third aar package corresponding to each first component and each second component from aar code base, including:
And searching a third aar package of the target compiled version corresponding to each first component and each second component from the aar code base.
5. The component compiling method of claim 1, further comprising, before converting a source code switch variable state corresponding to each of the second components from an off state to an on state:
Acquiring the identity information of a compiling requester corresponding to the compiling task;
Performing authority verification on the identity information;
And when the authority verification is passed, executing the step of converting the source code switch variable state corresponding to each second component from the closed state to the open state.
6. A component compiling apparatus, comprising:
the source code compiling component obtaining module is used for obtaining each first component of which the source code switch variable state corresponding to the compiling task is in an open state;
The component determining module is used for acquiring a preset inter-component dependency relationship and determining each second component depending on each first component according to the inter-component dependency relationship;
The first switch variable conversion module is used for converting the source code switch variable state corresponding to each second component from a closed state to an open state;
the path searching module is used for searching the source code paths corresponding to the first components and the second components respectively from the source code path catalog;
The source code acquisition module is used for acquiring target source codes respectively corresponding to the first components and the second components according to the source code paths;
the assembly compiling module is used for compiling the first assemblies and the second assemblies based on the target source codes;
and the second switch variable conversion module is used for converting the source code switch variable state of each first component and each second component from the open state to the closed state.
7. A component compiling apparatus, comprising:
a memory for storing a computer program;
A processor for implementing the steps of the component compiling method according to any one of claims 1 to 5 when executing the computer program.
8. A computer readable storage medium, characterized in that it has stored thereon a computer program which, when executed by a processor, implements the steps of the component compilation method according to any of claims 1 to 5.
CN202110189155.4A 2021-02-19 2021-02-19 Component compiling method, device, equipment and computer readable storage medium Active CN112965720B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110189155.4A CN112965720B (en) 2021-02-19 2021-02-19 Component compiling method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110189155.4A CN112965720B (en) 2021-02-19 2021-02-19 Component compiling method, device, equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN112965720A CN112965720A (en) 2021-06-15
CN112965720B true CN112965720B (en) 2024-06-18

Family

ID=76285071

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110189155.4A Active CN112965720B (en) 2021-02-19 2021-02-19 Component compiling method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN112965720B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114020693B (en) * 2021-10-19 2022-07-08 北京五八信息技术有限公司 Header file address acquisition method and device, electronic equipment and storage medium
CN113986239A (en) * 2021-10-22 2022-01-28 烽火通信科技股份有限公司 Distributed compiling method, device, equipment and readable storage medium
CN114528007A (en) * 2021-12-31 2022-05-24 北京达佳互联信息技术有限公司 Component processing method and device, electronic equipment and storage medium
CN114924788B (en) * 2022-07-20 2022-12-27 北京达佳互联信息技术有限公司 Code synchronization method and device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103870310A (en) * 2014-02-18 2014-06-18 小米科技有限责任公司 Program compilation method and relevant device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107908403A (en) * 2017-11-10 2018-04-13 北京搜狐新动力信息技术有限公司 A kind of collocation method and system of the modularization of mobile terminal business module
CN110321131B (en) * 2019-07-05 2022-11-08 北京百佑科技有限公司 Service component packaging method, system and server
CN111459499A (en) * 2020-04-20 2020-07-28 网易(杭州)网络有限公司 Program compiling method and device, computer storage medium and electronic equipment

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103870310A (en) * 2014-02-18 2014-06-18 小米科技有限责任公司 Program compilation method and relevant device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于Android软件开发组件化研究;殷涛 等;计算机应用与软件;第36卷(第9期);第18-19页 *

Also Published As

Publication number Publication date
CN112965720A (en) 2021-06-15

Similar Documents

Publication Publication Date Title
CN112965720B (en) Component compiling method, device, equipment and computer readable storage medium
CN110083360B (en) Compiling method, device, equipment and storage medium of application program code
CN109032631B (en) Application program patch package obtaining method and device, computer equipment and storage medium
US5960197A (en) Compiler dispatch function for object-oriented C
CN108614702B (en) Byte code optimization method and device
US10133871B1 (en) Method and system for identifying functional attributes that change the intended operation of a compiled binary extracted from a target system
CN111967017A (en) Method and device for generating dependency relationship, terminal equipment and storage medium
CN111309335A (en) Plug-in application compiling method and device and computer readable storage medium
CN109491661B (en) Universal cross-compiling method and device
CN112612502A (en) Patch generation method, device, equipment and storage medium
CN110543427A (en) Test case storage method and device, electronic equipment and storage medium
CN114968807A (en) Code detection method and device, electronic equipment and readable storage medium
CN114138281A (en) Compiling method, device, equipment and medium of software engineering
CN111124480A (en) Application package generation method and device, electronic equipment and storage medium
US9116714B2 (en) Methods and systems for file processing
CN111782239A (en) Software packaging and source code version information acquisition method, device and storage medium
WO2020215072A1 (en) Source modification engine
CN107463423B (en) Verification method, storage medium, electronic device and system depending on package tool
CN115098158A (en) SDK packaging method and device, computer equipment and storage medium
CN113094664B (en) System for preventing android application program from being decompiled
CN114706586A (en) Code compiling method, code running method, code compiling device, code running device, computer equipment and storage medium
CN113126998A (en) Incremental source code acquisition method and device, electronic equipment and storage medium
CN112953721A (en) IPA file analysis method, device, equipment and storage medium
CN116661779B (en) Multi-compiler hybrid link method based on symbol dynamic redirection
CN116774988B (en) Method and device for releasing frame package mode symbol dependence

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant