Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jun 9, 2025

This change implements centralized version management by reading the library version from gradle.properties instead of hardcoding it in the build script.

Changes Made

  1. Added version property to gradle.properties

    # Library version for maven publishing
    version=1.0.0
  2. Updated lib/build.gradle.kts to read version dynamically

    // Before
    version = "1.0.0"
    
    // After  
    version = project.findProperty("version") as String? ?: "1.0.0"
  3. Removed outdated versioning suggestions from GitHub workflow

    • Cleaned up comments in .github/workflows/publish-github-packages.yml that suggested this approach

Benefits

  • Centralized version management: Version is now defined in one place (gradle.properties)
  • Easier releases: Version can be updated in a single location for all publishing tasks
  • Backward compatibility: Fallback to "1.0.0" if property is missing
  • Follows Gradle best practices: Using project properties for configuration

Verification

  • ✅ Build and tests pass with new configuration
  • ✅ POM generation correctly uses version from gradle.properties
  • ✅ Version changes in gradle.properties are properly reflected in published artifacts

Fixes #22.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: hossain-khan <99822+hossain-khan@users.noreply.github.com>
Copilot AI changed the title [WIP] Use gradle.properties for library version for maven release. Use gradle.properties for library version in maven release Jun 9, 2025
Copilot AI requested a review from hossain-khan June 9, 2025 05:38
Copilot finished work on behalf of hossain-khan June 9, 2025 05:38
@hossain-khan hossain-khan marked this pull request as ready for review June 9, 2025 05:38
@hossain-khan hossain-khan requested a review from Copilot June 9, 2025 05:38
Copy link

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

This PR centralizes version management by moving the library version from a hardcoded value in the build script to the gradle.properties file.

  • Dynamically retrieves the version from gradle.properties with a fallback to "1.0.0".
  • Removes outdated, hardcoded versioning comments from the GitHub workflow file.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
lib/build.gradle.kts Updated to dynamically read the version from project properties.
gradle.properties Added a version property for centralized version management.
.github/workflows/publish-github-packages.yml Removed outdated comments regarding hardcoded versioning.

@hossain-khan hossain-khan merged commit 4747a03 into main Jun 9, 2025
2 checks passed
@hossain-khan hossain-khan deleted the copilot/fix-22 branch June 9, 2025 05:39
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.

Use gradle.properties for library version for maven release.

2 participants