http-client-java, use current sdk version#8323
Conversation
|
No changes needing a change description found. |
e292d23 to
9257e0e
Compare
|
You can try these changes here
|
There was a problem hiding this comment.
Pull Request Overview
This PR implements automatic version detection for management Java client generation when no explicit package version is provided. The emitter now reads the current SDK version from version_client.txt and uses it for project files like POM, README, and CHANGELOG.
Key Changes
- Added automatic version detection from
version_client.txtwhenpackage-versionis not specified - Enhanced version parsing to support both dependency and current versions from the version file
- Exposed SDK folder path to subclasses for version lookup functionality
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| FluentProject.java | Added findMyVersion() method to detect current SDK version from version_client.txt when artifact version is not provided |
| Project.java | Refactored SDK folder detection to store in protected field, enhanced checkArtifact() to parse both dependency and current versions |
...java/com/microsoft/typespec/http/client/generator/mgmt/model/projectmodel/FluentProject.java
Outdated
Show resolved
Hide resolved
…/src/main/java/com/microsoft/typespec/http/client/generator/mgmt/model/projectmodel/FluentProject.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
.../main/java/com/microsoft/typespec/http/client/generator/core/model/projectmodel/Project.java
Show resolved
Hide resolved
|
Thanks for the PR. LGTM. |
For DPG, at present, we don't write the pom/readme/changelog, after 1st codegen (check is on whether these is already Therefore, at present, emitter don't write any version into DPG SDK (except for 1st codegen as 1.0.0-beta.1). |
For mgmt, if no input of
package-version, emitter will find the current version in version_client.txt, and use this version for project files like pom/README/CHANGELOG.Tested locally.