A method and system for automatically compiling and packaging dynamically integrated business packages

By using Docker containerization technology and Bash scripts in the uni-app framework, a solution to locally generate APK files is implemented, which solves the limitations of the uni-app framework in the automated construction process, improves development efficiency and construction cycle, and enhances flexibility and security.

CN119311282BActive Publication Date: 2025-03-18GUANGZHOU SIE CONSULTING CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411864478.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2025-03-18
Estimated Expiration
2044-12-18

AI Technical Summary

Technical Problem

The uni-app framework has limitations in the automated construction process, especially when generating APK files for the Android platform, developers rely on cloud packaging services, resulting in low work efficiency when there is no Internet connection or requires rapid iteration, cloud packaging services are time-consuming and become a bottleneck for development environments that are frequently packaged and tested.

Method used

Create a mirror container for the development environment through Docker containerization technology, edit Bash scripts and define functional parameters, call Gradlew scripts to execute packaging instructions, generate APK files, and support local packaging to generate APK files.

Benefits of technology

It realizes seamless transformation from source code to APK in the local environment, significantly improves development efficiency, optimizes application construction and release cycles, reduces dependence on the network, avoids queueing in the cloud, supports agile development practices, and improves packaging flexibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119311282B_ABST
    Figure CN119311282B_ABST
Patent Text Reader

Abstract

The present invention proposes an automatic compilation and packaging method and system for dynamically integrating business packages, and the method includes: obtaining compilation data, including environment configuration data and function configuration data; creating a mirror container of a development environment according to the environment configuration data based on Docker containerization technology; editing a Bash script in the mirror container according to the function configuration data and defining the function parameters of the Bash script; executing the Bash script and calling the npm command to install a scaffolding tool, and generating a uni-app project according to the function parameters based on the scaffolding tool; packaging resources for the uni-app project based on the Android packaging service provided by the uni-app project, obtaining an Android application resource file and storing it in an Android packaging template; adjusting the Gradle environment path in the Android packaging template, the SDK path in the Android packaging template, and the configuration information in the Android packaging template according to the function parameters; and calling the Gradlew script through the Bash script to execute the packaging instruction to generate an APK file when a packaging request is received. The present invention realizes packaging in the local environment and improves development efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of mobile application development, and in particular to an automatic compilation and packaging method and system for dynamically integrating business packages. Background Art

[0002] In the current field of mobile application development, the uni-app framework, as a cross-platform solution, allows developers to build multi-platform applications using a single code base. However, although uni-app provides convenient development and multi-platform adaptation capabilities, it has limitations in terms of automated build processes, especially when packaging applications as APK files for the Android platform. Developers usually rely on cloud packaging services to convert application code into APK files for deployment and testing on Android devices. uni-app currently does not support generating APK files directly locally, which limits the efficiency of developers when there is no Internet connection or when rapid iteration is required. The cloud packaging service not only depends on the network status, but may also become time-consuming due to queuing for cloud services. In addition, for some development environments that require frequent packaging and testing, the limitations of cloud packaging may also become a bottleneck for development. Summary of the invention

[0003] The embodiment of the present invention provides a method and system for automatically compiling and packaging a dynamic integrated service package to solve the problems existing in the related technologies. The technical solution is as follows:

[0004] In a first aspect, an embodiment of the present invention provides a method for automatically compiling and packaging a dynamically integrated service package, comprising:

[0005] Obtaining compilation data, which includes environment configuration data and function configuration data;

[0006] Create a mirror container of the development environment based on the environment configuration data based on Docker containerization technology;

[0007] Edit the Bash script in the image container according to the function configuration data and define the function parameters of the Bash script;

[0008] Execute the Bash script and call the npm command in the Bash script to install the scaffolding tool, and generate the uni-app project based on the scaffolding tool and the function parameters;

[0009] Based on the Android packaging service provided by the uni-app project, the uni-app project resources are packaged, the Android application resource files are obtained and stored in the Android packaging template;

[0010] Adjust the Gradle environment path in the Android packaging template, the SDK path in the Android packaging template, and the configuration information in the Android packaging template according to the function parameters;

