Skip to content

Add GitHub Actions workflow for Android build#54

Open
gaurigupta0604 wants to merge 6 commits into
A-Akhil:mainfrom
gaurigupta0604:ci-cd-pipeline
Open

Add GitHub Actions workflow for Android build#54
gaurigupta0604 wants to merge 6 commits into
A-Akhil:mainfrom
gaurigupta0604:ci-cd-pipeline

Conversation

@gaurigupta0604

Copy link
Copy Markdown

This pull request adds a GitHub Actions workflow to automate the build process for the Android project using Gradle. The workflow is triggered on every push and pull request to the main branch and ensures the project builds successfully using the latest JDK and Android SDK.

Changes
Added .github/workflows/android.yml GitHub Actions file

Configured Java and Android SDK environment

Set up Gradle build commands

@A-Akhil A-Akhil requested a review from Copilot August 19, 2025 11:25

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request adds GitHub Actions workflow automation for the Android project build process, triggered on pushes and pull requests to the main branch. The changes also include Gradle configuration updates and the addition of code coverage reporting.

  • Added GitHub Actions workflows for continuous integration
  • Updated Gradle plugin configurations and removed hardcoded Java path
  • Integrated JaCoCo for code coverage reporting

Reviewed Changes

Copilot reviewed 5 out of 8 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
.github/workflows/android.yml New GitHub Actions workflow for Android CI builds
.github/workflows/ci.yml Additional CI workflow with Gradle caching
app/build.gradle.kts Updated Kotlin plugin, KSP version, and added JaCoCo configuration
settings.gradle.kts Reordered repository declarations in plugin management
gradle.properties Removed hardcoded Java home path

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.


steps:
- name: Checkout code
uses: actions/checkout@v3

Copilot AI Aug 19, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using an outdated version of actions/checkout. Consider updating to @v4 for better performance and security improvements.

Suggested change
uses: actions/checkout@v3
uses: actions/checkout@v4

Copilot uses AI. Check for mistakes.
uses: actions/checkout@v3

- name: Set up JDK
uses: actions/setup-java@v3

Copilot AI Aug 19, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using an outdated version of actions/setup-java. Consider updating to @v4 for consistency with the other workflow file and better features.

Suggested change
uses: actions/setup-java@v3
uses: actions/setup-java@v4

Copilot uses AI. Check for mistakes.
Comment thread app/build.gradle.kts

classDirectories.setFrom(files(debugTree, kotlinDebugTree))
sourceDirectories.setFrom(files("src/main/java", "src/main/kotlin"))
executionData.setFrom(fileTree(buildDir) {

Copilot AI Aug 19, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using deprecated 'buildDir' property. Consider replacing with 'layout.buildDirectory.get().asFile' for Gradle 8+ compatibility.

Suggested change
executionData.setFrom(fileTree(buildDir) {
val debugTree = fileTree(layout.buildDirectory.dir("intermediates/javac/debug/classes").get().asFile) {
exclude(fileFilter)
}
val kotlinDebugTree = fileTree(layout.buildDirectory.dir("tmp/kotlin-classes/debug").get().asFile) {
exclude(fileFilter)
}
classDirectories.setFrom(files(debugTree, kotlinDebugTree))
sourceDirectories.setFrom(files("src/main/java", "src/main/kotlin"))
executionData.setFrom(fileTree(layout.buildDirectory.get().asFile) {

Copilot uses AI. Check for mistakes.
Comment thread app/build.gradle.kts

classDirectories.setFrom(files(debugTree, kotlinDebugTree))
sourceDirectories.setFrom(files("src/main/java", "src/main/kotlin"))
executionData.setFrom(fileTree(buildDir) {

Copilot AI Aug 19, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using deprecated 'buildDir' property. Consider replacing with 'layout.buildDirectory.get().asFile' for Gradle 8+ compatibility.

Suggested change
executionData.setFrom(fileTree(buildDir) {
val debugTree = fileTree("${layout.buildDirectory.get().asFile}/intermediates/javac/debug/classes") {
exclude(fileFilter)
}
val kotlinDebugTree = fileTree("${layout.buildDirectory.get().asFile}/tmp/kotlin-classes/debug") {
exclude(fileFilter)
}
classDirectories.setFrom(files(debugTree, kotlinDebugTree))
sourceDirectories.setFrom(files("src/main/java", "src/main/kotlin"))
executionData.setFrom(fileTree(layout.buildDirectory.get().asFile) {

Copilot uses AI. Check for mistakes.
Comment thread app/build.gradle.kts

classDirectories.setFrom(files(debugTree, kotlinDebugTree))
sourceDirectories.setFrom(files("src/main/java", "src/main/kotlin"))
executionData.setFrom(fileTree(buildDir) {

Copilot AI Aug 19, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using deprecated 'buildDir' property. Consider replacing with 'layout.buildDirectory.get().asFile' for Gradle 8+ compatibility.

Suggested change
executionData.setFrom(fileTree(buildDir) {
val debugTree = fileTree("${layout.buildDirectory.get().asFile}/intermediates/javac/debug/classes") {
exclude(fileFilter)
}
val kotlinDebugTree = fileTree("${layout.buildDirectory.get().asFile}/tmp/kotlin-classes/debug") {
exclude(fileFilter)
}
classDirectories.setFrom(files(debugTree, kotlinDebugTree))
sourceDirectories.setFrom(files("src/main/java", "src/main/kotlin"))
executionData.setFrom(fileTree(layout.buildDirectory.get().asFile) {

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/ci.yml

on:
push:
branches: [ main, ci-cd-pipeline ]

Copilot AI Aug 19, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The branch 'ci-cd-pipeline' appears to be a temporary development branch. Consider removing it from the trigger branches for production workflow.

Suggested change
branches: [ main, ci-cd-pipeline ]
branches: [ main ]

Copilot uses AI. Check for mistakes.
@A-Akhil

A-Akhil commented Aug 19, 2025

Copy link
Copy Markdown
Owner

@gaurigupta0604 Check the review by copilot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants