@@ -49,21 +49,7 @@ void shouldReturnGradleVersion() throws IOException {
4949
5050 var buildInfo = BuildInfoProperties .get ();
5151
52- // strip Build identifier (for AuraDS releases)
53- // as the aurads flag is only a gradle property we cannot read the value here
54- String [] splits = buildInfo .gdsVersion ().split ("\\ +" );
55- assertThat (splits ).hasSizeLessThanOrEqualTo (2 );
56-
57- var actualBaseVersion = splits [0 ];
58- var actualBuildLabel = splits .length > 1 ? splits [1 ] : "" ;
59-
60- if (!actualBuildLabel .isEmpty ()) {
61- var expectedQualifier = findAuraDSBuildLabel (file ).orElseGet (() ->
62- fail ("Could not find AuraDS qualifier in file: " + file .toAbsolutePath ()));
63- assertEquals (expectedQualifier , actualBuildLabel );
64- }
65-
66- assertEquals (expectedVersion , actualBaseVersion );
52+ assertEquals (expectedVersion , buildInfo .gdsVersion ());
6753 }
6854
6955 @ Test
@@ -119,17 +105,7 @@ void loadFromPropertiesRequiresVersion() {
119105 }
120106
121107 private Optional <String > findVersion (Path file ) throws IOException {
122- Pattern pattern = Pattern .compile (".*gdsBaseVersion = '(\\ d+\\ .\\ d+\\ .\\ d+(-alpha\\ d+|-beta\\ d+)?)'.*" );
123- try (var lines = Files .lines (file , StandardCharsets .UTF_8 )) {
124- return lines
125- .flatMap (line -> pattern .matcher (line ).results ())
126- .map (i -> i .group (1 ))
127- .findFirst ();
128- }
129- }
130-
131- private Optional <String > findAuraDSBuildLabel (Path file ) throws IOException {
132- Pattern pattern = Pattern .compile (".*gdsAuraDSVersion = '(\\ d+)'" );
108+ Pattern pattern = Pattern .compile (".*gdsVersion = '(\\ d+\\ .\\ d+\\ .\\ d+(-alpha\\ d+|-beta\\ d+)?)'.*" );
133109 try (var lines = Files .lines (file , StandardCharsets .UTF_8 )) {
134110 return lines
135111 .flatMap (line -> pattern .matcher (line ).results ())
0 commit comments