[0011] When a packaging request is received, the Gradlew script is called through the Bash script to execute the packaging instruction. The packaging instruction performs the application packaging operation according to the Android packaging template to generate the corresponding APK file.

[0012] In one implementation, the function parameters include compilation environment, template type, service package combination ID, application ID, application name, Android package name, version name, version code, site name, signature certificate path, and signature key.

[0013] In one embodiment, generating a uni-app project based on a scaffolding tool according to functional parameters includes:

[0014] The project template is dynamically generated according to the function parameters defined by the Bash script through the scaffolding tool, so that the project template automatically introduces the dependent files according to the business package combination ID in the function parameters;

[0015] Generate a uni-app project based on the uni-app framework and dependent files.

[0016] In one embodiment, generating a uni-app project based on the functional parameters based on the scaffolding tool further includes:

[0017] Modify the environment variables in the uni-app project according to the compilation environment in the function parameters;

[0018] Use the script commands provided in the project template to install the dependencies of the uni-app project according to the dependency files.

[0019] In one implementation, the configuration information includes an application ID, an application name, an Android package name, a version name, a version code, a signature certificate path, and a signature key.

[0020] In one embodiment, it further includes:

[0021] Store the Bash script in the server to wait for the client to call;

[0022] When the client initiates a packaging request, the client calls the Bash script from the server through the API to interact and trigger to generate an APK file.

[0023] In one embodiment, it further includes:

[0024] Adjust the application icon, startup page image, and message push icon in the Android packaging template according to the functional parameters so that the application icon, startup page image, and message push icon are displayed when the APK file is run.

[0025] In a second aspect, an embodiment of the present invention provides an automatic compilation and packaging system for a dynamically integrated service package, which executes the automatic compilation and packaging method for a dynamically integrated service package as described above.

[0026] In a third aspect, an embodiment of the present invention provides an electronic device, the device comprising: a memory and a processor. The memory and the processor communicate with each other through an internal connection path, the memory is used to store instructions, the processor is used to execute the instructions stored in the memory, and when the processor executes the instructions stored in the memory, the processor executes the method in any one of the above-mentioned embodiments.

[0027] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, which stores a computer program. When the computer program runs on a computer, the method in any one of the above-mentioned embodiments is executed.

[0028] The advantages or beneficial effects of the above technical solution include at least:

[0029] The present invention provides a solution that can support uni-app local packaging to generate APK files. The solution realizes the production and configuration of Android packaging templates by editing Bash scripts. The Gradlew script in the Android packaging template is called by the Bash script to execute the packaging command and generate the corresponding APK file, so as to support developers to realize seamless conversion from source code to APK in a local offline environment, significantly improve development efficiency and optimize the entire application construction and release cycle.

[0030] The above summary is for illustrative purposes only and is not intended to be limiting in any way. In addition to the illustrative aspects, embodiments and features described above, further aspects, embodiments and features of the present invention will be readily apparent by reference to the accompanying drawings and the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In the accompanying drawings, unless otherwise specified, the same reference numerals throughout the multiple drawings represent the same or similar parts or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings only depict some embodiments disclosed in the present invention and should not be regarded as limiting the scope of the present invention.

[0032] Figure 1 A schematic diagram of the process of the automatic compilation and packaging method for dynamically integrating business packages of the present invention;

[0033] Figure 2 A schematic diagram of the interaction between the client and the server of the present invention;

[0034] Figure 3 The structure block diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0035] In the following, only some exemplary embodiments are briefly described. As those skilled in the art will appreciate, the described embodiments may be modified in various ways without departing from the spirit or scope of the present invention. Therefore, the drawings and descriptions are considered to be exemplary and non-restrictive in nature.

[0036] In the current field of mobile application development, the uni-app framework, as a cross-platform solution, allows developers to build multi-platform applications using a single code base. However, although uni-app provides convenient development and multi-platform adaptation capabilities, it has limitations in terms of automated build processes, especially when packaging applications as APK files for the Android platform. Developers usually rely on cloud packaging services to convert application code into APK files for deployment and testing on Android devices. uni-app currently does not support generating APK files directly locally, which limits the efficiency of developers when there is no Internet connection or when rapid iteration is required. The cloud packaging service not only depends on the network status, but may also become time-consuming due to queuing for cloud services. In addition, for some development environments that require frequent packaging and testing, the limitations of cloud packaging may also become a bottleneck for development.

