0% found this document useful (0 votes)
58 views9 pages

Continuous & Sonar Integration (Android)

The document discusses steps for integrating continuous integration with an Android project using Android Studio and Gitlab CI. It describes creating a Java keystore file, configuring the Android project to use it for release builds, and modifying the build.gradle file. It also outlines configuring a Gitlab CI pipeline to trigger Sonarqube analysis on commits by adding a YAML file and specifying properties for the project, branch, and Sonar server URL. The pipeline would then run the analysis and bugs/issues would be viewable on the Sonarqube site.

Uploaded by

annisiva
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
58 views9 pages

Continuous & Sonar Integration (Android)

The document discusses steps for integrating continuous integration with an Android project using Android Studio and Gitlab CI. It describes creating a Java keystore file, configuring the Android project to use it for release builds, and modifying the build.gradle file. It also outlines configuring a Gitlab CI pipeline to trigger Sonarqube analysis on commits by adding a YAML file and specifying properties for the project, branch, and Sonar server URL. The pipeline would then run the analysis and bugs/issues would be viewable on the Sonarqube site.

Uploaded by

annisiva
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Continuous Integration

Continuous Integration (CI) is a development practice that requires developers to


integrate code into a shared repository several times a day. Each check-in is then
verified by an automated build, allowing teams to detect problems early.

Steps to integrate an Android Project with Android Studio:


1. Create a jks file for the deployment process and paste the .jks file in the root
project directory:

2. Create the .jks file configuration through the Android Studio:


a. Goto -> Project Module Settings
b. Select app and create a new config by clicking on add(+) icon.
c. Fill in the information of the jks file like Key Alias, Key Password etc…

3. Go to -> Build Types tab and select release and set the required fields as shown
below:
4. Then click on Ok and check the build.gradle file in app, whether the changes get
reflected as shown below:
5. Modify the keystore path from the above specified to the ../myapplication.jks, as
the path should not be hard coded so make it relative path like shown below:
6. Till this step the project has been configured to build and generate the release
apk.

Steps to take the latest commit for Build Process with Gitlab CI
and Sonar integration:
1. Add a .yml file with the build process script with .yml extension, you can find a sample
file here:
○ Sample file is sent to you separately
2. In the yml file script change the necessary properties/configuration according to your
project.
3. Change the project key, project name, version name and language used for
development, in case of Native Android it is java:
4. Specify the branch on which your project should run (CI/Sonar):
5. Save the file and add this to your root project:

6. Commit the code and push it to the git.


7. Goto gitlab website -> to your project -> to pipelines tab:
○ You can check the previous status of the build process.
○ Also you can start a new pipeline by clicking Run Pipeline
8. Finally you can check the sonar analysis report with bugs, code smells etc.. here:
○ http://www.yourwebsite.com

You might also like