@@ -32,6 +32,7 @@ fun BuildsApi.getBuildsFlow(
3232 reverse : Boolean? = null,
3333 maxWaitSecs : Int? = null,
3434 buildsPerPage : Int = API_MAX_BUILDS ,
35+ models : List <BuildModelName >? = null,
3536): Flow <Build > {
3637 return flow {
3738 var builds = getBuilds(
@@ -43,6 +44,7 @@ fun BuildsApi.getBuildsFlow(
4344 reverse = reverse,
4445 maxWaitSecs = maxWaitSecs,
4546 maxBuilds = buildsPerPage,
47+ models = models,
4648 )
4749 emitAll(builds.asFlow())
4850 while (builds.isNotEmpty()) {
@@ -76,6 +78,18 @@ fun BuildsApi.getBuildsFlow(
7678 *
7779 * @param scope CoroutineScope in which to create coroutines. Defaults to [GlobalScope].
7880 */
81+ @Deprecated(
82+ " Use `getBuildsFlow(models = listOf(BuildModelName.gradleAttributes))` instead. " +
83+ " This function will be removed in the next release." ,
84+ replaceWith = ReplaceWith (
85+ " getBuildsFlow(since, sinceBuild, fromInstant, fromBuild, query, reverse," +
86+ " maxWaitSecs, models = listOf(BuildModelName.gradleAttributes))" ,
87+ imports = [
88+ " com.gabrielfeo.gradle.enterprise.api.extension.getBuildsFlow" ,
89+ " com.gabrielfeo.gradle.enterprise.api.model.BuildModelName" ,
90+ ]
91+ ),
92+ )
7993@OptIn(DelicateCoroutinesApi ::class )
8094fun BuildsApi.getGradleAttributesFlow (
8195 since : Long = 0,
@@ -86,6 +100,7 @@ fun BuildsApi.getGradleAttributesFlow(
86100 reverse : Boolean? = null,
87101 maxWaitSecs : Int? = null,
88102 scope : CoroutineScope = GlobalScope ,
103+ models : List <BuildModelName >? = null,
89104): Flow <GradleAttributes > =
90105 getBuildsFlow(
91106 since = since,
@@ -95,6 +110,7 @@ fun BuildsApi.getGradleAttributesFlow(
95110 query = query,
96111 reverse = reverse,
97112 maxWaitSecs = maxWaitSecs,
113+ models = models,
98114 ).withGradleAttributes(scope, api = this ).map { (_, attrs) ->
99115 attrs
100116 }
0 commit comments