[0037] In order to solve the above problems, an embodiment of the present invention provides an automatic compilation and packaging method for dynamically integrated business packages. The method develops an automated tool that can directly generate APK files locally from uni-app projects, significantly improving development efficiency and optimizing the entire application construction and release cycle.

[0038] like Figure 1 As shown, the automatic compilation and packaging method of the dynamic integration business package specifically includes the following steps:

[0039] Step S1: Obtain compilation data, which includes environment configuration data and function configuration data; create a mirror container of the development environment according to the environment configuration data based on Docker containerization technology, and edit a Bash script in the mirror container according to the function configuration data and define function parameters of the Bash script.

[0040] It should be noted that the environment configuration data entered by the user is used for JDK environment installation and configuration, Android SDK configuration, Gradle environment construction, Node environment installation, image building, etc. Users need to enter the corresponding environment configuration data according to specific development and construction requirements in order to correctly configure the development environment and build process.

[0041] Specifically, for JDK environment installation and configuration, users need to specify the appropriate Java Development Kit (JDK) version, set the path to the Java installation directory, and set the value of the JAVA_HOME environment variable to point to the JDK installation directory, providing a running environment for Android application development and allowing developers to write, compile, and run Java programs.

[0042] For Android SDK configuration, users need to install and configure the Android Software Development Kit (SDK components), including SDK tools, platform tools platforms and build tools build-tools, etc., which allow developers to test and debug Android applications and ensure the compatibility of applications on different devices and Android versions.

[0043] For Gradle environment building, it is used to configure the Gradle build system or specify the Gradle version to be used, manage project dependencies, ensure that all necessary libraries and modules are correctly introduced, and provide flexible build scripts, allowing developers to customize build logic and processes.

[0044] For Node environment installation, users need to specify the corresponding Node.js version to install the Node environment, provide npm or yarn command line tools, support the use of npm (Node Package Manager) to manage JavaScript libraries and tools, and facilitate developers to install and use various dependencies; in uni-app development, the Node environment is used to build and package applications, and provides a development server and hot reload functions.

[0045] For build image creation, users need to use containerization technologies such as Docker to create images that include all development environments to ensure build consistency and compatibility in different environments. This embodiment uses Docker containerization technology to achieve consistency between development, testing, and production environments. By creating a lightweight, portable container image that includes the application and all its dependencies, it ensures configuration consistency and reliability across environments, eliminates compatibility issues caused by environmental differences, simplifies multi-environment deployment and management, and improves the flexibility and efficiency of software deployment, ensuring consistent behavior and performance of applications in different environments.

[0046] After completing the environment configuration preparation, write a Bash script in the container instantiated based on the Docker image and define the required functional parameters; the functional parameters include the compilation environment, template type, business package combination ID, application ID, application name, Android package name, version name, version code, site name, signature certificate path, and signature key.

[0047] It should be explained that the compilation environment is generally a "production environment". You can select the corresponding environment based on business needs. For example, when developing functions, you can select a "development environment" to facilitate testing.

[0048] Template type: You can choose different project templates according to project requirements. The project templates here represent different products. Each type of product has a basic template, which is a base for code development. The template mainly contains basic functions, such as login, user information, configuration information, commonly used tool method packages and logs. Based on this template, you can quickly develop functions.

[0049] Business package combination ID: generated according to the dynamically selected business package functions. Through this ID, you can obtain which business functions will be included in the automatically generated function template.

[0050] Application ID: It is the unique identifier of the uni-app application and represents this APP in the DCloud platform.

[0051] Application name: It is the name of the application generated by the APP, that is, the name of the application displayed on the device after installation.

[0052] Android package name: It is the unique identifier of the Android application in the app store. It follows the Java package naming convention and usually uses the reverse domain name naming method.

[0053] Version name: This is the visible version number of the Android application, which will be displayed in the app store to help users understand the version they are using.

[0054] Version code: Mainly used to identify the order of different versions, and is also the basis for app store updates

