☁️Huawei Cloud Building Android Project with CodeArts Service

Hatice Duyar Keskin
Huawei Developers
Published in
7 min readMar 20, 2024

--

Apk

Introduction

Hello Everyone!

Today, we will create the Apk for testing with Codearts and run this apk on our Android devices.

Enjoyable reading 😊

What Is CodeArts?

CodeArts is a one-stop platform that provides out-of-the-box cloud services for requirement delivery, code commit, check, build, verification, deployment, and release throughout the entire software lifecycle.

Architecture

CodeArts consists of the following services:

· CodeArts Req: Provides agile development teams with easy and efficient coordination services, including multi-project management, agile iteration management, Kanban collaboration, requirement management, defect tracing, document management, online Wiki, and statistics reports.

· CodeArts Repo: Provides Git-based distributed code management and collaborative development capabilities, including member management, permission control, code hosting, code check, code review, code tracing, and continuous integration. It helps enterprises of different scales improve R&D quality and efficiency.

· CodeArts Pipeline: A pipeline service that enables you to visualize and customize your delivery, improving delivery efficiency and quality.

· CodeArts Check: Makes it easy to easily perform static checks and security checks on code in multiple programming languages and obtain comprehensive quality reports. It also allows you to view grouped defects with fix suggestions provided, effectively controlling quality and helping achieve success.

· CodeArts Build: An easy-to-configure platform that supports multi-language parallel builds on the cloud. Its distributed acceleration helps enterprises improve build efficiency while lowering overall costs even at large scale.

· CodeArts Deploy: Supports deployment in hosts and containers by using multiple languages and technology stacks, including Tomcat and Spring Boot. The plug-in encapsulation and orchestration of deployment functions help you quickly and efficiently release software.

· CodeArts TestPlan: Covers the entire process of test plan, test design, test cases, test execution, and test evaluation, and aims to help enterprises with collaborative, efficient, and trustworthy test activities before product release.

· CodeArts Artifact: Manages source code build products, including Maven and npm. It can seamlessly interconnect with local build tools and on-cloud CI/CD so that you can manage software package lifecycle to improve release quality and efficiency. CodeArts Artifact provides artifact package version management, fine-grained permission control, and other important functions.

CodeArts Architecture

How do I compile my Android mobile application using Codearts?

Codearts builds Android applications and outputs an APK file that allows us to test our application on Android devices.

An APK (Android Package Kit) is the file format for applications used on Android devices. After creating the required application one must compile it in APK format to upload it on Google Play. There are two methods through which APK files for an application are generated.

First are the debug APK files that are generated only for testing purposes. They will run on your Android device. However, they cannot be uploaded to Google Play Store or made available to the public. But these APK files can also be personally distributed to other Android users for installation on their devices. Android users can grant permission to their devices to install unknown apps if they want to access APK files from another source and install them directly.

Second, are the signed APK files that come in handy when the application has already been tested and is ready to be uploaded on the Google Play Store and released to the public. The signed APK is secured by a KeyStore credential made by the developer and includes a password for security purposes.

Today, we will create the Apk for testing with Codearts and run this apk on our Android devices. While doing this, we will first use the template repo within Codearts, which allows us to make a quick sample. Later, we will learn how to build our projects on different platforms (such as GitHub).

Before creating our build tasks, we create our projects and repos in the Codearts environment.

Note: Before performing these operations, it is assumed that your Huawei Cloud account has been created and the Codearts Basic Edition package has been activated. You can review this article for details of this process.

Creating Project On Huawei Cloud Codearts Service

Select Codearts Service from the Service list on the Huawei Cloud console.

Console

Click the “Access Service” button.

Codearts Page

Click the “Home Page” and “Create Project” buttons.

Create Project

Select Template (for example Scrum).

All Templates

Enter “Project Name” for Scrum Project.

Scrum Template

Check the Project Name.

Created Project

Creating Template Repo And Build Task On Huawei Cloud Codearts Service

Click Services-Repo.

Services-Repo

Click the “New Repository” button.

New Repository

Select the repo type as a Template, Project created Project then click the “Next” button.

Repo Template

Click “Android Gradle Project” then click the “Next” button.

Android Gradle Demo

Enter Repo name.

Repo Name

Check the template repo.

Android Template Repo

Click Services-Build then click the “Create Build Task” button.

Create Build Task

Enter the Task name, select project and repo then click the “Next” button.

Select Repo

Select Builder as an “Android APK” then click the “Next” button.

Select Builder Type

Check builder options and click the “Create and Run” button.

Android Builder Fields

Check the Build Page.

Build Page

Check the build process and build package.

Build Package

Download This APK Package for your Android Mobile phone.

Download APK

Run this apk on an Android Mobile Phone.

Project ScreenShot on Android Mobile Phone

Creating Github Repo And Build Task On Huawei Cloud Codearts Service

Click Services-Repo.

Repo

Click the “New Repository” button.

New Repository

Select the repo type as “Import”, Project created Project then click the “Next” button.

Repo Import

Copy the Github Project link and paste the Git Repo Url fields then click the “Next” button.

Github Repo Link
Import Github Project Link

Enter Repo Name.

Repo Name

Check Github Repo.

Android Github Import Repo

Click Services-Build then click the “Create Build Task” button.

Create Build Task

Enter the Task name, select project and repo then click the “Next” button.

Select Repo

Note: A GitHub project can be built by creating a repo link with the GitHub project option, by proceeding directly from the step of creating a build task without creating a repository.

Select Builder as an “Android APK” then click the “Next” button.

Android Builder Type

Check builder options and click the “Create and Run” button.

Android Builder Fields

Check the Build Page.

Build Page

Download This APK Package for your Android Mobile phone.

Download APK

Run this apk on an Android Mobile Phone.

Project ScreenShot on Android Mobile Phone

Conclusion

I used Huawei Cloud services in my article. I recommend that you pay attention to billing when using these services. You can turn off the services after using them.

You can provide feedback with comments and actions. Thanks..

References

--

--