@@ -151,34 +151,35 @@ 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.
155- *
154+ * Gets the latest version with no qualifiers of the artifact that has been uploaded to GMaven, if
155+ * any. *
156156 * ```
157- * gmaven.latestNonAlphaVersionOrNull ("com.google.firebase", "firebase-components") // "18.0.1"
157+ * gmaven.latestStableVersionOrNull ("com.google.firebase", "firebase-components") // "18.0.1"
158158 * ```
159159 *
160160 * @param groupId The group to search under.
161161 * @param artifactId The artifact to search for.
162162 * @return The latest released version as a string, or null if the artifact couldn't be found.
163163 * @see latestVersion
164164 */
165- fun latestNonAlphaVersionOrNull (groupId : String , artifactId : String ) =
166- controller.latestNonAlphaVersionOrNull (groupId, artifactId)
165+ fun latestStableVersionOrNull (groupId : String , artifactId : String ) =
166+ controller.latestStableVersionOrNull (groupId, artifactId)
167167
168168 /* *
169- * Gets the latest non-alpha version of the artifact that has been uploaded to GMaven, if any.
169+ * Gets the latest version with no qualifiers of the artifact that has been uploaded to GMaven, if
170+ * any.
170171 *
171172 * ```
172- * gmaven.latestNonAlphaVersionOrNull ("com.google.firebase", "firebase-components") // "18.0.1"
173+ * gmaven.latestStableVersionOrNull ("com.google.firebase", "firebase-components") // "18.0.1"
173174 * ```
174175 *
175176 * @param fullArtifactName The artifact to search for, represented as "groupId:artifactId".
176177 * @return The latest released version as a string, or null if the artifact couldn't be found.
177178 * @see latestVersion
178179 */
179- fun latestNonAlphaVersionOrNull (fullArtifactName : String ): String? {
180+ fun latestStableVersionOrNull (fullArtifactName : String ): String? {
180181 val (groupId, artifactId) = fullArtifactName.split(" :" )
181- return latestNonAlphaVersionOrNull (groupId, artifactId)
182+ return latestStableVersionOrNull (groupId, artifactId)
182183 }
183184
184185 /* *
@@ -434,9 +435,9 @@ class GMavenServiceController(
434435 return findFirebaseArtifact(groupId, artifactId)?.latestVersion
435436 }
436437
437- /* * @see GMavenService.latestNonAlphaVersionOrNull */
438- fun latestNonAlphaVersionOrNull (groupId : String , artifactId : String ): String? {
439- return findFirebaseArtifact(groupId, artifactId)?.latestNonAlphaVersion
438+ /* * @see GMavenService.latestStableVersionOrNull */
439+ fun latestStableVersionOrNull (groupId : String , artifactId : String ): String? {
440+ return findFirebaseArtifact(groupId, artifactId)?.latestStableVersion
440441 }
441442
442443 /* * @see GMavenService.hasReleasedArtifact */
@@ -591,7 +592,7 @@ data class GroupIndexArtifact(
591592 val artifactId : String ,
592593 val versions : List <String >,
593594 val latestVersion : String = versions.last(),
594- val latestNonAlphaVersion : String? = versions.findLast { !it.contains("alpha ") },
595+ val latestStableVersion : String? = versions.findLast { !it.contains("- ") },
595596) {
596597
597598 /* *
0 commit comments