[0055] Site name: It is the http path of the network request, combined with the third parameter business combination ID, to achieve the dynamic business package combination pulled from the online.

[0056] Signature certificate path: is the signature certificate path used for Android packaging.

[0057] Signature key: used to verify the compliance of the certificate.

[0058] Step S2: execute the Bash script and call the npm command in the Bash script to globally install a scaffolding tool, and generate a uni-app project based on the scaffolding tool according to the functional parameters.

[0059] It should be noted that a scaffold is a template or framework that can help developers quickly start a new project. It usually contains the basic structure of the project, preset configuration files and code templates, allowing developers to quickly develop on this basis.

[0060] By executing the npm command in a Bash script, you can automate the installation process of the scaffolding. This means that every time you run the script, it will check whether the required scaffolding is already installed, and if not, it will be installed automatically.

[0061] After installing the scaffolding, the Bash script can continue to use the commands provided by the scaffolding to generate project templates. For example, the scaffolding provides a command <scaffold-name>create <project-name>, used to create a new project template.

[0062] If the Bash script defines parameters, these parameters can be used to customize the generated template. For example, you can select different templates, configure different project settings, or introduce specific dependencies based on the parameters.

[0063] In this embodiment, a project template is dynamically generated through a scaffolding tool according to the function parameters defined by the Bash script. The project template automatically introduces dependency files according to the business package combination ID in the function parameters, and modifies the environment variables in the uni-app project according to the compilation environment in the function parameters. The script commands provided in the project template are used to install the uni-app project according to the dependency files, thereby generating a customized uni-app project based on the uni-app framework, business combination ID, compilation environment, dependency files, etc.

[0064] The resulting uni-app project will fully conform to specific business requirements and environment configurations; this means that each generated project is customized to meet specific functional and non-functional requirements such as performance, security, and maintainability.

[0065] Step S3: Based on the Android packaging service provided by the uni-app project, the uni-app project is packaged with resources to obtain Android application resource files and store them in the Android packaging template.

[0066] After the project dependencies are installed, use the script commands provided in the project template to package the entire project. During the packaging process, resource files required for the Android application will be generated, including compiled JavaScript code, style files, image resources, configuration files, etc. These files will be converted into a format that the Android platform can understand and packaged into an APK file.

[0067] At the same time, the resource files generated by packaging are placed into the Android packaging template according to the directory structure and rules of the Android application.

[0068] It should be noted that the Android packaging template is based on the Android packaging project provided by uni-app. The Android packaging template refers to a predefined directory structure and configuration that guides the packaging tool on how to build an APK. Putting the packaged resource files into the Android packaging template means organizing the files according to the build standards of the Android project so that the final APK file can be generated using Android Studio, Gradle, or other build tools.

[0069] Step S4: adjusting the Gradle environment path in the Android packaging template, the SDK path in the Android packaging template, and the configuration information in the Android packaging template according to the functional parameters.

[0070] This embodiment puts the packaged resource files into the Android packaging template and adjusts the Gradle environment path and SDK path.

[0071] Specifically, adjusting the Gradle environment path involves modifying the location of the Gradle user directory. That is, by setting the environment variable GRADLE_USER_HOME, you can change the location of Gradle's cache and configuration files, thereby setting Gradle's cache and working directory on a faster storage device, thereby increasing the build speed. You can also centrally manage Gradle configuration and cache, making it easier to maintain and upgrade Gradle versions.

[0072] The SDK path refers to the specific location where the SDK is installed on the computer, that is, the file system path. In this embodiment, adjusting the SDK path refers to modifying the installation path of the Android SDK to ensure that the correct Android SDK tools and libraries are used.

[0073] At the same time, according to the function parameters, the configuration information in the Android packaging template is modified through the sed command, and the placeholders or default configurations in the Android packaging template are automatically replaced, making the construction process more efficient, reducing manual intervention and reducing the error rate. Specifically, the configuration information modification mainly includes seven parameter configurations, namely application ID, application name, Android package name, version name, version code, signature certificate path, and signature key.

[0074] Furthermore, the application icon, startup page image and message push icon in the Android packaging template can also be adjusted according to the functional parameters, so that the user will see the customized display application icon when installing the APK file, the startup image displayed when the application starts will be the customized startup page image, and the icon displayed in the push notification will be the customized message push icon.

