Add GitHub Actions workflow for Android build#54
Conversation
There was a problem hiding this comment.
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 |
| uses: actions/checkout@v3 | ||
|
|
||
| - name: Set up JDK | ||
| uses: actions/setup-java@v3 |
|
|
||
| classDirectories.setFrom(files(debugTree, kotlinDebugTree)) | ||
| sourceDirectories.setFrom(files("src/main/java", "src/main/kotlin")) | ||
| executionData.setFrom(fileTree(buildDir) { |
There was a problem hiding this comment.
Using deprecated 'buildDir' property. Consider replacing with 'layout.buildDirectory.get().asFile' for Gradle 8+ compatibility.
| 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) { |
|
|
||
| classDirectories.setFrom(files(debugTree, kotlinDebugTree)) | ||
| sourceDirectories.setFrom(files("src/main/java", "src/main/kotlin")) | ||
| executionData.setFrom(fileTree(buildDir) { |
There was a problem hiding this comment.
Using deprecated 'buildDir' property. Consider replacing with 'layout.buildDirectory.get().asFile' for Gradle 8+ compatibility.
| 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) { |
|
|
||
| classDirectories.setFrom(files(debugTree, kotlinDebugTree)) | ||
| sourceDirectories.setFrom(files("src/main/java", "src/main/kotlin")) | ||
| executionData.setFrom(fileTree(buildDir) { |
There was a problem hiding this comment.
Using deprecated 'buildDir' property. Consider replacing with 'layout.buildDirectory.get().asFile' for Gradle 8+ compatibility.
| 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) { |
|
|
||
| on: | ||
| push: | ||
| branches: [ main, ci-cd-pipeline ] |
There was a problem hiding this comment.
[nitpick] The branch 'ci-cd-pipeline' appears to be a temporary development branch. Consider removing it from the trigger branches for production workflow.
| branches: [ main, ci-cd-pipeline ] | |
| branches: [ main ] |
|
@gaurigupta0604 Check the review by copilot |
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