@@ -151,34 +151,36 @@ abstract class GMavenService : BuildService<BuildServiceParameters.None> {
151151 controller.latestVersionOrNull(groupId, artifactId)
152152
153153 /* *
154- * Gets the latest non-alpha version of the artifact that has been uploaded to GMaven, if any.
154+ * Gets the latest version with no qualifiers of the artifact that has been uploaded to GMaven, if
155+ * any. *
155156 *
156157 * ```
157- * gmaven.latestNonAlphaVersionOrNull ("com.google.firebase", "firebase-components") // "18.0.1"
158+ * gmaven.latestStableVersionOrNull ("com.google.firebase", "firebase-components") // "18.0.1"
158159 * ```
159160 *
160161 * @param groupId The group to search under.
161162 * @param artifactId The artifact to search for.
162163 * @return The latest released version as a string, or null if the artifact couldn't be found.
163164 * @see latestVersion
164165 */
165- fun latestNonAlphaVersionOrNull (groupId : String , artifactId : String ) =
166- controller.latestNonAlphaVersionOrNull (groupId, artifactId)
166+ fun latestStableVersionOrNull (groupId : String , artifactId : String ) =
167+ controller.latestStableVersionOrNull (groupId, artifactId)
167168
168169 /* *
169- * Gets the latest non-alpha version of the artifact that has been uploaded to GMaven, if any.
170+ * Gets the latest version with no qualifiers of the artifact that has been uploaded to GMaven, if
171+ * any.
170172 *
171173 * ```
172- * gmaven.latestNonAlphaVersionOrNull ("com.google.firebase", "firebase-components") // "18.0.1"
174+ * gmaven.latestStableVersionOrNull ("com.google.firebase", "firebase-components") // "18.0.1"
173175 * ```
174176 *
175177 * @param fullArtifactName The artifact to search for, represented as "groupId:artifactId".
176178 * @return The latest released version as a string, or null if the artifact couldn't be found.
177179 * @see latestVersion
178180 */
179- fun latestNonAlphaVersionOrNull (fullArtifactName : String ): String? {
181+ fun latestStableVersionOrNull (fullArtifactName : String ): String? {
180182 val (groupId, artifactId) = fullArtifactName.split(" :" )
181- return latestNonAlphaVersionOrNull (groupId, artifactId)
183+ return latestStableVersionOrNull (groupId, artifactId)
182184 }
183185
184186 /* *
@@ -434,9 +436,9 @@ class GMavenServiceController(
434436 return findFirebaseArtifact(groupId, artifactId)?.latestVersion
435437 }
436438
437- /* * @see GMavenService.latestNonAlphaVersionOrNull */
438- fun latestNonAlphaVersionOrNull (groupId : String , artifactId : String ): String? {
439- return findFirebaseArtifact(groupId, artifactId)?.latestNonAlphaVersion
439+ /* * @see GMavenService.latestStableVersionOrNull */
440+ fun latestStableVersionOrNull (groupId : String , artifactId : String ): String? {
441+ return findFirebaseArtifact(groupId, artifactId)?.latestStableVersion
440442 }
441443
442444 /* * @see GMavenService.hasReleasedArtifact */
@@ -591,7 +593,7 @@ data class GroupIndexArtifact(
591593 val artifactId : String ,
592594 val versions : List <String >,
593595 val latestVersion : String = versions.last(),
594- val latestNonAlphaVersion : String? = versions.findLast { !it.contains("alpha ") },
596+ val latestStableVersion : String? = versions.findLast { !it.contains("- ") },
595597) {
596598
597599 /* *
0 commit comments