[0075] Step S5: When a packaging request is received, the Gradlew script is called through the Bash script to execute the packaging instruction. The packaging instruction is to perform the application packaging operation according to the Android packaging template to generate a corresponding APK file.

[0076] It should be noted that Gradlew is a command line tool provided by Gradle for executing Gradle build tasks. In Android projects, it is used to compile projects, run tests, package applications, etc. The packaging command refers to a task in Gradle that packages an APK file for a release version according to the configuration.

[0077] This embodiment triggers the Gradle packaging process through a Bash script and finally generates an APK file.

[0078] In order to improve the convenience of packaging services, the Bash script can be stored in the server and wait for the client to call it. The client can interact with the Bash script through the API; Figure 2 As shown, the user can check the required business function packages on the client and when the client initiates a packaging request, the client calls the Bash script from the server through the API to trigger automatic APK generation.

[0079] After packaging is completed, configure the automated distribution process and upload the tested APK files to the specified server for further deployment and user downloads.

[0080] The beneficial effects of this embodiment are as follows:

[0081] 1. Reduce dependence on the network: By packaging in the local environment, the risk of build failure due to network instability or connection problems is reduced, and the reliability of the build process is improved.

[0082] 2. Eliminate queuing in the cloud: Local packaging avoids queuing during peak hours of cloud packaging services, making the build process faster and more predictable, and improving development efficiency.

[0083] 3. Support agile development practices: The fast local packaging process supports the short iteration cycle in agile development, improves the overall development and release efficiency, enables the team to quickly respond to changes in requirements, and accelerates the verification and release of product functions.

[0084] 4. Improve packaging flexibility: Local packaging allows developers to package at any time as needed, rather than being restricted by the availability and limitations of cloud services, increasing the flexibility of development and release.

[0085] 5. Enhanced security: Packaging in a local environment can better control the packaging process, reduce security risks during data transmission, and facilitate the implementation and compliance of local security policies and compliance requirements.

[0086] In addition, local packaging allows teams to customize build scripts and processes according to their specific needs, including specific optimizations and resource processing to meet the specific performance and functional requirements of the application. For example, when you need to persist logs and generate files, you can adjust the build scripts to achieve file persistence.

[0087] Another embodiment of the present invention provides an automatic compilation and packaging system for a dynamically integrated service package, which executes the automatic compilation and packaging method for a dynamically integrated service package as described above.

[0088] The functions of each module in the system of the embodiment of the present invention can refer to the corresponding description in the above method, which will not be repeated here.

[0089] Another embodiment of the present invention provides an electronic device, Figure 3 FIG. 2 shows a structural block diagram of an electronic device according to an embodiment of the present invention. Figure 3 As shown, the electronic device includes: a memory 100 and a processor 200, wherein the memory 100 stores a computer program that can be run on the processor 200. When the processor 200 executes the computer program, the automatic compilation and packaging method of the dynamic integration service package in the above embodiment is implemented. The number of the memory 100 and the processor 200 can be one or more.

[0090] The electronic device also includes:

[0091] The communication interface 300 is used to communicate with external devices and perform data exchange transmission.

[0092] If the memory 100, the processor 200 and the communication interface 300 are implemented independently, the memory 100, the processor 200 and the communication interface 300 can be connected to each other through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc.

[0093] Optionally, in a specific implementation, if the memory 100, the processor 200 and the communication interface 300 are integrated on a chip, the memory 100, the processor 200 and the communication interface 300 can communicate with each other through an internal interface.

[0094] An embodiment of the present invention provides a computer-readable storage medium storing a computer program, which implements the method provided in the embodiment of the present invention when the program is executed by a processor.

[0095] An embodiment of the present invention further provides a chip, which includes a processor for calling and executing instructions stored in the memory from the memory, so that a communication device equipped with the chip executes the method provided by the embodiment of the present invention.

[0096] An embodiment of the present invention also provides a chip, including: an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected via an internal connection path, and the processor is used to execute the code in the memory. When the code is executed, the processor is used to execute the method provided by the embodiment of the invention.

