Skip to content

Commit 184d0d9

Browse files
authored
fix: return the sdkVersion to ModelBuildInfo (#2547)
1 parent 6a4f4f9 commit 184d0d9

1 file changed

Lines changed: 26 additions & 3 deletions

File tree

  • service/definition/src/main/java/ai/timefold/solver/service/definition/internal/descriptor
Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,32 @@
11
package ai.timefold.solver.service.definition.internal.descriptor;
22

3-
public record ModelBuildInfo(String solverVersion, String version, String buildTime, String branch,
4-
String buildCommit) {
3+
import io.quarkus.runtime.annotations.RecordableConstructor;
4+
5+
/**
6+
* Holds build-time metadata about the Timefold Solver model, including version information and source control details
7+
* captured at build time.
8+
*
9+
* @param solverVersion the version of the Timefold Solver used to build the model
10+
* @param sdkVersion the version of the SDK; deprecated, use {@link #solverVersion()} instead
11+
* @param version the version of the model
12+
* @param buildTime the timestamp when the model was built
13+
* @param branch the source control branch from which the model was built
14+
* @param buildCommit the source control commit hash from which the model was built
15+
*/
16+
public record ModelBuildInfo(String solverVersion, @Deprecated(forRemoval = true) String sdkVersion, String version,
17+
String buildTime, String branch, String buildCommit) {
18+
19+
private static final ModelBuildInfo EMPTY = new ModelBuildInfo(null, null, null, null, null);
20+
21+
@RecordableConstructor
22+
public ModelBuildInfo {
23+
}
24+
25+
public ModelBuildInfo(String solverVersion, String version, String buildTime, String branch, String buildCommit) {
26+
this(solverVersion, solverVersion, version, buildTime, branch, buildCommit);
27+
}
528

629
public static ModelBuildInfo empty() {
7-
return new ModelBuildInfo(null, null, null, null, null);
30+
return EMPTY;
831
}
932
}

0 commit comments

Comments
 (0)