Skip to content

Qa#5

Merged
BM-Ghost merged 8 commits intomainfrom
qa
Feb 24, 2026
Merged

Qa#5
BM-Ghost merged 8 commits intomainfrom
qa

Conversation

@BM-Ghost
Copy link
Copy Markdown
Owner

No description provided.

BM-Ghost and others added 8 commits February 24, 2026 12:38
This commit updates the Gradle daemon's JVM configuration to use `adoptium` (Eclipse Temurin) as the `toolchainVendor` instead of `oracle`.

The change is made to improve cross-platform compatibility across Linux, Windows, and macOS environments.
Refactor: Switch Gradle JVM toolchain vendor to Adoptium
This commit adds a step to all jobs across the `build.yml`, `code-quality.yml`, and `production-release.yml` workflows to dynamically create the `local.properties` file.

This ensures that the Android SDK location is correctly configured by writing `sdk.dir=$ANDROID_HOME` before any Gradle tasks are executed, preventing potential build failures related to SDK path resolution.
CI: Create `local.properties` file in all workflow jobs
This commit refactors the GitHub Actions workflows to improve efficiency and clarity.

The `pull_request` triggers have been removed from both the `build.yml` and `code-quality.yml` workflows, meaning they will now only execute on direct pushes to the `dev`, `qa`, and `main` branches.

Key changes in `build.yml`:
- **Removed `matrix` strategy**: The build matrix is replaced with a conditional script step (`Determine build type`) that sets the `build-type` and `artifact-suffix` based on the current branch name (`github.ref_name`).
- **Simplified job steps**: Subsequent steps now reference the outputs from the new conditional script, making the workflow more dynamic and easier to read.
- **Removed pull request trigger**: The workflow no longer runs on pull requests.
This commit refactors the CI/CD workflows to use a unique timestamp (`ddmmyyyyhhmmss`) for the `versionName` and artifact filenames. This ensures every build artifact is uniquely identifiable and traceable.

The static `versionName` has been removed from `build.gradle.kts` and is now passed as a Gradle project property from the GitHub Actions workflows.

Key changes:
- **Dynamic Versioning**: `build.gradle.kts` now accepts a `versionName` property.
- **Timestamp Generation**: The `build.yml` and `production-release.yml` workflows now generate a timestamp at the start of each run.
- **Unified Naming Convention**: Artifacts are now named `keylock-{branch}-{timestamp}-{type}`, making them unique and consistent across all branches.
- **Documentation**: Updated `README.md` and `CI_CD.md` to reflect the new artifact naming convention, dynamic versioning, and instructions for downloading the correct build artifacts.
This commit removes the "Code Quality & Analysis" GitHub Actions workflow. The associated documentation in `README.md` and `CI_CD.md` has been updated to reflect this change, removing all references to the now-deleted workflow and its reports.
Copilot AI review requested due to automatic review settings February 24, 2026 11:40
@BM-Ghost BM-Ghost merged commit 445182e into main Feb 24, 2026
5 checks passed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the Android build/versioning and CI workflows to produce timestamp-versioned artifacts across branches, aligns the Gradle toolchain vendor with Eclipse Temurin/Adoptium, and refreshes CI/CD documentation accordingly.

Changes:

  • Switch Gradle daemon toolchain vendor from Oracle to Adoptium (Eclipse Temurin).
  • Make versionName configurable via -PversionName (used by CI timestamps).
  • Refactor GitHub Actions workflows to generate timestamped artifact names and remove the code-quality.yml workflow; update CI/CD docs.

Reviewed changes

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

Show a summary per file
File Description
gradle/gradle-daemon-jvm.properties Moves toolchain vendor to Adoptium for cross-platform builds.
app/build.gradle.kts Reads versionName from Gradle property for CI-driven versioning.
README.md Updates CI/CD pipeline documentation and artifact naming guidance.
CI_CD.md Updates artifact download instructions and timestamp format description.
.github/workflows/production-release.yml Uses UTC timestamp for versioning and passes -PversionName; adds local.properties creation; renames artifacts.
.github/workflows/code-quality.yml Removes the Code Quality workflow entirely.
.github/workflows/build.yml Refactors build workflow to generate timestamped artifacts and adds local.properties; removes PR trigger and matrix strategy.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -6,32 +6,36 @@ on:
- main
- qa
- dev
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

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