[0097] It should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. It is worth noting that the processor may be a processor supporting the advanced RISC machines (ARM) architecture.

[0098] Further, optionally, the above-mentioned memory may include a read-only memory and a random access memory, and may also include a non-volatile random access memory. The memory may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may include a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may include a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available. For example, static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct rambus RAM (DR RAM).

[0099] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.

[0100] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification and the features of different embodiments or examples, unless they are contradictory.

[0101] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, "plurality" means two or more, unless otherwise clearly and specifically defined.

[0102] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of various changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A method for automatically compiling and packaging a dynamically integrated business package, characterized in that: include: Acquire compilation data, wherein the compilation data includes environment configuration data and function configuration data; Creating a mirror container of the development environment according to the environment configuration data based on Docker containerization technology; In the image container, a Bash script is edited according to the functional configuration data and functional parameters of the Bash script are defined, wherein the functional parameters include a compilation environment, a template type, a business package combination ID, an application ID, an application name, an Android package name, a version name, a version code, a site name, a signature certificate path, and a signature key; wherein the compilation environment is a corresponding environment selected according to business requirements; the template type is a corresponding engineering template selected according to project requirements; the business package combination ID is generated according to the dynamically selected business package function; the site name is an http path of a network request, and is combined with the business package combination ID to jointly realize the pulling of dynamic business package combinations from online; Execute the Bash script and call the npm command in the Bash script to install the scaffolding tool, and generate the uni-app project according to the functional parameters based on the scaffolding tool, wherein the method is as follows: dynamically generate a project template according to the functional parameters defined by the Bash script through the scaffolding tool, the project template will automatically introduce the dependency file according to the business package combination ID in the functional parameters, and modify the environment variables in the uni-app project according to the compilation environment in the functional parameters, and use the script command provided in the project template to install the uni-app project according to the dependency file, so as to generate the uni-app project based on the uni-app framework, business combination ID, compilation environment, and dependency file customization, so that the finally generated uni-app project will fully meet the specific business requirements and environment configuration; Based on the Android packaging service provided by the uni-app project, the uni-app project is packaged with resources to obtain Android application resource files and store them in the Android packaging template; the Android application resource files include compiled JavaScript code, style files, image resources, and configuration files; at the same time, the packaged Android application resource files are placed in the Android packaging template according to the directory structure and rules of the Android application; wherein the Android packaging template is made based on the Android packaging project provided by uni-app, and the Android packaging template refers to a predefined directory structure and configuration for guiding the packaging tool to build APK; placing the packaged Android application resource files in the Android packaging template means organizing the files according to the building standards of the Android project so that the final APK file can be generated using the building tool; Adjust the Gradle environment path in the Android packaging template, the SDK path in the Android packaging template, and the configuration information in the Android packaging template according to the function parameters; When a packaging request is received, the Gradlew script is called by the Bash script to execute a packaging instruction, and the packaging instruction performs an application packaging operation according to the Android packaging template to generate a corresponding APK file.

2. The automatic compilation and packaging method of the dynamic integration service package according to claim 1 is characterized in that: The configuration information includes application ID, application name, Android package name, version name, version code, signature certificate path and signature key.

3. The automatic compilation and packaging method of the dynamic integration service package according to claim 1 is characterized in that: Also includes: Store the Bash script in the server to wait for the client to call; When the client initiates the packaging request, the client calls a Bash script from the server through an API to perform interactive triggering to generate the APK file.

4. The automatic compilation and packaging method of the dynamic integration service package according to claim 1 is characterized in that: Also includes: The application icon, the startup page image and the message push icon in the Android packaging template are adjusted according to the functional parameters so that the application icon, the startup page image and the message push icon are displayed when the APK file is run.

5. An automatic compilation and packaging system for dynamically integrating business packages, characterized in that: Execute the automatic compilation and packaging method of the dynamic integration service package as described in any one of claims 1 to 4.

6. An electronic device, characterized in that: include: A processor and a memory, wherein the memory stores instructions, and the instructions are loaded and executed by the processor to implement the automatic compilation and packaging method of the dynamic integration service package as described in any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for automatically compiling and packaging a dynamic integration service package according to any one of claims 1 to 4 is implemented.