build.yml no longer runs on pull_request events. Combined with the deletion of code-quality.yml, this means PRs won’t get any CI signal (build/lint/tests) unless the branch is pushed directly to dev/qa/main, which can weaken review gating. Consider re-adding a pull_request trigger (or a separate PR-check workflow) for at least main/qa/dev.

Suggested change
- dev
- dev
pull_request:
branches:
- main
- qa
- dev

Copilot uses AI. Check for mistakes.
echo "branch-name=qa" >> $GITHUB_OUTPUT
elif [ "${{ github.ref_name }}" = "main" ]; then
echo "build-type=release" >> $GITHUB_OUTPUT
echo "branch-name=main" >> $GITHUB_OUTPUT
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

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

The "Determine build type" step doesn’t set outputs (or fail) for unexpected github.ref_name values. If this workflow is ever expanded (e.g., workflow_dispatch or additional branches), later steps may run with empty build-type/branch-name and produce confusing artifact paths/names. Consider adding an else branch that exits non-zero with a clear message.

Suggested change
echo "branch-name=main" >> $GITHUB_OUTPUT
echo "branch-name=main" >> $GITHUB_OUTPUT
else
echo "Error: Unsupported branch '${{ github.ref_name }}'. Supported branches are: dev, qa, main."
exit 1

Copilot uses AI. Check for mistakes.
Comment thread CI_CD.md
4. Download artifact:
- `keylock-dev-{timestamp}-apk` (dev branch)
- `keylock-qa-{timestamp}-apk` (qa branch)
- `keylock-main-{timestamp}-release` (main branch)
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

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

CI docs here instruct users to open the Build KeyLock workflow, but the listed main artifact name (keylock-main-{timestamp}-release) is produced by production-release.yml, not build.yml (which uploads keylock-main-{timestamp}-apk). Please either (1) change the artifact name for main to match Build KeyLock, or (2) direct main users to the Production Release workflow instead.

Suggested change
- `keylock-main-{timestamp}-release` (main branch)
- `keylock-main-{timestamp}-apk` (main branch)

Copilot uses AI. Check for mistakes.
Comment thread README.md
|--------|--------------|------------|----------|
| **dev** | `keylock-dev-{timestamp}-apk` | Debug APK | 30 days |
| **qa** | `keylock-qa-{timestamp}-apk` | Release APK | 30 days |
| **main** | `keylock-main-{timestamp}-release` | Signed APK + AAB | 90 days |
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

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

This table mixes artifacts from two workflows: keylock-{branch}-{timestamp}-apk (Build KeyLock) vs keylock-main-{timestamp}-release (Production Release). As written, the main row contradicts the earlier statement that Build KeyLock artifacts are ...-apk and can mislead readers who follow the steps to the Build KeyLock workflow. Consider splitting into two tables (Build KeyLock vs Production Release) or updating the main row to keylock-main-{timestamp}-apk when referring to Build KeyLock.

Suggested change
| **main** | `keylock-main-{timestamp}-release` | Signed APK + AAB | 90 days |
| **main** | `keylock-main-{timestamp}-apk` | Signed APK + AAB | 90 days |

Copilot uses AI. Check for mistakes.
Comment thread README.md

**Getting the APK:**
1. Go to GitHub → **Actions** tab
2. Click **Build KeyLock** workflow (not Code Quality)
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

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

README references clicking "Build KeyLock" (not Code Quality), but code-quality.yml has been removed in this PR, so this distinction is now confusing/outdated. Consider removing the parenthetical or updating it to reference the currently relevant alternative workflow (e.g., Production Release) if needed.

Suggested change
2. Click **Build KeyLock** workflow (not Code Quality)
2. Click **Build KeyLock** workflow

Copilot uses AI. Check for mistakes.
Comment thread app/build.gradle.kts
@@ -23,7 +23,7 @@ android {
minSdk = 26
targetSdk = 36
versionCode = 1
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

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

CI now sets versionName from a timestamp, but versionCode remains a constant 1. For Android installs/updates (and especially AAB/Play delivery), versionCode must monotonically increase; otherwise testers may not be able to install an update over a previous build. Consider also deriving versionCode from a CI-provided property (e.g., run number or a shortened timestamp).

Suggested change
versionCode = 1
val ciVersionCode = (project.findProperty("versionCode") as String?)?.toIntOrNull() ?: 1
versionCode = ciVersionCode

Copilot uses AI. Check for mistakes.
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.

2 participants